-
Notifications
You must be signed in to change notification settings - Fork 52
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
Notifications #225
Notifications #225
Conversation
I think |
Should be good to go now! |
For E.g., we can track the message ID and do the following:
... but this would require us to send messages from the
and set (We could also use the |
Also curious about people's thoughts, but I feel like the mantine notifications control ( Mainly, I can only think of 3 notif types:
(and showing |
I was also thinking about this but was kind of unsure about how to separate them, so thank you for your breakdown of the notif types! I think the abstraction makes a lot of sense and is easy to change. (changing this pr to draft for now and also realizing that I didn't add docs yet) |
Added some different types of notifications as per suggested! Can be indicated via
I also added an individual notification clear option along with the global clear (can be renamed 'close' for clarity if needed). It has a bit of funky behavior if you open the same notification too many times and just clears all of it, but I actually don't think it's a huge issue irl use cases for now. Still didn't add docs yet but can easily do so in the end after all design is finalized! Screen.Recording.2024-06-18.at.6.19.38.PM.mov |
I noticed a problem with multiple clients: unless all the notifications are explicitly cleared in the backend ( I tried attaching a callback for |
This seems like the result of some viser state management logic, particularly the concept of "persistent" messages, see: viser/src/viser/infra/_infra.py Lines 244 to 246 in d56be1a
as well as references to the This is usually nice, since when we make scene or GUI updates we want them to take effect even for new clients, but it does complicate the notification logic. It shouldn't be too hard to fix, but we'd need to figure out what the expected behavior is:
|
Actually, would it be possible to disable the automatic synchronization between clients? Make it an opt-in feature (not default)? What do you think? |
I imagine in some cases, notifications would be client-specific (e.g. rendering a video, downloading things, etc), so a new client should not receive the same set of notifications. But I can also think of some cases where everybody should receive all the notifs (e.g. training complete). Mostly speaking from a nerfstudio pov. Does this mean that all connected clients would always receive all the broadcasted notifications though? I guess this question applies to the other things to consider. I feel like there are these two types of notifications in terms of broadcasting (global or client-specific). But I'm unsure if making this distinction between the two types of notifications will make it inconvenient for users and if client-specific messages are even possible. |
I think this should be already supported actually, if you call |
Ok that makes sense, for client notifications! Then I think the behavior for global broadcasting of notifications should be:
Yes, since the broadcasted notification isn't client specific then everybody should probably receive it.
I don't feel super strongly about this. I do think having the full temporary display of notification makes slightly more sense for users, so somebody doesn't get stuck with a 0.5 second notification that immediately disappears. But whatever makes the implementation cleaner I'm ok with.
I don't think so, I think clients should control their own notification queue. Let me know if you have any thoughts. |
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.
🎊
Can add and clear notifications all using the mantine notifications system! The first notification in the example below disappears because it is set to auto-close after some time.
Screen.Recording.2024-06-12.at.10.19.06.PM.mov
(Currently I'm a bit unsure on the design in accordance with the rest of the gui api.)
TODO: