-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Snackbar: Only allow action invoke once, Add button classes, Add ForceClose #8383
Conversation
So you can't keep clicking a snackbar that's fading away. Also adds distinct classes to the snackbar's action and close buttons along with tweaking some existing tests to take advantage of that. OnClickFromActionButtonOnlyOnce and OnClickFromBodyOnlyOnce are not functional yet Resolves MudBlazor#8349
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8383 +/- ##
==========================================
+ Coverage 88.82% 88.91% +0.08%
==========================================
Files 407 414 +7
Lines 12226 12301 +75
Branches 2441 2456 +15
==========================================
+ Hits 10860 10937 +77
+ Misses 834 832 -2
Partials 532 532 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, ah, ah, ah, stayin' alive ... I like it ;). I also like the occasional comments explaining non-intuitive code.
Just the busy-waiting while loop in teardown should be fixed. Otherwise looks good.
@ScarletKuro wanna do a second glance?
@henon Is it waiting? ForceClose immediately calls the OnClose event which should remove it from the service in one call. |
a Edit: scrap that, I see now that it is not really waiting for anything. |
Thanks ! |
…eClose (MudBlazor#8383) * Snackbar: Limit clicks to one time & Add button classes So you can't keep clicking a snackbar that's fading away. Also adds distinct classes to the snackbar's action and close buttons along with tweaking some existing tests to take advantage of that. OnClickFromActionButtonOnlyOnce and OnClickFromBodyOnlyOnce are not functional yet Resolves MudBlazor#8349
…eClose (MudBlazor#8383) * Snackbar: Limit clicks to one time & Add button classes So you can't keep clicking a snackbar that's fading away. Also adds distinct classes to the snackbar's action and close buttons along with tweaking some existing tests to take advantage of that. OnClickFromActionButtonOnlyOnce and OnClickFromBodyOnlyOnce are not functional yet Resolves MudBlazor#8349
Description
State.UserHasInteracted
.Snackbar.ForceClose
for instantly closing a snackbar in code without any animation and uses it inSnackbarTearDown
for efficiency.Resolves #8349
How Has This Been Tested?
unit, visually
Types of changes
Checklist:
dev
).