feat(react-progress): migrate ProgressBar from CSS to motion components#35883
Open
robertpenner wants to merge 7 commits intomicrosoft:masterfrom
Open
feat(react-progress): migrate ProgressBar from CSS to motion components#35883robertpenner wants to merge 7 commits intomicrosoft:masterfrom
robertpenner wants to merge 7 commits intomicrosoft:masterfrom
Conversation
2b62711 to
9e32153
Compare
📊 Bundle size reportUnchanged fixtures
|
|
Pull request demo site: URL |
robertpenner
commented
Mar 20, 2026
...ges/react-components/react-progress/library/src/components/ProgressBar/renderProgressBar.tsx
Outdated
Show resolved
Hide resolved
b5c7568 to
5019491
Compare
| @@ -0,0 +1,7 @@ | |||
| { | |||
There was a problem hiding this comment.
🕵🏾♀️ visual changes to review in the Visual Change Report
vr-tests-react-components/CalendarCompat 4 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/CalendarCompat.multiDayView.default.chromium_1.png | 478 | Changed |
| vr-tests-react-components/CalendarCompat.multiDayView - High Contrast.default.chromium.png | 1194 | Changed |
| vr-tests-react-components/CalendarCompat.multiDayView - Dark Mode.default.chromium.png | 1088 | Changed |
| vr-tests-react-components/CalendarCompat.multiDayView - RTL.default.chromium.png | 478 | Changed |
vr-tests-react-components/Charts-DonutChart 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png | 5570 | Changed |
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png | 599 | Changed |
vr-tests-react-components/Positioning 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png | 160 | Changed |
| vr-tests-react-components/Positioning.Positioning end.chromium.png | 732 | Changed |
vr-tests-react-components/ProgressBar converged 4 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png | 208 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png | 405 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - RTL.default.chromium.png | 162 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png | 326 | Changed |
vr-tests-react-components/TagPicker 3 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/TagPicker.disabled - Dark Mode.disabled input hover.chromium.png | 658 | Changed |
| vr-tests-react-components/TagPicker.disabled - RTL.disabled input hover.chromium.png | 635 | Changed |
| vr-tests-react-components/TagPicker.disabled - High Contrast.disabled input hover.chromium.png | 1319 | Changed |
There were 4 duplicate changes discarded. Check the build logs for more information.
8d8c9cd to
7002c8c
Compare
1 task
0188022 to
864edca
Compare
…BarIndeterminateMotion for consistency
…rogressBarMotions
…slots Adds motionSlot() and MotionSlotProps, parallel to presenceMotionSlot(), for components that use continuous/looping animations (createMotionComponent) rather than enter/exit animations (createPresenceComponent).
Replace hardcoded ProgressBarIndeterminateMotion with a customizable indeterminateMotion slot using motionSlot(). Adds a MotionCustom story demonstrating how to override the indeterminate animation.
864edca to
7b676e9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Previous Behavior
@keyframesthat animated theleftstyle property.leftanimation triggers layout recalc, the animation ran on the main thread and was susceptible to jank.@keyframesand@media (prefers-reduced-motion: reduce).New Behavior
translateinstead ofleft, making the animation run on the compositor thread and jank-proof.reducedMotionoption.indeterminateMotionslot, allowing consumers to customize, replace, or disable it (passnull).Code Changes
Motion Migration
progressBarMotions.tswith aProgressBarIndeterminateMotionmotion component.renderProgressBar.tsxto wrap the bar slot with the motion component whenvalueisundefined(indeterminate).@keyframesanimations and related styles fromuseProgressBarStyles.styles.ts.@fluentui/react-motionas a dependency.Motion Slot
motionSlot()utility andMotionSlotPropstype to@fluentui/react-motion, like the existingpresenceMotionSlot()but for one-way animations. (NOTE: thisreact-motionchange will be moved to another PR)indeterminateMotionslot toProgressBarSlots, resolved viamotionSlot()inuseProgressBar_unstable.MotionCustomstory demonstrating how to use the slot to override the indeterminate animation.Testing
left-based CSS animation becomes choppy when the main thread is busy.translate-based motion component runs smoothly without disruption.MotionCustomStorybook example.