Skip to content

Test: notification progress API #46458

Closed
Closed

Description

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;
});

Activity

  1. bpasero commented on Mar 27, 2018

    @bpasero
    ContributorAuthor

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

  2. removed their assignment
    on Mar 27, 2018
  3. locked and limited conversation to collaborators on May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions