-
Notifications
You must be signed in to change notification settings - Fork 923
Description
Currently the title field for ProgressStartEvent says:
Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation.
However VS Code allows this field to be set as an empty string and will render it differently (it does not include the colon to join the title/message if the title is an empty string).
I prefer VS Code's behaviour, as I want to send a single string for progress updates, which I can currently do like this:
this.sendEvent(new ProgressStartEvent(debugLaunchProgressId, "", "Launching..."));
this.sendEvent(new ProgressUpdateEvent(debugLaunchProgressId, "Compiling..."));
this.sendEvent(new ProgressUpdateEvent(debugLaunchProgressId, "Deploying to Device..."));
This results in the status bar showing:
Launching...
Compiling...
Deploying to Device...
This is what I want. However, if title is intended to not be an empty string, I cannot generate the strings I want, as they will all be prefixed:
this.sendEvent(new ProgressStartEvent(debugLaunchProgressId, "Launching..."));
this.sendEvent(new ProgressUpdateEvent(debugLaunchProgressId, "Compiling..."));
this.sendEvent(new ProgressUpdateEvent(debugLaunchProgressId, "Deploying to Device..."));
Results in:
Launching...
Launching...: Compiling...
Launching...: Deploying to Device...
I could live with the "Launching:" prefix, but having the "..." looks weird. And if I remove it from the original message, then it is inconsistent with the others (and I'd like to keep it to be consistent with other messages shown in the status bar by VS Code, for example the "Building..." notification from TypeScript).
So for now I'm going to ship sending an empty string for title on the assumption that VS Code's behaviour is reasonable, and other clients will follow - however I think the spec should be more explicit about whether this is allowed (and if it's not, there should be a way to replace a single-string status message rather than forcing the x:b format when wanting to update).