From 990414cae17967691fdbb2cd016ef9c4bafece30 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 6 Jul 2021 14:05:27 -0700 Subject: [PATCH] fix: openFolder by using command ID for Explorer --- .../vs/workbench/contrib/files/browser/explorerViewlet.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.ts b/lib/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.ts index ebdde76f..7081f40a 100644 --- a/lib/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.ts +++ b/lib/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.ts @@ -303,9 +303,15 @@ viewsRegistry.registerViewWelcomeContent(EmptyView.ID, { order: 1 }); +// NOTE@coder: +// We use OpenFolderAction.ID instead of commandId +// because for some reason, the command openFileFolder +// does not work as expected and causes the "Open Folder" +// command to not work +// See: https://github.com/cdr/code-server/issues/3457 viewsRegistry.registerViewWelcomeContent(EmptyView.ID, { content: localize({ key: 'noFolderHelp', comment: ['Please do not translate the word "commmand", it is part of our internal syntax which must not change'] }, - "You have not yet opened a folder.\n[Open Folder](command:{0})", commandId), + "You have not yet opened a folder.\n[Open Folder](command:{0})", OpenFolderAction.ID), when: ContextKeyExpr.or(ContextKeyExpr.and(WorkbenchStateContext.notEqualsTo('workspace'), RemoteNameContext.isEqualTo('')), ContextKeyExpr.and(WorkbenchStateContext.notEqualsTo('workspace'), IsWebContext)), group: ViewContentGroups.Open, order: 1