From 19710ab1442b914566e8825d2221d2658dd09413 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Mon, 23 Nov 2020 19:03:54 -0500 Subject: [PATCH 1/3] vscode: Update product.json The new fields are from vscodium and make the welcome page documentation links work correctly. I also renamed the distribution to "code-server" so that when you're in a browser, it now says code-server instead of Code OSS. --- ci/dev/vscode.patch | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/ci/dev/vscode.patch b/ci/dev/vscode.patch index f6af1c22..3737261e 100644 --- a/ci/dev/vscode.patch +++ b/ci/dev/vscode.patch @@ -264,9 +264,18 @@ index 28f8a69a2a91f9cb9f4dbd73ed3e689b2b3afe84..b5f5b10004d3e36092a30f685938a606 } } diff --git a/product.json b/product.json -index 7cab6d1b9f3b84bfc703856e93773a293fd198cf..31d3d5a943192eee791e1121415b436dc1ed3822 100644 +index 7cab6d1b9f3b84bfc703856e93773a293fd198cf..6924d94f65b390f52885b1036f7e96bce0e34680 100644 --- a/product.json +++ b/product.json +@@ -1,6 +1,6 @@ + { +- "nameShort": "Code - OSS", +- "nameLong": "Code - OSS", ++ "nameShort": "code-server", ++ "nameLong": "code-server", + "applicationName": "code-oss", + "dataFolderName": ".vscode-oss", + "win32MutexName": "vscodeoss", @@ -20,7 +20,7 @@ "darwinBundleIdentifier": "com.visualstudio.code.oss", "linuxIconName": "com.visualstudio.code.oss", @@ -276,6 +285,22 @@ index 7cab6d1b9f3b84bfc703856e93773a293fd198cf..31d3d5a943192eee791e1121415b436d "urlProtocol": "code-oss", "extensionAllowedProposedApi": [ "ms-vscode.vscode-js-profile-flame", +@@ -136,5 +136,14 @@ + "publisherDisplayName": "Microsoft" + } + } +- ] ++ ], ++ ++ "//": "https://github.com/VSCodium/vscodium/pull/155/files", ++ "documentationUrl": "https://go.microsoft.com/fwlink/?LinkID=533484#vscode", ++ "keyboardShortcutsUrlMac": "https://go.microsoft.com/fwlink/?linkid=832143", ++ "keyboardShortcutsUrlLinux": "https://go.microsoft.com/fwlink/?linkid=832144", ++ "keyboardShortcutsUrlWin": "https://go.microsoft.com/fwlink/?linkid=832145", ++ "introductoryVideosUrl": "https://go.microsoft.com/fwlink/?linkid=832146", ++ "tipsAndTricksUrl": "https://go.microsoft.com/fwlink/?linkid=852118", ++ "newsletterSignupUrl": "https://www.research.net/r/vsc-newsletter" + } diff --git a/remote/.yarnrc b/remote/.yarnrc deleted file mode 100644 index c1a32ce532afa501fb19bdbcf6bcb0ec151ecd99..0000000000000000000000000000000000000000 From 5a38ab95fe0a0da3858254667335df7c1d2db57a Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Mon, 23 Nov 2020 19:06:51 -0500 Subject: [PATCH 2/3] vscode: Disable go home button See https://github.com/cdr/code-server/issues/2328 --- ci/dev/vscode.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ci/dev/vscode.patch b/ci/dev/vscode.patch index 3737261e..abf86b4b 100644 --- a/ci/dev/vscode.patch +++ b/ci/dev/vscode.patch @@ -3712,6 +3712,20 @@ index 021af6e0f8983c492f9cdd048ba2dcae7640bc1d..814dd0ff2fa7737e07833d8092c8f489 module = module.with({ path: ensureSuffix(module.path, '.js') }); const response = await fetch(module.toString(true)); +diff --git a/src/vs/workbench/browser/actions/navigationActions.ts b/src/vs/workbench/browser/actions/navigationActions.ts +index 7344a3a29b32f7b370b99bf0cfdc79a322195ff8..dc21396e83e2f53914447d3460c2ee1103ecb28e 100644 +--- a/src/vs/workbench/browser/actions/navigationActions.ts ++++ b/src/vs/workbench/browser/actions/navigationActions.ts +@@ -310,4 +310,8 @@ actionsRegistry.registerWorkbenchAction(SyncActionDescriptor.from(FocusNextPart, + actionsRegistry.registerWorkbenchAction(SyncActionDescriptor.from(FocusPreviousPart, { primary: KeyMod.Shift | KeyCode.F6 }), 'View: Focus Previous Part', CATEGORIES.View.value); + + const workbenchRegistry = Registry.as(WorkbenchExtensions.Workbench); +-workbenchRegistry.registerWorkbenchContribution(GoHomeContributor, LifecyclePhase.Ready); ++// See https://github.com/cdr/code-server/issues/2328 ++// workbenchRegistry.registerWorkbenchContribution(GoHomeContributor, LifecyclePhase.Ready); ++export const _1 = workbenchRegistry; ++export const _2 = GoHomeContributor; ++export const _3 = LifecyclePhase.Ready; diff --git a/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css b/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css index ced2d815834e40a1543e80516472799075980733..dfcae73e8a042307600c67f163aa00ba9e0762f4 100644 --- a/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css From 303fe2bc4eeeeb62248fdfa909cc68ecc3724bf9 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Mon, 23 Nov 2020 19:07:35 -0500 Subject: [PATCH 3/3] vscode: Customize welcome page for code-server - Title/subtitle are now code-server and VS Code version - Added a list of code-server help links --- ci/dev/vscode.patch | 67 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/ci/dev/vscode.patch b/ci/dev/vscode.patch index abf86b4b..d5ce3da4 100644 --- a/ci/dev/vscode.patch +++ b/ci/dev/vscode.patch @@ -3803,6 +3803,73 @@ index 74f6922e98b4bb6a7fb100f5aac015afe9fc171b..3243a97c2d378013d96ffbe87e9df6dd .scm-view .monaco-list .monaco-list-row .resource-group > .actions, .scm-view .monaco-list .monaco-list-row .resource > .name > .monaco-icon-label > .actions { +diff --git a/src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts b/src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts +index 6af6a4b7f42654ec6cc60e0ba5efd376919f3e04..3a8176951628e0b2528aae8796ba684c3ab53d9a 100644 +--- a/src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts ++++ b/src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts +@@ -4,6 +4,7 @@ + *--------------------------------------------------------------------------------------------*/ + + import { escape } from 'vs/base/common/strings'; ++import product from 'vs/platform/product/common/product'; + import { localize } from 'vs/nls'; + + export default () => ` +@@ -11,7 +12,7 @@ export default () => ` +
+
+

