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

Test: notification progress API #46458

Closed
2 tasks done
bpasero opened this issue Mar 24, 2018 · 1 comment
Closed
2 tasks done

Test: notification progress API #46458

bpasero opened this issue Mar 24, 2018 · 1 comment

Comments

@bpasero
Copy link
Member

bpasero commented Mar 24, 2018

Refs: #44090

Complexity: 2

There is new API to show progress as a notification.

Verify:

  • progress shows up as notification and optionally can show a cancel button
  • progress can either show up infinite or discrete
  • multiple progress items can show up at the same time

Sample code:

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;
});
@bpasero
Copy link
Member Author

bpasero commented Mar 27, 2018

@rebornix you might want to test "out of sources" given the amount of fixes I already pushed that were uncovered by Joao.

@rebornix rebornix removed their assignment Mar 27, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants