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

Allow notifications (info/warn/error) to be cancelled/hidden #46551

Closed
DanTup opened this issue Mar 26, 2018 · 9 comments
Closed

Allow notifications (info/warn/error) to be cancelled/hidden #46551

DanTup opened this issue Mar 26, 2018 · 9 comments
Assignees
Labels
api *duplicate Issue identified as a duplicate of another issue(s) workbench-notifications Notification widget issues

Comments

@DanTup
Copy link
Contributor

DanTup commented Mar 26, 2018

Sometime I pop up notifications based on the state of the project, like this one to offer to restore packages:

screen shot 2018-03-26 at 14 18 11

Sometimes the user performs another action that makes this redundant (for example when you launch a Flutter app with F5 it automatically restores packages as it launches). It would be nice if there was a way to cancel the notification so it disappears on its own rather than hanging around when it makes no more sense.

@bpasero bpasero assigned jrieken and unassigned bpasero Mar 26, 2018
@bpasero bpasero added api workbench-notifications Notification widget issues labels Mar 26, 2018
@bpasero bpasero self-assigned this Mar 26, 2018
@bpasero
Copy link
Member

bpasero commented Mar 26, 2018

@jrieken not sure if this has been asked already. I think it would be nice if extensions could hide a notification but I am not sure how to best do this with the current API that returns a Thenable (as opposed to a IDisposable).

@DanTup
Copy link
Contributor Author

DanTup commented Mar 26, 2018

Is there some sort of cancellation token we could pass into MessageOptions maybe?

@DanTup
Copy link
Contributor Author

DanTup commented Mar 26, 2018

Or maybe something like window.withProgress which takes a promise that can be resolved/rejected?

@bpasero
Copy link
Member

bpasero commented Mar 26, 2018

@DanTup a CancellationToken is typically the other way around to inform you that the user canceled the operation. But yeah, if you could pass over a cancellation token source, the cancellation could be wired in from there.

@jrieken
Copy link
Member

jrieken commented Mar 26, 2018

Not a fan. A notification is a strong distractor and once extensions show them they grab the attention of the user. Giving them the opportunity to hide them isn't something I'd like us to support because the worst would be notifications that come and go and keep distracting me.

@jrieken
Copy link
Member

jrieken commented Mar 26, 2018

/duplicate of #44122

@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Mar 26, 2018
@vscodebot
Copy link

vscodebot bot commented Mar 26, 2018

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Mar 26, 2018
@DanTup
Copy link
Contributor Author

DanTup commented Mar 26, 2018

@jrieken

Not a fan. A notification is a strong distractor and once extensions show them they grab the attention of the user. Giving them the opportunity to hide them isn't something I'd like us to support because the worst would be notifications that come and go and keep distracting me.

I understand, but there are many places where we end up with a worse user experience.

For example, I was just implementing some refactors, like Extract Method. If the user tries to name their method with invalid characters, I show an error. The modal errors look terrible so I use this notification. If the user reads the notification in the corner of the screen then decides to just re-invoke the the refactor and give it a good name, they have a stale error message hanging around which is confusing.

I know there are shortcuts to get to the notifications, but many users won't know them, they'll just get annoyed that these error messages hang around after they've already dealt with them.

@DanTup
Copy link
Contributor Author

DanTup commented May 4, 2018

I noticed in a fix for something else there's a hideAfterTimeout call in the notifications. I've never seen a notification hide on its own (except for the bug I raised). Is there something specific I need to do to make sure they're purged in this code? Does it only happen if there are no buttons (I can't see anything obvious in the code).

@vscodebot vscodebot bot locked and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api *duplicate Issue identified as a duplicate of another issue(s) workbench-notifications Notification widget issues
Projects
None yet
Development

No branches or pull requests

3 participants