Skip to content

feat(react-motion): add state motion component factory#36400

Open
robertpenner wants to merge 11 commits into
microsoft:masterfrom
robertpenner:feat/state-motion-component
Open

feat(react-motion): add state motion component factory#36400
robertpenner wants to merge 11 commits into
microsoft:masterfrom
robertpenner:feat/state-motion-component

Conversation

@robertpenner

Copy link
Copy Markdown
Collaborator

Summary

  • add createStateMotionComponent() for flat, deterministic event-driven motion graphs
  • add a pure JavaScript createStateMotionController() external store and React useStateMotion() subscription hook
  • support typed event payloads, canonical state keyframes, custom edge motions, lifecycle callbacks, reduced motion, skip mode, imperative playback, interruption, and forwarded target refs
  • document React batching and synchronous logical state semantics
  • add Storybook examples for two-state presence, a three-state media player, and a four-state async action
  • export the new interface from @fluentui/react-motion and @fluentui/react-components

Validation

  • react-motion:test: 99 tests passing, 12 snapshots passing
  • react-motion:type-check
  • react-motion:build --excludeTaskDependencies
  • react-motion:lint --excludeTaskDependencies
  • react-motion-stories:lint --excludeTaskDependencies
  • react-motion:generate-api --excludeTaskDependencies

Known workspace issue

The aggregate react-components:generate-api and story type-check dependency chain are currently blocked by unrelated stale/broken workspace declarations: OverflowReorderObserver is missing from the built @fluentui/react-overflow declaration output, and rebuilding that package hits an existing API Extractor internal error while analyzing useOverflow_unstable.

@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

@@ -0,0 +1,7 @@
{

@github-actions github-actions Bot Jul 14, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

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 404 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 16 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 16 Changed
vr-tests-react-components/ProgressBar converged 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 42 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 27 Changed
vr-tests-react-components/Skeleton converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Skeleton converged.Opaque Skeleton with rectangle - Dark Mode.default.chromium.png 9 Changed
vr-tests-react-components/TagPicker 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - High Contrast.disabled input hover.chromium.png 1319 Changed
vr-tests/Callout 6 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Callout.Bottom left edge.default.chromium.png 2195 Changed
vr-tests/Callout.Bottom left edge - RTL.default.chromium.png 2199 Changed
vr-tests/Callout.Beak 25.default.chromium.png 2198 Changed
vr-tests/Callout.Bottom right edge.default.chromium.png 1130 Changed
vr-tests/Callout.Left bottom edge.default.chromium.png 3182 Changed
vr-tests/Callout.Right center.default.chromium.png 2117 Changed
vr-tests/Pivot - Overflow 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Pivot - Overflow.Tabs - RTL.chromium.png 4471 Changed
vr-tests/react-charting-VerticalBarChart 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-VerticalBarChart.Grouped - Wrap Labels.default.chromium.png 3105 Changed
vr-tests/react-charting-VerticalBarChart.Basic - Secondary Y Axis.default.chromium.png 3 Changed

There were 1 duplicate changes discarded. Check the build logs for more information.

@robertpenner
robertpenner requested a review from a team as a code owner July 15, 2026 19:10
Separate machine topology from motion skins, reserve symbolic state names, and preserve presentation between consecutive transitions.
Demonstrate topology and skin separation with media-player and layout-neutral card-transfer state graphs.
Allow reusable motion skins to map typed layout context to concrete state presentations.
Swap contextual origin and destination roles after each drop so repeated transfers use the same dropped, lifted, and transferred states.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant