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: indicate progress notification if hidden in notification center #90274
Comments
(Experimental duplicate detection) |
Hm... This should have been fixed with #89654 already. I will investigate |
I cannot reproduce that.. Once, I have pressed 'cancel' the file is being saved but since the progress message only shows after 3 seconds (when dirty, 5sec when not dirty) it might appear as not saving. |
I am sorry. I thought pressing The actual steps are
|
Ok, I understand now. Yeah, this is a little unfortunate because Adding @bpasero for better UX here. Maybe don't hide on |
@misolori nicht need your idea here. I would like to preserve that ESC closes notification toasts because anything else would be quite unpredictable for a user IMHO. However giving an indication about a notification that is having progress seems like a good idea to me. Essentially some indicator at the notification bell location that something is going on? |
@misolori hm, how about an actual animation down there, similar to the sync icon for git spinning when you pull and push? |
@bpasero what if we re-used the same line animation in the sidebar and placed it below the notification bell? |
@misolori yeah that works for me, is there some code I can copy from? |
@bpasero let me see if I can create this via CSS (this was a simple animation in Figma). |
@bpasero I was able to use the |
I've recently encountered this issue (when using Python Black formatter with External Formatters extension and saving a file containing syntax errors) and would like to share my two cents. I would either expect the file to be saved no matter what (with an error notification that the formatter failed of course) or the save process to be cancelled immediately. In other words, if the formatter failed and nothing is running, what is there to cancel? P.S. Sorry if my comment is irrelevant, love what you guys are doing, autoformatting has changed my life, peace! 😃 |
@misolori upon second thought, I wonder if a better approach would be to reuse the status location for progress that we already have so that we do not introduce another progress indicator. I mean we have this one: So we could do this: if a progress notification is running but not visible, we show it in the status bar at that location keeping the label up to date with what the notification provides. Clicking that entry in the status bar could reveal the notifications center and it would hide automatically once the notification item is visible or done. |
Hm, upon second thought, we have 2 cases to support:
I am now thinking that for the first case, we can try something as outlined in #90274 (comment) (which also seems to be what Azure Portal is doing). However for the second case, the notification is literally gone, though the operation is still running. In that case I would like to indicate to the user that the operation is still ongoing, e.g. like so: |
One option would be that clicking the X for a notification about an incomplete operation only hides the toast and decrements the unread notification counter. If the operation is complete, clicking X would dismiss the whole notification. In the long running operation example you could click X to dismiss the toast, decrement the unread notifications counter and then show the animated bar underneath the bell icon. When the user clicks the bell icon they see the notification for the long running operation and they can see that it is still in progress. Once the operation is complete, clicking X would then completely dismiss that notification. This would mean that there would be no way to ever dismiss notifications about long running operations before they are complete. If that was necessary, we could add an explicit dismiss all command in the notification hub. |
Yeah I like this suggestion. This would mean there is a subtle change for the X button depending on the kind of notification:
In theory we could also change the icon for a progress notification to indicate this difference, e.g. like a minimize icon. I suggest we bring this up in this weeks UX call. |
@dzintars please report as separate issue, maybe to the extension author |
Verification: class ProgressAction extends Action {
static readonly ID = 'workbench.action.ProgressAction';
static readonly LABEL = nls.localize('ProgressAction', "ProgressAction");
static counter = 0;
private counter = 0;
constructor(
id: string,
label: string,
@IProgressService private readonly progressService: IProgressService
) {
super(id, label);
ToggleFullScreenAction.counter++;
}
run(): Promise<void> {
this.progressService.withProgress({
location: ProgressLocation.Notification,
title: `[${ToggleFullScreenAction.counter}] Some long running operation`,
cancellable: true
}, progress => {
return timeout(20000);
});
return Promise.resolve();
}
} |
Version: 1.42.0
Commit: ae08d54
Date: 2020-02-06T10:51:33.119Z
Electron: 6.1.6
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 17.7.0
Steps to Reproduce:
Format On Save
.Save Participants
.This issue is a little bit different from #90273. What I want to say here is simple. If
provideDocumentFormattingEdits
throwsError
after the notificationSave Participants
canceled, we can not save files anymore. The files remain dirty.The text was updated successfully, but these errors were encountered: