Skip to content
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

Adds MessageBar component to FluentUI #31708

Merged
merged 40 commits into from
Jun 28, 2024

Conversation

procload
Copy link
Contributor

@procload procload commented Jun 13, 2024

This pull request introduces a new MessageBar component to the Fluent Web Components. The MessageBar component is a notification bar that provides feedback about a user's actions or the state of an application. It can be used to display information, warnings, errors, or success messages.

Here are the key changes:

New Component:

  • MessageBar component is introduced with various attributes including shape, layout, intent. It also provides a dismissMessageBar method to emit a dismiss event when the message bar is dismissed.

Component Definition:

  • The MessageBar component is defined and registered with the Fluent Design System.
  • The MessageBar component is exported with various options and styles.

Component Options:

  • The MessageBar component options including MessageBarLayout, MessageBarShape, MessageBarIntent, and MessageBarPoliteness are defined.

Component Styles:

  • The styles for the MessageBar component are defined. Different styles are applied based on the shape, layout, intent, and politeness attributes of the MessageBar.

Component Template:

  • The template for the MessageBar component is created. The template includes slots for actions and dismiss and uses different icons based on the intent attribute.

Component Integration Test:

  • An integration test for the MessageBar component is added. The test checks the default attributes, dismiss event, and changes to the layout, intent, and shape attributes.

Component Story:

  • Storybook stories for the MessageBar component are added. The stories demonstrate the MessageBar with different shapes, layouts, intents, and politeness.

Closes #26709

@procload procload marked this pull request as ready for review June 13, 2024 21:31
@procload procload requested a review from a team as a code owner June 13, 2024 21:31
@fabricteam
Copy link
Collaborator

fabricteam commented Jun 13, 2024

📊 Bundle size report

✅ No changes found

@chrisdholt
Copy link
Member

Can we add a benchmark for this? .bench.ts file to create an instance. In terms of the icons, I'd run one with the icons slotted (I believe what you've recently changed) and then I'd pull them out and run without and see what the delta is.

@procload
Copy link
Contributor Author

Can we add a benchmark for this? .bench.ts file to create an instance. In terms of the icons, I'd run one with the icons slotted (I believe what you've recently changed) and then I'd pull them out and run without and see what the delta is.

How do I run the benchmarks? I created the message-bar.bench.ts file, but couldn't find documentation on how to get the results.

@procload procload requested a review from chrisdholt June 25, 2024 17:04
@procload
Copy link
Contributor Author

@chrisdholt Looks like the benchmarks are now running locally. Is there any other feedback here that I can address?

@procload procload merged commit dcdccf4 into microsoft:master Jun 28, 2024
16 of 18 checks passed
@procload procload deleted the users/procload/messageBarComponent branch June 28, 2024 01:58
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.

Component: MessageBar
6 participants