diff --git a/extensions/gitpod-web/src/extension.ts b/extensions/gitpod-web/src/extension.ts index f083471b76ec3..d4a3cb0e35e53 100644 --- a/extensions/gitpod-web/src/extension.ts +++ b/extensions/gitpod-web/src/extension.ts @@ -392,7 +392,7 @@ export type PortCommand = typeof PortCommands[number]; export class GitpodPortViewProvider implements vscode.WebviewViewProvider { public static readonly viewType = 'gitpod.portsView'; - public _view?: vscode.WebviewView; + private _view?: vscode.WebviewView; readonly portMap = new Map(); @@ -539,11 +539,12 @@ export function registerPorts(context: GitpodExtensionContext): void { } hasShownTryItOut = true; const openAction = 'Open'; - const neverAgain = 'Don\'t Show Again'; + const neverAgain = `Don't Show Again`; const action = await vscode.window.showInformationMessage('Do you want to try with our new experimental Ports view?', openAction, neverAgain); if (action === openAction) { + await vscode.commands.executeCommand('setContext', 'gitpod.portsView.visible', true); + vscode.commands.executeCommand('gitpod.portsView.focus'); config.update('enabled', true, true); - setTimeout(() => vscode.commands.executeCommand('gitpod.portsView.focus'), 2000); } else if (action === neverAgain) { config.update('neverPrompt', true, true); }