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

Add extension support for view-level progress indicators #92421

Closed
eamodio opened this issue Mar 11, 2020 · 2 comments
Closed

Add extension support for view-level progress indicators #92421

eamodio opened this issue Mar 11, 2020 · 2 comments

Comments

@eamodio
Copy link
Contributor

eamodio commented Mar 11, 2020

Refs: #92135

Now that we can support view-level progress indicators, we should expose this ability to extensions.

Current proposal:

//#region https://github.com/microsoft/vscode/issues/92421
export enum ProgressLocation {
/**
* Show progress for a view, as progress bar inside the view (when visible),
* and as an overlay on the activity bar icon. Doesn't support cancellation or discrete progress.
*/
View = 25,
}
export interface ProgressOptions {
/**
* The target view identifier for showing progress when using [ProgressLocation.View](#ProgressLocation.View).
*/
viewId?: string
}
//#endregion

Alternative # 1:

export interface ProgressOptions {
    location: ProgressLocation | string;
}

Alternative # 2:

export interface ProgressOptions {
    location: ProgressLocation | { viewId: string };
}

//cc @jrieken

@eamodio eamodio added this to the March 2020 milestone Mar 11, 2020
@eamodio eamodio self-assigned this Mar 11, 2020
@eamodio eamodio reopened this Mar 11, 2020
@eamodio
Copy link
Contributor Author

eamodio commented Mar 11, 2020

I think I prefer alt #2, but I chose the first, because neither alt 1 or 2 can be implemented in vscode.proposed.d.ts

@eamodio
Copy link
Contributor Author

eamodio commented Mar 23, 2020

Alternative # 2 above implemented:

vscode/src/vs/vscode.d.ts

Lines 7938 to 7958 in d778f85

export interface ProgressOptions {
/**
* The location at which progress should show.
*/
location: ProgressLocation | { viewId: string };
/**
* A human-readable string which will be used to describe the
* operation.
*/
title?: string;
/**
* Controls if a cancel button should show to allow the user to
* cancel the long running operation. Note that currently only
* `ProgressLocation.Notification` is supporting to show a cancel
* button.
*/
cancellable?: boolean;
}

@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2020
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

2 participants