Skip to content

Conversation

@ling1726
Copy link
Contributor

@ling1726 ling1726 commented May 12, 2023

Adds the toasterId prop to all Toaster components and controllers. If a Toaster has the toasterId prop set, then it will ignore any toast events except those with its id.

This change required splitting up the dismissing functionalities into:

  • dismissToast - for single toasts
  • dismissAllToasts - to dismiss all toasts

Addresses #27827

ling1726 added 2 commits May 12, 2023 14:31
Adds the `toasterId` prop to all Toaster components and controllers. If
a Toaster has the `toasterId` prop set, then it will ignore any toast
events except those with its id.
@ling1726 ling1726 marked this pull request as ready for review May 12, 2023 14:48
@ling1726 ling1726 requested a review from a team as a code owner May 12, 2023 14:48
@github-actions github-actions bot added this to the May Project Cycle Q2 2023 milestone May 12, 2023
@fabricteam
Copy link
Collaborator

fabricteam commented May 12, 2023

📊 Bundle size report

🤖 This report was generated against adb50a1f3d4d2843943bc0917979050d7925792c

@size-auditor
Copy link

size-auditor bot commented May 12, 2023

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: f44600a9b36abdd6aed4aaa8e44afdf049f8870f (build)

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 12, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5cdb457:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@ling1726 ling1726 enabled auto-merge (squash) May 15, 2023 14:55
@ling1726 ling1726 merged commit 2cefd95 into microsoft:master May 15, 2023
return (
<>
<Toaster />
<Toaster toasterId={toasterId} />
Copy link
Member

Choose a reason for hiding this comment

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

Is usage of toasterId mandatory? If no, why all examples were updated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants