-
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
Leverage notification progress support for progress API #44090
Comments
@sean-mcmanus might find this useful for the C++ extension. Related: microsoft/vscode-cpptools#1160 |
@EricJizbaMSFT @fiveisprime this would be great for the Azure extensions which have long running processes creating resources... |
This would be useful for the PowerShell Extension as well. |
Yeah, maybe another |
* Leverage notification progress support for progress API fixes #44090 * only allow positive total/worked values * drop total/worked in favour of percentage * make sure to dispose CancellationTokenSource after use * make the cancellation button optional
@sean-mcmanus @EricJizbaMSFT @fiveisprime @dragonwolf83 @chrisdias this will be in stable API for our March release. You might want to create reminder issues to check it out next month. A sample to use it is: vscode.window.withProgress({
location: vscode.ProgressLocation.Notification,
title: "this is cool",
// cancellable: true
}, (progress, token) => {
token.onCancellationRequested(() => {
console.log("CANCELED")
});
setTimeout(() => {
progress.report({ percentage: 10, message: "still going..."});
}, 1000);
setTimeout(() => {
progress.report({ percentage: 50, message: "still going harder..."});
}, 2000);
setTimeout(() => {
progress.report({ percentage: 90, message: "almost there..."});
}, 3000);
var p = new Promise(resolve => {
setTimeout(() => {
resolve();
}, 5000);
});
return p;
}); |
I hope the progress bar won't be so thin 😕 |
@agauniyal the UI did not change from what I showed in #44090 (comment) and the size of the progress bar matches with any other progress bar we have in the UI. |
With the new notifications comes support for showing long running operations:
We currently have an API where you can show global progress:
One advantage of having this within progress is to free space from the status bar and also to indicate from which extension the progress is reported (because notifications always show their source). Another advantage is that we could provide a "Cancel" button to stop the operation.
We could move this into a notification as a first step and could offer additional APIs to:
@jrieken thoughts?
The text was updated successfully, but these errors were encountered: