You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application is receiving notifications from a server. I push a toast... but if the user leaves the page in the background, the notifications pile up and are excessive when returning. I would like the ability to disable the notification. (Without changing the source code of your library, that is...) The user expects missed notifications to show up in the notification tray but that is another part of the application.
Also, if there is a little snippet of code I could insert in the meantime to my app to get this behavior... that would be great. Maybe modifying the event listeners of document? But since the visibility check is made when the components are created, this would only work for components created when the document is visible.
If you want a pull request I could probably finagle one...
The text was updated successfully, but these errors were encountered:
This would fix some. The other case is when some notifications come in while the user is looking, but then are paused until the user comes back. In the case where the user gets a message like "robot A disconnected", they see the little blue line ticking down, they might be confused when they come back to the window and see the same notification again. (They might think robot A disconnected a 2nd time)
Also, if say "robot A disconnected", the user expects that notification to persist for the 3 seconds it typically does. If they know the robot disconnects, but don't see it because they returned to the app too quickly, that could be confusing.
Agree that visibilitychange should be configurable. A setting should be exposed that allows it to be disabled.
I've been waiting for Svelte 5 to land on stable (so I can rewrite the store for performance) but that's taking awhile. I think I'll work on cutting a new release first and add this feature.
My application is receiving notifications from a server. I push a toast... but if the user leaves the page in the background, the notifications pile up and are excessive when returning. I would like the ability to disable the notification. (Without changing the source code of your library, that is...) The user expects missed notifications to show up in the notification tray but that is another part of the application.
Also, if there is a little snippet of code I could insert in the meantime to my app to get this behavior... that would be great. Maybe modifying the event listeners of document? But since the visibility check is made when the components are created, this would only work for components created when the document is visible.
If you want a pull request I could probably finagle one...
The text was updated successfully, but these errors were encountered: