Repository navigation
Components: Allow limiting the number of maximum visible Snackbars - #58559
Conversation
|
Size Change: +46 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
draganescu
left a comment
There was a problem hiding this comment.
Great crease to iron out @Mamaduka 🥳
|
I like it, but not that the 3+ snackbars show up after dismissing a more recent one. I would expect that the old snackers are actually gone when they're "gone". |
|
I checked other libraries like Sonner, and they have the same behavior. The prop controls how many Snackbars are visible simultaneously; it's not actually removing the snackbars from the store. |
|
Is there a reason the consumer can't modify the notice array themselves before it hits |
I don't have a strong opinion here, happy to move logic into consumers. I will create a follow-up tomorrow morning. |
|
Here's the follow-up. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core SVNIf you're a Core Committer, use this list when committing to GitHub Merge commitsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
What?
Resolves #53201.
PR updates the
SnackbarListcomponent to allow limiting the number of maximum visible Snackbars.Why?
Reduces noise in the editors.
How?
Introduces new
maxVisibleproperty and sets it to3for post and site editors.Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast
CleanShot.2024-02-01.at.17.23.30.mp4