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

Show Reload full text as sub text #63187

Merged
merged 3 commits into from
Nov 29, 2018
Merged

Show Reload full text as sub text #63187

merged 3 commits into from
Nov 29, 2018

Conversation

ramya-rao-a
Copy link
Contributor

@ramya-rao-a ramya-rao-a commented Nov 15, 2018

This PR attempts to implement #60053 (comment)

  • Revert the text on the Reload button to just "Reload", update tooltip to contain text like Please reload Visual Studio Code to complete the .....ing of this extension.
  • Re-use the subtext area used by the recommendation status to show the above full text

This currently wont work due to https://github.com/Microsoft/vscode/pull/63187/files#r233713325

@ramya-rao-a ramya-rao-a self-assigned this Nov 15, 2018
@@ -437,6 +402,67 @@ export class ExtensionEditor extends BaseEditor {
return super.setInput(input, options, token);
}

private setSubText(extension: IExtension, reloadAction: ReloadAction) {
if (reloadAction.enabled) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sandy081 This if never returns true. This is because the update of the "enabled" status on the ReloadAction is not a synchronous operation.

See https://github.com/Microsoft/vscode/blob/5ed816b5e74341adb7899a375acab09c182b44b3/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts#L1230

How do you suggest we tackle this? Other than adding a listener for when the ReloadAction changes its enabled status.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -437,6 +402,67 @@ export class ExtensionEditor extends BaseEditor {
return super.setInput(input, options, token);
}

private setSubText(extension: IExtension, reloadAction: ReloadAction) {
if (reloadAction.enabled) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ramya-rao-a
Copy link
Contributor Author

The onDidChange on the action worked perfectly, thanks!
PR is updated

@sandy081 sandy081 self-requested a review November 20, 2018 09:56
@sandy081 sandy081 added this to the November 2018 milestone Nov 29, 2018
@sandy081 sandy081 merged commit 771099d into master Nov 29, 2018
@sandy081 sandy081 deleted the ramyar/reload-subtext branch May 8, 2019 13:41
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants