-
Notifications
You must be signed in to change notification settings - Fork 2.8k
refactor(react-message-bar): migrate slide & fade to motion components (redo) #35168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
robertpenner
wants to merge
5
commits into
microsoft:master
Choose a base branch
from
robertpenner:refactor/message-bar-motion
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
refactor(react-message-bar): migrate slide & fade to motion components (redo) #35168
robertpenner
wants to merge
5
commits into
microsoft:master
from
robertpenner:refactor/message-bar-motion
Conversation
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
- Replace react-transition-group with @fluentui/react-motion components - Use PresenceGroup and custom MessageBarMotion component - Create custom fadeAtom and slideAtom motion definitions - Remove MessageBarTransition.tsx and related CSS animations - Add deprecation markers for unused properties - Update to latest motion package versions (react-motion ^9.10.4, react-motion-components-preview ^0.10.0) - Remove react-transition-group dependency This restores the motion component refactoring from PR microsoft#33465, which was reverted due to issue microsoft#33914. The underlying motion framework bug has been fixed in PR microsoft#34164.
…idation tests - Add ResizeObserver mock in jest setup for MessageBar component tests - Required because MessageBar uses useMessageBarReflow which depends on ResizeObserver - Add comprehensive tests for bug microsoft#33914 to validate motion components handle ref forwarding gracefully - Tests confirm motion components now warn instead of crashing with invalid children
📊 Bundle size reportUnchanged fixtures
|
Pull request demo site: URL |
change/@fluentui-react-message-bar-63f1e671-8b9c-4ed0-ab5d-6a993537315b.json
Show resolved
Hide resolved
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.
MessageBarGroup
Previous Behavior
•
MessageBarGroup
animations were implemented usingreact-transition-group
and CSS.• The animations did not respond to the OS animations toggle.
New Behavior
MessageBarGroup
animations use motion components in a PresenceGroup.react-transition-group
dependency is removed from all of v9!react-components
is 7 kB smaller.MessageBarTransition.tsx
is deleted.Testing Notes
• Test the animations in the
MessageBar
Animation example. (PR build)Related Issue(s)
• Fixes #33470
History and Background
This PR re-applies the motion component refactoring from #33465, which was originally merged on December 20, 2024, but was later reverted in #34037 on March 19, 2025 due to a critical bug discovered in issue #33914.
What happened:
react-transition-group
to the modern motion components frameworkHow this PR addresses the original bug:
@fluentui/react-motion ^9.10.4
and@fluentui/react-motion-components-preview ^0.10.0
which include the fix from fix(react-motion): improve element validation to work with React 19 #34164