feat: Implement limit for toast stacking#27848
Merged
Merged
Conversation
Adds the new `limit` prop to `Toaster` which will limit the number of visible toasts on the page. This is done internally using a priority queue based on the creation date. This will also support toast priorities in the queue. Addresses microsoft#27827
ling1726
marked this pull request as ready for review
May 15, 2023 15:55
|
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 69258af:
|
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| FluentProviderWithTheme | virtual-rerender | 91 | 90 | 10 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 703 | 721 | 5000 | |
| Button | mount | 378 | 373 | 5000 | |
| Field | mount | 1290 | 1306 | 5000 | |
| FluentProvider | mount | 913 | 908 | 5000 | |
| FluentProviderWithTheme | mount | 109 | 118 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 91 | 90 | 10 | Possible regression |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 116 | 109 | 10 | |
| InfoButton | mount | 15 | 24 | 5000 | |
| MakeStyles | mount | 1126 | 1098 | 50000 | |
| Persona | mount | 2047 | 2004 | 5000 | |
| SpinButton | mount | 1566 | 1577 | 5000 |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: bfd75793f7ec35cec23e0b4f785ededb82a0e1dd (build) |
Collaborator
📊 Bundle size reportUnchanged fixtures
|
Collaborator
🕵 fluentuiv9 No visual regressions between this PR and main |
bsunderhus
approved these changes
May 15, 2023
ling1726
enabled auto-merge (squash)
May 15, 2023 19:12
| pauseOnHover: boolean; | ||
| toasterId: ToasterId | undefined; | ||
| priority: number; | ||
| dispatchedAt: number; |
Member
There was a problem hiding this comment.
This should be under Toast
Collaborator
|
🎉 Handy links: |
Collaborator
|
🎉 Handy links: |
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
May 18, 2023
* master: (24 commits) chore(react-tabster): upgrade tabster to v4.4.2 (microsoft#27540) feat(react-tags): Add TagGroup with context (microsoft#27886) applying package updates fix(react-infobutton): Add aria-owns to InfoLabel (microsoft#27834) fix(recipes-react-components): Add a FluentProvider to the local storybook (microsoft#27746) chore: update RFC template (microsoft#27880) applying package updates feat: implement Toaster offset (microsoft#27854) feat(react-drawer): create DrawerFooter component (microsoft#27583) Make getKey and selection props mutually exclusive (microsoft#24048) Added MIGRATION.md to the Breadcrumb (microsoft#27846) update Github CODEOWNERS file (microsoft#27849) feat(react-tags): make basic Tag a button instead of div (microsoft#27858) chore: add test-ssr script to v9 packages (microsoft#27690) chore(react-tree): exports TreeItemAside unstable (microsoft#27856) bugfix(react-dialog): removes unnecessary grid gaps (microsoft#27845) applying package updates fix(react-textarea): Don't remove outline when filled and disabled and apply correct disabled color to text (microsoft#27837) feat: Implement limit for toast stacking (microsoft#27848) Update README.md for fluent 2 theme to include import instructions (microsoft#27847) ...
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
May 18, 2023
* feat/drawer-header: (24 commits) chore(react-tabster): upgrade tabster to v4.4.2 (microsoft#27540) feat(react-tags): Add TagGroup with context (microsoft#27886) applying package updates fix(react-infobutton): Add aria-owns to InfoLabel (microsoft#27834) fix(recipes-react-components): Add a FluentProvider to the local storybook (microsoft#27746) chore: update RFC template (microsoft#27880) applying package updates feat: implement Toaster offset (microsoft#27854) feat(react-drawer): create DrawerFooter component (microsoft#27583) Make getKey and selection props mutually exclusive (microsoft#24048) fix: move style override to outside the component Added MIGRATION.md to the Breadcrumb (microsoft#27846) update Github CODEOWNERS file (microsoft#27849) feat(react-tags): make basic Tag a button instead of div (microsoft#27858) chore: add test-ssr script to v9 packages (microsoft#27690) chore(react-tree): exports TreeItemAside unstable (microsoft#27856) bugfix(react-dialog): removes unnecessary grid gaps (microsoft#27845) applying package updates fix(react-textarea): Don't remove outline when filled and disabled and apply correct disabled color to text (microsoft#27837) feat: Implement limit for toast stacking (microsoft#27848) ...
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
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.
Adds the new
limitprop toToasterwhich will limit the number of visible toasts on the page.This is done internally using a priority queue based on the creation date. This will also support toast priorities in the queue.
Addresses #27827