feat(Notifications): swap snackbar notifications after minDisplayMs dwell #3196
Open
MartinCupela wants to merge 3 commits into
Open
feat(Notifications): swap snackbar notifications after minDisplayMs dwell #3196MartinCupela wants to merge 3 commits into
MartinCupela wants to merge 3 commits into
Conversation
NotificationList now replaces the active snackbar with the next queued one once it has been visible for `minDisplayMs` (default 1000ms), instead of waiting for the full `duration` to elapse. - Same-type repeated triggers refresh the active snackbar and reset its auto-dismiss timer (bypass the dwell). - Persistent variants (no `duration`) are never displaced by transient feedback; only a newer persistent or an external dismissal can replace them. - Selection policy is pluggable via the new `pickNext` prop (`PickNextNotification`); the default `defaultPickNext` is FIFO so nothing is silently dropped. `pickOldest` and `pickNewest` are exported as building blocks for custom strategies.
|
Size Change: +1.83 kB (+0.27%) Total Size: 683 kB 📦 View Changed
ℹ️ View Unchanged
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3196 +/- ##
==========================================
+ Coverage 83.68% 83.83% +0.14%
==========================================
Files 435 435
Lines 13028 13166 +138
Branches 4202 4252 +50
==========================================
+ Hits 10903 11038 +135
- Misses 2125 2128 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
🎯 Goal
Closes REACT-984
Introduces:
The reduction of display time is introduced according to the design requirements:
Documented changes:
https://github.com/GetStream/docs-content/pull/1295