${escape(localize('welcomePage.vscode', "Visual Studio Code"))}

+-

${escape(localize({ key: 'welcomePage.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] }, "Editing evolved"))}

++

VS Code v${product.version}

+
+
+
+@@ -32,6 +33,19 @@ export default () => ` + +

${escape(localize('welcomePage.noRecentFolders', "No recent folders"))}

+
++
++

code-server ${escape(localize('welcomePage.help', "Help"))}

++ ++
+
+

${escape(localize('welcomePage.help', "Help"))}

+
    +diff --git a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.css b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.css +index 738ce140c1af76ee0017c59cc883578e966f5348..80833b7023ed5795bb3de303b54ec08d9dab9b94 100644 +--- a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.css ++++ b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.css +@@ -94,7 +94,7 @@ + } + + .monaco-workbench .part.editor > .content .welcomePage .splash .section { +- margin-bottom: 5em; ++ margin-bottom: 3em; + } + + .monaco-workbench .part.editor > .content .welcomePage .splash ul { +diff --git a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts +index 4a61a79fe447e2aa238af568791bff1e0cec4d29..791b63342f476f1baba9d31b040d3ef589e3f70a 100644 +--- a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts ++++ b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts +@@ -328,7 +328,7 @@ class WelcomePage extends Disposable { + + const prodName = container.querySelector('.welcomePage .title .caption') as HTMLElement; + if (prodName) { +- prodName.textContent = this.productService.nameLong; ++ prodName.textContent = `code-server v${this.productService.codeServerVersion}` + } + + recentlyOpened.then(({ workspaces }) => { diff --git a/src/vs/workbench/electron-sandbox/sandbox.simpleservices.ts b/src/vs/workbench/electron-sandbox/sandbox.simpleservices.ts index ed4f26407391bd62219a9f8245a5cd63a7cb7488..92f26d1b082f80475cf76409a4569e948e9e0bd9 100644 --- a/src/vs/workbench/electron-sandbox/sandbox.simpleservices.ts