Skip to content

Add delay to server-error toast#19

Merged
srcrip merged 6 commits intosrcrip:masterfrom
lardcanoe:add-delay-server-error
Mar 21, 2025
Merged

Add delay to server-error toast#19
srcrip merged 6 commits intosrcrip:masterfrom
lardcanoe:add-delay-server-error

Conversation

@lardcanoe
Copy link
Contributor

Based on changes from the discussion at https://elixirforum.com/t/delaying-liveview-js-commands-avoid-quick-flash-of-trying-to-reconnect/64035/9?u=sevensidedmarble

This adds a 3s delay before showing the server-error toast, giving the client a chance to reconnect before showing it.

@srcrip
Copy link
Owner

srcrip commented Dec 31, 2024

Thank you @lardcanoe! I would prefer if we made this configurable rather than always 3s though.

Also, if you're familiar with the thread you linked, do you know if it addresses the last comment in the thread that claims that a simple delay is not enough to stop the problem on mobile?

@srcrip
Copy link
Owner

srcrip commented Dec 31, 2024

alright I did the rest of the work on implementing this in a way that I think makes sense. if you'd like to try it before merging @lardcanoe that would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants