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

Fix Remote Picker interactions #178108

Merged
merged 2 commits into from
Mar 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix Remote Picker interactions
  • Loading branch information
bhavyaus committed Mar 23, 2023
commit 8304e0d2e780f0cb0c34053342a10c939619eb3c
9 changes: 6 additions & 3 deletions src/vs/workbench/contrib/remote/browser/remoteStartEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export class RemoteStartEntry extends Disposable implements IWorkbenchContributi
@IContextKeyService private readonly contextKeyService: IContextKeyService) {

super();
registerConfiguration(this.productService.quality !== 'stable');
const enable = this.extensionGalleryService.isEnabled() && (this.productService.remoteExtensionTips ?? false) && this.productService.quality !== 'stable';
registerConfiguration(enable);
const remoteExtensionTips = { ...this.productService.remoteExtensionTips, ...this.productService.virtualWorkspaceExtensionTips };
this.remoteExtensionMetadata = Object.values(remoteExtensionTips).filter(value => value.showInStartEntry === true).map(value => {
return { id: value.extensionId, installed: false, friendlyName: value.friendlyName, remoteCommands: [], isPlatformCompatible: false, dependencies: [] };
Expand Down Expand Up @@ -241,10 +242,12 @@ export class RemoteStartEntry extends Disposable implements IWorkbenchContributi
const selectedItems = quickPick.selectedItems;
if (selectedItems.length === 1) {
const selectedItem = selectedItems[0].id!;
quickPick.busy = true;
const remoteExtension = this.remoteExtensionMetadata.find(value => ExtensionIdentifier.equals(value.id, selectedItem));
if (remoteExtension) {

quickPick.items = [];
quickPick.busy = true;

quickPick.placeholder = nls.localize('remote.startActions.installingExtension', 'Installing extension... ');

const galleryExtension = (await this.extensionGalleryService.getExtensions([{ id: selectedItem }], CancellationToken.None))[0];
Expand All @@ -263,12 +266,12 @@ export class RemoteStartEntry extends Disposable implements IWorkbenchContributi
this.commandService.executeCommand(command);

this.telemetryService.publicLog2<RemoteStartActionEvent, RemoteStartActionClassification>('remoteStartList.ActionExecuted', { command: command, remoteExtensionId: selectedItem });
quickPick.busy = false;
}
else {
this.commandService.executeCommand(selectedItem);
this.telemetryService.publicLog2<RemoteStartActionEvent, RemoteStartActionClassification>('remoteStartList.ActionExecuted', { command: selectedItem });
}
quickPick.dispose();
}
});
quickPick.show();
Expand Down