-
Notifications
You must be signed in to change notification settings - Fork 77
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
Bug: calcite-alert stays open beyond animation end when another alert is added #3366
Comments
…oDismiss mode #3366 (#3525) * fix(alert): remove clearTimeOUt that delays the alert to close on autoDismiss mode #3366 * isolate only 1 timeout id set per each alert, considering utilizing component id to track timeout id * add conditions to fire setTimeOut one at a time and clean up code * remove id prop, scrapping id prop idea * remove comment * clear time out if there is an existing timeout id * clear timer id when component closes * add test for alert component autodismiss duration check * revise condition from pr comment
Installed and assigned for verification. |
@macandcheese can you take a look at this one for design? I don't think there should be a close animation if there is another alert already queued. Edit: Never mind there was an animation before this install. However I still think having the animations back to back on |
So, this is kind of a weird one. Because an individual alert animates in, the alert "object" should animate out before another one can replace it. If we didn't do that, we'd be replacing the content of the alert vs. replacing the alert itself, which the animation infers. That said - it's not a great interaction. Ideally when we handle multiple queued alerts with this update: #2835, we can have queued alerts animate in "behind" and then the animation for the queued alert becoming active will be more of a "move to front", with the dismissed alert animating out. I realize that probably doesn't make sense, the image in the linked issue may help. For now I think we can leave it until that's implemented. |
Thanks for looking Adam. This is verified on |
Actual Behavior
When an auto-dismiss calcite alert is open and second alert is is added, there seems to be a delay between the progress bar animation ending and the first alert closing. You can see in this video:
Screen.Recording.2021-10-27.at.4.03.12.PM.mov
Expected Behavior
I would expect the alert close behavior to be the same regardless of when a new alert has been added.
Reproduction Steps and Sample
Sample:
Add alerts
button and you will see the same behavior as in the above video.Relevant Info
Reproducible version:
@esri/[email protected]
The text was updated successfully, but these errors were encountered: