-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Hide notifications (info, warning) even when showing buttons #51013
Comments
(Experimental duplicate detection) |
@bpasero is this something you'd accept a PR on? If so, what approach should be used? Ideally imo Thanks! |
@eamodio we did an explicit design decision that notifications with buttons should be treated like prompts that require user interaction and thus never hide. What is the use case for changing the semantic here? For a user it is then very hard to know if a notification stays open or suddenly closes if there is no visual difference. |
In CodeStream we use notification for @mentions and DM messages (by default). And we don't want these notifications to stick around, but we do want a user to be able to interact with it (e.g. open the message). Right now because notification don't have a click action, nor the ability that have non-http[s] links (either An alternative is maybe to just have a click action on the notification to allow a callback for when a notification is clicked on? |
Although I was thinking that from the user point of the the ux for notifications with (that aren't model) and without buttons would be the same, until the user clicks on the notification. At which time the notification would expand, revealing the buttons, and also stopping the auto hide. So its behavior wouldn't be much of a user ux change. |
Lets close as duplicate of #46571. The right UX is to use links in this case. |
We talked about this in the UX call and think that we can change our model to always hide notifications after a certain timeout even if buttons are part of it. For very few notifications that are triggered from the core application we might add an internal option to not hide them after a timeout (e.g. our question to opt out of telemetry which is very important to be interacted with). We currently do not anticipate to expose this internal option as API though. |
While I think that would be a great default -- I think there are some messages that may require an interaction. For example, in the CodeStream extension, if we lose connection (after retrying a few times), we should a notification with a "Reconnect" button. If that notification was to auto-hide, the user could easily miss the fact that they are disconnected. |
We do not want to introduce a setting for extensions because this will very likely cause all extension authors marking their notifications as "important" so that they persist. If you want the user to do something on connection lost, you will have to show the notification again after some time or turn the notification into a modal dialog. |
@eamodio on a second thought, I wonder if we should just hide messages with severity INFO to begin with. For warning and error it seems OK to me to keep them around because of the potential higher impact. |
I like that given the alternatives -- and by default. I would suggest that warnings should maybe also be included. |
We think about only leaving ERROR open. Extensions can then decide to change to that severity if the notification should stay open and action is needed. |
There is now a new option @Microsoft/vscode please check
There is currently no plans to expose the |
@bpasero we hit some issues with the new behaviour, please see the end of the gif: https://monosnap.com/file/mrTsd1L6WoS9536So9euiwx1VVtZz7 Notice that the |
@legomushroom to clarify, what happens is that you reload the window and the error notification does not show up, it immediately shows in the status bar? If that is true please create a new issue with exact steps how to reproduce (be as verbose as possible). |
@bpasero in today's insiders, it seems that all notifications (info or otherwise, with buttons or not) never hide |
@eamodio I cannot reproduce, here is what I did
=> notification hides What are your steps? Note: when the window is not focused, we will not hide the notification assuming that you did not have a chance to get back to it (e.g. the window is not looked at) |
Ah that explains it. The window wasn't focused. Is that new behavior or did I just never notice it before? |
@eamodio yeah its new behaviour which I now just tweaked, it will no longer keep notifications around without buttons because I thought that its a bit too aggressive. However, for notifications with buttons, they will stay around if the window is not focused. Maybe you could test again from latest insiders tomorrow. |
Sounds good -- will do! |
@bpasero I tested this morning, but it seems that all notifications now go away if the window isn't focused. |
@bpasero that's right the error notification was never shown and immediately was hidden under the bell icon. I cannot reproduce it anymore though, so it might be fixed. |
@legomushroom ok let me know when you see this again, ideally with some steps. |
Currently there is no way to have a notification offer actions but also have it go away after a timeout. I would love the ability to specify that the actions provided to the notification api (
showInformationMessage
, etc) should only be shown (and cause the notification to "stick") if the user interacts (i.e. clicks) on the notification itself.That way the notification would appear & behave the same as a notification without actions, unless the user clicks on the notification, and then it would expand to show the action buttons (in which case it would also turn off the hide timeout). And maybe these type of notifications are shown a bit longer than normal ones to give the user more time to interact if desired
/cc @bpasero
The text was updated successfully, but these errors were encountered: