Skip to content
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

Add delay to server-error toast #19

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lardcanoe
Copy link

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