-
Notifications
You must be signed in to change notification settings - Fork 377
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
[MessageBar] Add an optional toggle for the fade in animation. #2716
Conversation
Enhanced the FluentMessageBar component by adding the `fluent-messagebar-animation` class to `div` elements with the `fluent-messagebar` class across multiple test files. Updated `FluentMessageBar_AllowDismiss.verified.html`, `FluentMessageBar_Default.verified.html`, `FluentMessageBar_DisableFadeIn.verified.html`, and `FluentMessageBar_WithId.verified.html` to reflect this change. Added a new `div` structure for the `fluent-messagebar` in `FluentMessageBarTests.FluentMessageBar_DisableFadeIn.verified.html`. Introduced a new test method `FluentMessageBar_DisableFadeIn` in `FluentMessageBarTests.cs` to verify the component's behavior with the `FadeIn` parameter set to `false`. Included MIT License and copyright information at the top of `FluentMessageBarTests.cs`.
@microsoft-github-policy-service agree |
Great work. Just a quick discussion on "how the browser can detect when to apply the animation?". <div class="fluent-messagebar intent-info" animation="fadein">
...
</div> .fluent-messagebar[animation="fadein"] {
animation: fadein 1.5s;
} |
Thanks! I agree that the HTML element attribute looks cleaner. But I think that that would resolve in a bigger change is how the components is created. Are you thinking about implementing something like an |
No, nothing exists about that. And I don't think we need to use an A MessageBar is a component to "Communicates important information about the state of the entire application". By default, it is not necessary to display an animated message like explained in the FluentUI React components. Probably a difference between the Toast. But we already display the MessageBar using this animation :-( |
@yspanj we are pulling this PR in now so it will be available in v4.10.1. Please submit a follow-up PR to change the behavior to use an attribute so we can include that for a later version. Thanks!
You can just set the attribute to the
|
Thanks. |
Pull Request
π Description
Add a options to disable the animation in the MessageBar component.
π©βπ» Reviewer Notes
π Test Plan
Existing message bar tests have been updated with the new animation CSS class. And a new test has been added.
β Checklist
General
Component-specific
β Next Steps