From f22a2b814337ed8eb6b91626701ab8f0f966fb45 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Thu, 12 Sep 2019 16:07:23 -0700 Subject: [PATCH 1/7] Update Octicons: sync icon and spin speed --- .../octicons/octicons-animations.css | 4 ++-- .../ui/octiconLabel/octicons/octicons2.css | 2 +- .../ui/octiconLabel/octicons/octicons2.ttf | Bin 35200 -> 35196 bytes 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/base/browser/ui/octiconLabel/octicons/octicons-animations.css b/src/vs/base/browser/ui/octiconLabel/octicons/octicons-animations.css index 798a231b931..0176b2f6be7 100644 --- a/src/vs/base/browser/ui/octiconLabel/octicons/octicons-animations.css +++ b/src/vs/base/browser/ui/octiconLabel/octicons/octicons-animations.css @@ -10,5 +10,5 @@ } .octicon-animation-spin { - animation: octicon-spin 2s linear infinite; -} \ No newline at end of file + animation: octicon-spin 1.5s linear infinite; +} diff --git a/src/vs/base/browser/ui/octiconLabel/octicons/octicons2.css b/src/vs/base/browser/ui/octiconLabel/octicons/octicons2.css index be9d999fc3d..7e86f3a74ca 100644 --- a/src/vs/base/browser/ui/octiconLabel/octicons/octicons2.css +++ b/src/vs/base/browser/ui/octiconLabel/octicons/octicons2.css @@ -1,6 +1,6 @@ @font-face { font-family: "octicons2"; - src: url("./octicons2.ttf?999646dfb2baa29479ee3c93bf9c964e") format("truetype"); + src: url("./octicons2.ttf?90586c9ac0aa804395e9c9c0d15d1094") format("truetype"); } .octicon, .mega-octicon { diff --git a/src/vs/base/browser/ui/octiconLabel/octicons/octicons2.ttf b/src/vs/base/browser/ui/octiconLabel/octicons/octicons2.ttf index 3d587386cf32e7956d4039b37bd6ee2a9be0d423..793aba95d5f9bc54ee6a037e5f5f86da874ea38d 100644 GIT binary patch delta 381 zcmZpe%=Bjx(*y^X#Aa6w1_ogd28Qez8L5dWVlGY&3=9kpfY>YpD8Meo{1(XG1H>vB zxg`~+Cj9@;z`*!~fr05kPJVJ?bfNvEi7m?N4}bzn1^LA#?O)D4WMF7yVPN1WWng4r zU^e;h10-L7v@t)Ocuq>`6LXYZJipCX25#mTKw}whE~qbn(f|MdcVm9KnTt_SNc)DN znPGzA2Ez+ROh$4>O-4_Qjf~5TJB();uQA?d!e$a@^2F54G{6y)L!u*N#E191% z&0vsXFa~;vUESPRoLyaxQC!T}$lT0aoQ<7LSxH?@T}@S;U7pcgogK(jS5snVV;46w zH!~8KW32TtY}Ri!@MH^fbqkE}_S7&o3XM!p4huFiVOr&@-(=9F@5N$b6dZOUEZEps z%guASyIUxufUiMgtG-u2tD3U9p02lAxUq?Weo%0|pMDD?P(yM^kb$A0L6EAOrj~|A K*XG|Pts($S7j2mU delta 385 zcmew}iK$^S(*y?>@8<_>7#M^-7#OnWWTYmhh?zV|VPIf*0K{e)Kmm3E=C?rh9w1i9 z$StWjHR1n%1_s6_3=B*Ua`KZCqucFQOl(nB2MH(@wM%fuWIufq|oxfsuiM z+2p?ukbD8s#(aC?IVmMsNBL>-{5D@1xS3x7jb*qw_d*kl{{R2K8}seWT#SN3+P4fX z43i8u8D27CF;XyUF?wcfVq9U|Wjx1to$&z^4wD3vXQmdWd8S)T&uw-S=1;6Y#C)4+ z2ZI!YG0=f(>Uzw4jO^-mjK)Uda*X0);^yM)%IfB^q2JhIz}{rw9`0)wEhfas7~pB( Date: Thu, 12 Sep 2019 16:07:02 -0700 Subject: [PATCH 2/7] Make sure asWebviewUri also handles replacing commit --- src/vs/workbench/api/common/extHostWebview.ts | 4 +++- src/vs/workbench/api/common/shared/webview.ts | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/api/common/extHostWebview.ts b/src/vs/workbench/api/common/extHostWebview.ts index 62e4407358a..2ba9d4eb252 100644 --- a/src/vs/workbench/api/common/extHostWebview.ts +++ b/src/vs/workbench/api/common/extHostWebview.ts @@ -40,7 +40,9 @@ export class ExtHostWebview implements vscode.Webview { } public get cspSource(): string { - return this._initData.webviewCspSource.replace('{{uuid}}', this._handle); + return this._initData.webviewCspSource + .replace('{{uuid}}', this._handle) + .replace('{{commit}}', this._initData.commit || '211fa02efe8c041fd7baa8ec3dce199d5185aa44'); } public get html(): string { diff --git a/src/vs/workbench/api/common/shared/webview.ts b/src/vs/workbench/api/common/shared/webview.ts index 9740cd21a6f..dc78561bff0 100644 --- a/src/vs/workbench/api/common/shared/webview.ts +++ b/src/vs/workbench/api/common/shared/webview.ts @@ -7,6 +7,7 @@ import { URI } from 'vs/base/common/uri'; import * as vscode from 'vscode'; export interface WebviewInitData { + readonly commit?: string; readonly webviewResourceRoot: string; readonly webviewCspSource: string; } @@ -14,11 +15,11 @@ export interface WebviewInitData { export function asWebviewUri( initData: WebviewInitData, uuid: string, - resource: vscode.Uri + resource: vscode.Uri, ): vscode.Uri { const uri = initData.webviewResourceRoot + .replace('{{commit}}', initData.commit || '211fa02efe8c041fd7baa8ec3dce199d5185aa44') .replace('{{resource}}', resource.toString().replace(/^\S+?:/, '')) .replace('{{uuid}}', uuid); - return URI.parse(uri); } From 5d828fdcc8e040cac7c71495871638d7f71ebf94 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 12 Sep 2019 16:31:41 -0700 Subject: [PATCH 3/7] Remove WEBVIEW_ENDPOINT workaround --- src/vs/code/browser/workbench/workbench-dev.html | 2 +- src/vs/code/browser/workbench/workbench.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/code/browser/workbench/workbench-dev.html b/src/vs/code/browser/workbench/workbench-dev.html index 68df0aa91e6..9fb0fab5a1a 100644 --- a/src/vs/code/browser/workbench/workbench-dev.html +++ b/src/vs/code/browser/workbench/workbench-dev.html @@ -16,7 +16,7 @@ media-src 'none'; script-src 'self' https://az416426.vo.msecnd.net 'unsafe-eval' https: 'sha256-4DqvCTjCHj2KW4QxC/Yt6uBwMRyYiEg7kOoykSEkonQ=' 'sha256-meDZW3XhN5JmdjFUrWGhTouRKBiWYtXHltaKnqn/WMo='; child-src 'self'; - frame-src 'self' {{WEBVIEW_ENDPOINT}} https://*.vscode-webview-test.com; + frame-src 'self' https://*.vscode-webview-test.com; worker-src 'self'; style-src 'self' 'unsafe-inline'; connect-src 'self' ws: wss: https:; diff --git a/src/vs/code/browser/workbench/workbench.html b/src/vs/code/browser/workbench/workbench.html index 7d0ca33dea2..97d78ce7f9e 100644 --- a/src/vs/code/browser/workbench/workbench.html +++ b/src/vs/code/browser/workbench/workbench.html @@ -16,7 +16,7 @@ media-src 'none'; script-src 'self' https://az416426.vo.msecnd.net 'unsafe-eval' https: 'sha256-4DqvCTjCHj2KW4QxC/Yt6uBwMRyYiEg7kOoykSEkonQ='; child-src 'self'; - frame-src 'self' {{WEBVIEW_ENDPOINT}} https://*.vscode-webview-test.com; + frame-src 'self' https://*.vscode-webview-test.com; worker-src 'self'; style-src 'self' 'unsafe-inline'; connect-src 'self' ws: wss: https:; From e1c8327c59ab7e98d3cb2106af5734d18cda21a7 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 12 Sep 2019 16:33:41 -0700 Subject: [PATCH 4/7] Always use external endpoint on web --- .../contrib/webview/browser/webviewElement.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewElement.ts b/src/vs/workbench/contrib/webview/browser/webviewElement.ts index d559fec568b..a11ff25d7b9 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewElement.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewElement.ts @@ -19,6 +19,7 @@ import { WebviewPortMappingManager } from 'vs/workbench/contrib/webview/common/p import { loadLocalResource } from 'vs/workbench/contrib/webview/common/resourceLoader'; import { getWebviewThemeData } from 'vs/workbench/contrib/webview/common/themeing'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; +import { isWeb } from 'vs/base/common/platform'; interface WebviewContent { readonly html: string; @@ -47,9 +48,7 @@ export class IFrameWebview extends Disposable implements Webview { @IConfigurationService private readonly _configurationService: IConfigurationService, ) { super(); - const useExternalEndpoint = this._configurationService.getValue('webview.experimental.useExternalEndpoint'); - - if (!useExternalEndpoint && (!environmentService.options || typeof environmentService.options.webviewEndpoint !== 'string')) { + if (!this.useExternalEndpoint && (!environmentService.options || typeof environmentService.options.webviewEndpoint !== 'string')) { throw new Error('To use iframe based webviews, you must configure `environmentService.webviewEndpoint`'); } @@ -155,7 +154,7 @@ export class IFrameWebview extends Disposable implements Webview { } private get externalEndpoint(): string | undefined { - const useExternalEndpoint = this._configurationService.getValue('webview.experimental.useExternalEndpoint'); + const useExternalEndpoint = this.useExternalEndpoint; if (!useExternalEndpoint) { return undefined; } @@ -163,6 +162,10 @@ export class IFrameWebview extends Disposable implements Webview { return `https://{{uuid}}.vscode-webview-test.com/${commit}`; } + private get useExternalEndpoint(): boolean { + return isWeb || this._configurationService.getValue('webview.experimental.useExternalEndpoint'); + } + public mountTo(parent: HTMLElement) { if (this.element) { parent.appendChild(this.element); From 83e4713fe83a5a7c292ac213dc079cea8afce779 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 12 Sep 2019 16:39:47 -0700 Subject: [PATCH 5/7] distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b04fc67b152..4ef9cc3e4f6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.39.0", - "distro": "bdaae34df8cacb0a6c48750e611bc4cd122f8df4", + "distro": "bea7d39067de4f7dcb65ac20c1a76000304ad939", "author": { "name": "Microsoft Corporation" }, From 700780d927135cd78c1c653da63b8fd896c72bee Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Thu, 12 Sep 2019 16:40:57 -0700 Subject: [PATCH 6/7] Set default colors for 'minimap.selectionHighlight' in other built in themes --- extensions/theme-abyss/themes/abyss-color-theme.json | 6 +++++- .../theme-kimbie-dark/themes/kimbie-dark-color-theme.json | 3 ++- .../themes/dimmed-monokai-color-theme.json | 3 ++- extensions/theme-monokai/themes/monokai-color-theme.json | 1 + .../theme-quietlight/themes/quietlight-color-theme.json | 1 + extensions/theme-red/themes/Red-color-theme.json | 3 ++- .../themes/solarized-dark-color-theme.json | 1 + .../themes/solarized-light-color-theme.json | 3 ++- .../themes/tomorrow-night-blue-theme.json | 3 ++- 9 files changed, 18 insertions(+), 6 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index 43a3ae648dc..18c8235f79c 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -358,6 +358,10 @@ "diffEditor.removedTextBackground": "#892F4688", // "diffEditor.removedTextBorder": "", + + // Editor: Minimap + "minimap.selectionHighlight": "#750000", + // Workbench: Title "titleBar.activeBackground": "#10192c", // "titleBar.activeForeground": "", @@ -439,4 +443,4 @@ "terminal.ansiBrightCyan": "#78ffff", "terminal.ansiBrightWhite": "#ffffff" } -} \ No newline at end of file +} diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index 4b0eb5bdfcf..d3a76435f61 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -17,6 +17,7 @@ "inputOption.activeBorder": "#a57a4c", "selection.background": "#84613daa", "editor.selectionBackground": "#84613daa", + "minimap.selectionHighlight": "#84613daa", "editorWidget.background": "#131510", "editorHoverWidget.background": "#221a14", "editorGroupHeader.tabsBackground": "#131510", @@ -398,4 +399,4 @@ } } ] -} \ No newline at end of file +} diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json index 5f5e5cff916..0a5851352b8 100644 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -11,6 +11,7 @@ "editor.background": "#1e1e1e", "editor.foreground": "#c5c8c6", "editor.selectionBackground": "#676b7180", + "minimap.selectionHighlight": "#676b7180", "editor.selectionHighlightBackground": "#575b6180", "editor.lineHighlightBackground": "#303030", "editorLineNumber.activeForeground": "#949494", @@ -588,4 +589,4 @@ } } ] -} \ No newline at end of file +} diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index c16fa3c5575..ebff3a44985 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -23,6 +23,7 @@ "selection.background": "#ccccc7", "editor.selectionHighlightBackground": "#575b6180", "editor.selectionBackground": "#878b9180", + "minimap.selectionHighlight": "#878b9180", "editor.wordHighlightBackground": "#4a4a7680", "editor.wordHighlightStrongBackground": "#6a6a9680", "editor.lineHighlightBackground": "#3e3d32", diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index 38681612b42..2b8ab7382a1 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -499,6 +499,7 @@ "editor.lineHighlightBackground": "#E4F6D4", "editorLineNumber.activeForeground": "#9769dc", "editor.selectionBackground": "#C9D0D9", + "minimap.selectionHighlight": "#C9D0D9", "tab.modifiedBorder": "#f1897f", "panel.background": "#F5F5F5", "sideBar.background": "#F2F2F2", diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index 18e5786a8f3..309a4273fbd 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -21,6 +21,7 @@ "editor.foreground": "#F8F8F8", "editorWhitespace.foreground": "#c10000", "editor.selectionBackground": "#750000", + "minimap.selectionHighlight": "#750000", "editorLineNumber.foreground": "#ff777788", "editorLineNumber.activeForeground": "#ffbbbb88", "editorWidget.background": "#300000", @@ -411,4 +412,4 @@ } } ] -} \ No newline at end of file +} diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index f2ee483bea4..0d6851d5318 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -359,6 +359,7 @@ "editor.lineHighlightBackground": "#073642", "editorLineNumber.activeForeground": "#949494", "editor.selectionBackground": "#274642", + "minimap.selectionHighlight": "#274642", "editorIndentGuide.background": "#93A1A180", "editorIndentGuide.activeBackground": "#C3E1E180", "editorHoverWidget.background": "#004052", diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index 8cc7e74a779..b7020f8e7c5 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -350,6 +350,7 @@ "editorWhitespace.foreground": "#586E7580", "editor.lineHighlightBackground": "#EEE8D5", "editor.selectionBackground": "#EEE8D5", + "minimap.selectionHighlight": "#EEE8D5", "editorIndentGuide.background": "#586E7580", "editorIndentGuide.activeBackground": "#081E2580", "editorHoverWidget.background": "#CCC4B0", @@ -486,4 +487,4 @@ // Interactive Playground "walkThrough.embeddedEditorBackground": "#00000014" } -} \ No newline at end of file +} diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index 6c985d1ea5e..f8c47a29e7b 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -14,6 +14,7 @@ "editor.background": "#002451", "editor.foreground": "#ffffff", "editor.selectionBackground": "#003f8e", + "minimap.selectionHighlight": "#003f8e", "editor.lineHighlightBackground": "#00346e", "editorLineNumber.activeForeground": "#949494", "editorCursor.foreground": "#ffffff", @@ -255,4 +256,4 @@ } } ] -} \ No newline at end of file +} From 67e37803b7f3f59e945ff61f55d756b9ee28ca62 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 12 Sep 2019 17:25:36 -0700 Subject: [PATCH 7/7] Add telemtry property for local TS version We are interested in understanding which TS versions user have enabled in their workspaces, and how widely these diverge from these the workspace version --- .../src/typescriptServiceClient.ts | 10 ++++++---- .../src/utils/telemetry.ts | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/extensions/typescript-language-features/src/typescriptServiceClient.ts b/extensions/typescript-language-features/src/typescriptServiceClient.ts index a74b0df59b3..d8f8921d7db 100644 --- a/extensions/typescript-language-features/src/typescriptServiceClient.ts +++ b/extensions/typescript-language-features/src/typescriptServiceClient.ts @@ -245,7 +245,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType this.logger.error(message, data); } - private logTelemetry(eventName: string, properties?: { [prop: string]: string }) { + private logTelemetry(eventName: string, properties?: { readonly [prop: string]: string }) { this.telemetryReporter.logTelemetry(eventName, properties); } @@ -287,7 +287,6 @@ export default class TypeScriptServiceClient extends Disposable implements IType const apiVersion = this.versionPicker.currentVersion.apiVersion || API.defaultVersion; this.onDidChangeTypeScriptVersion(currentVersion); - let mytoken = ++this.token; const handle = this.typescriptServerSpawner.spawn(currentVersion, this.configuration, this.pluginManager); this.serverState = new ServerState.Running(handle, apiVersion, undefined, true); @@ -297,10 +296,13 @@ export default class TypeScriptServiceClient extends Disposable implements IType "tsserver.spawned" : { "${include}": [ "${TypeScriptCommonProperties}" - ] + ], + "localTypeScriptVersion": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } } */ - this.logTelemetry('tsserver.spawned'); + this.logTelemetry('tsserver.spawned', { + localTypeScriptVersion: this.versionProvider.localVersion ? this.versionProvider.localVersion.versionString : '', + }); handle.onError((err: Error) => { if (this.token !== mytoken) { diff --git a/extensions/typescript-language-features/src/utils/telemetry.ts b/extensions/typescript-language-features/src/utils/telemetry.ts index fe6ea8d292a..e17e0188e6d 100644 --- a/extensions/typescript-language-features/src/utils/telemetry.ts +++ b/extensions/typescript-language-features/src/utils/telemetry.ts @@ -14,7 +14,7 @@ interface PackageInfo { } export default interface TelemetryReporter { - logTelemetry(eventName: string, properties?: { [prop: string]: string }): void; + logTelemetry(eventName: string, properties?: { readonly [prop: string]: string }): void; dispose(): void; }