diff --git a/package.json b/package.json index b60412ef4..5a4a12f9d 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "lib": "lib" }, "devDependencies": { - "@github1s/vscode-web": "0.18.0", + "@github1s/vscode-web": "0.19.0", "@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/parser": "^5.40.1", "chokidar": "^3.5.3", diff --git a/tests/__tests__/index.test.ts b/tests/__tests__/index.test.ts index e7e692309..749b9f0ce 100644 --- a/tests/__tests__/index.test.ts +++ b/tests/__tests__/index.test.ts @@ -25,8 +25,6 @@ afterAll(async () => { beforeEach(async () => { page = await browser.newPage(); - await page.goto(`${BASE_URL}/conwnet/github1s`); - await page.waitForTimeout(3000); }); afterEach(async () => { diff --git a/vscode-web/.VERSION b/vscode-web/.VERSION index c91318a2f..ccbe32c01 100644 --- a/vscode-web/.VERSION +++ b/vscode-web/.VERSION @@ -1 +1 @@ -1.87.2 \ No newline at end of file +1.88.1 \ No newline at end of file diff --git a/vscode-web/package.json b/vscode-web/package.json index 79a70c502..fdc789566 100644 --- a/vscode-web/package.json +++ b/vscode-web/package.json @@ -1,6 +1,6 @@ { "name": "@github1s/vscode-web", - "version": "0.18.0", + "version": "0.19.0", "description": "VS Code web for GitHub1s", "author": "github1s", "license": "MIT", diff --git a/vscode-web/scripts/.patch b/vscode-web/scripts/.patch index 3129b8223..e35897c09 100644 --- a/vscode-web/scripts/.patch +++ b/vscode-web/scripts/.patch @@ -1,10 +1,10 @@ { "vs/code/browser/workbench/workbench.ts": "4d5caa66a9d8d5c862c4ee6a928c4e1cb7cc93fc481dc9c471245229be7323e1", - "vs/workbench/browser/parts/activitybar/activitybarPart.ts": "3b2d7f2be631cb5b2a37bbd5eaceae87833273fd7c3babc41cab180d6330b657", + "vs/workbench/browser/parts/activitybar/activitybarPart.ts": "f1f646360d161b62ac857698cfe4f1e2f63107c86f8100f630c8d704f15049f5", "vs/workbench/browser/parts/titlebar/media/titlebarpart.css": "253c6b6b1212d0ca80e1969959d3d09d0c1040f3bea3ad076f2708783bd14544", - "vs/workbench/browser/web.main.ts": "a1fb5bb77c9602358f4e25cf3413bf2f89cb31421de1fa64b797d815e30b3e9c", - "vs/workbench/contrib/files/browser/editors/fileEditorInput.ts": "b1c3f939b2f6182bd2bfb231a0fea0d19e7579fb6a37953ad5dada596337cbf2", - "vs/workbench/contrib/webview/browser/pre/index.html": "a1942558e310b15a1d2387f33cd00787d2e507332df16bbb258ad644e4c62dbb", + "vs/workbench/browser/web.main.ts": "40def654a6762f4d7393e65230d613379d70a4f21829b4882a911e8397fe1b58", + "vs/workbench/contrib/files/browser/editors/fileEditorInput.ts": "86663454cc80d8fb63900ffd88f826ad971071976e54c2b9dfbbcab17bd6dc49", + "vs/workbench/contrib/webview/browser/pre/index.html": "7bcd1298e5cc21a5526e89954c09c225a33a22713f840a7aa172305b517d11d7", "vs/workbench/services/extensionManagement/browser/builtinExtensionsScannerService.ts": "8cbb23b36f1e35436c0cd53b10f6ba2d3a51c92cee297d1fd956b9dcd6e33b1a", "vs/workbench/services/label/common/labelService.ts": "73237cce0f9496151ea8ae5079676bbdfa15ce49de9b05621d39fcd04e9c1f0d", "vs/workbench/services/textfile/browser/textFileService.ts": "9d0831d6f49ad0ac8482a941e1b3b36b58e7a9db2fedc6e66ba94499719617e9" diff --git a/vscode-web/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/vscode-web/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index 6843e380a..e22a65aba 100644 --- a/vscode-web/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/vscode-web/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -404,26 +404,26 @@ export class ActivityBarCompositeBar extends PaneCompositeBar { registerAction2(class extends Action2 { constructor() { super({ - id: 'workbench.action.activityBarLocation.side', + id: 'workbench.action.activityBarLocation.default', title: { - ...localize2('positionActivityBarSide', 'Move Activity Bar to Side'), - mnemonicTitle: localize({ key: 'miSideActivityBar', comment: ['&& denotes a mnemonic'] }, "&&Side"), + ...localize2('positionActivityBarDefault', 'Move Activity Bar to Side'), + mnemonicTitle: localize({ key: 'miDefaultActivityBar', comment: ['&& denotes a mnemonic'] }, "&&Default"), }, - shortTitle: localize('side', "Side"), + shortTitle: localize('default', "Default"), category: Categories.View, - toggled: ContextKeyExpr.equals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.SIDE), + toggled: ContextKeyExpr.equals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.DEFAULT), menu: [{ id: MenuId.ActivityBarPositionMenu, order: 1 }, { id: MenuId.CommandPalette, - when: ContextKeyExpr.notEquals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.SIDE), + when: ContextKeyExpr.notEquals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.DEFAULT), }] }); } run(accessor: ServicesAccessor): void { const configurationService = accessor.get(IConfigurationService); - configurationService.updateValue(LayoutSettings.ACTIVITY_BAR_LOCATION, ActivityBarPosition.SIDE); + configurationService.updateValue(LayoutSettings.ACTIVITY_BAR_LOCATION, ActivityBarPosition.DEFAULT); } }); @@ -453,6 +453,32 @@ registerAction2(class extends Action2 { } }); +registerAction2(class extends Action2 { + constructor() { + super({ + id: 'workbench.action.activityBarLocation.bottom', + title: { + ...localize2('positionActivityBarBottom', 'Move Activity Bar to Bottom'), + mnemonicTitle: localize({ key: 'miBottomActivityBar', comment: ['&& denotes a mnemonic'] }, "&&Bottom"), + }, + shortTitle: localize('bottom', "Bottom"), + category: Categories.View, + toggled: ContextKeyExpr.equals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.BOTTOM), + menu: [{ + id: MenuId.ActivityBarPositionMenu, + order: 3 + }, { + id: MenuId.CommandPalette, + when: ContextKeyExpr.notEquals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.BOTTOM), + }] + }); + } + run(accessor: ServicesAccessor): void { + const configurationService = accessor.get(IConfigurationService); + configurationService.updateValue(LayoutSettings.ACTIVITY_BAR_LOCATION, ActivityBarPosition.BOTTOM); + } +}); + registerAction2(class extends Action2 { constructor() { super({ @@ -466,7 +492,7 @@ registerAction2(class extends Action2 { toggled: ContextKeyExpr.equals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.HIDDEN), menu: [{ id: MenuId.ActivityBarPositionMenu, - order: 3 + order: 4 }, { id: MenuId.CommandPalette, when: ContextKeyExpr.notEquals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.HIDDEN), diff --git a/vscode-web/src/vs/workbench/browser/web.main.ts b/vscode-web/src/vs/workbench/browser/web.main.ts index 519c33ca9..a08762c20 100644 --- a/vscode-web/src/vs/workbench/browser/web.main.ts +++ b/vscode-web/src/vs/workbench/browser/web.main.ts @@ -284,11 +284,11 @@ export class BrowserMain extends Disposable { // Register them early because they are needed for the profiles initialization await this.registerIndexedDBFileSystemProviders(environmentService, fileService, logService, loggerService, logsPath); - // Remote + const connectionToken = environmentService.options.connectionToken || getCookieValue(connectionTokenCookieName); const remoteResourceLoader = this.configuration.remoteResourceProvider ? new BrowserRemoteResourceLoader(fileService, this.configuration.remoteResourceProvider) : undefined; const resourceUriProvider = this.configuration.resourceUriProvider ?? remoteResourceLoader?.getResourceUriProvider(); - const remoteAuthorityResolverService = new RemoteAuthorityResolverService(!environmentService.expectsResolverExtension, connectionToken, resourceUriProvider, productService, logService); + const remoteAuthorityResolverService = new RemoteAuthorityResolverService(!environmentService.expectsResolverExtension, connectionToken, resourceUriProvider, this.configuration.serverBasePath, productService, logService); serviceCollection.set(IRemoteAuthorityResolverService, remoteAuthorityResolverService); // Signing @@ -476,7 +476,7 @@ export class BrowserMain extends Disposable { } private registerDeveloperActions(provider: IndexedDBFileSystemProvider): void { - registerAction2(class ResetUserDataAction extends Action2 { + this._register(registerAction2(class ResetUserDataAction extends Action2 { constructor() { super({ id: 'workbench.action.resetUserData', @@ -511,7 +511,7 @@ export class BrowserMain extends Disposable { hostService.reload(); } - }); + })); } private async createStorageService(workspace: IAnyWorkspaceIdentifier, logService: ILogService, userDataProfileService: IUserDataProfileService): Promise { diff --git a/vscode-web/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.ts b/vscode-web/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.ts index 23d26134c..ed4a58d03 100644 --- a/vscode-web/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.ts +++ b/vscode-web/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.ts @@ -25,6 +25,7 @@ import { createTextBufferFactory } from 'vs/editor/common/model/textModel'; import { IPathService } from 'vs/workbench/services/path/common/pathService'; import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfiguration'; import { IMarkdownString } from 'vs/base/common/htmlContent'; +import { ICustomEditorLabelService } from 'vs/workbench/services/editor/common/customEditorLabelService'; const enum ForceOpenAs { None, @@ -98,9 +99,10 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements @IFilesConfigurationService filesConfigurationService: IFilesConfigurationService, @IEditorService editorService: IEditorService, @IPathService private readonly pathService: IPathService, - @ITextResourceConfigurationService textResourceConfigurationService: ITextResourceConfigurationService + @ITextResourceConfigurationService textResourceConfigurationService: ITextResourceConfigurationService, + @ICustomEditorLabelService customEditorLabelService: ICustomEditorLabelService ) { - super(resource, preferredResource, editorService, textFileService, labelService, fileService, filesConfigurationService, textResourceConfigurationService); + super(resource, preferredResource, editorService, textFileService, labelService, fileService, filesConfigurationService, textResourceConfigurationService, customEditorLabelService); this.model = this.textFileService.files.get(resource); diff --git a/vscode-web/src/vs/workbench/contrib/webview/browser/pre/index.html b/vscode-web/src/vs/workbench/contrib/webview/browser/pre/index.html index f89fce146..fa3a9982e 100644 --- a/vscode-web/src/vs/workbench/contrib/webview/browser/pre/index.html +++ b/vscode-web/src/vs/workbench/contrib/webview/browser/pre/index.html @@ -49,7 +49,8 @@ const interval = 250; let isFocused = document.hasFocus(); setInterval(() => { - const isCurrentlyFocused = document.hasFocus(); + const target = getActiveFrame(); + const isCurrentlyFocused = document.hasFocus() || !!(target && target.contentDocument && target.contentDocument.body.classList.contains('vscode-context-menu-visible')); if (isCurrentlyFocused === isFocused) { return; } @@ -131,6 +132,10 @@ border-radius: 4px; } + pre code { + padding: 0; + } + blockquote { background: var(--vscode-textBlockQuote-background); border-color: var(--vscode-textBlockQuote-border); diff --git a/yarn.lock b/yarn.lock index 4a32d6756..ce9d02e73 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31,10 +31,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@github1s/vscode-web@0.18.0": - version "0.18.0" - resolved "https://registry.yarnpkg.com/@github1s/vscode-web/-/vscode-web-0.18.0.tgz#8e133b8398629593c1a97fb0b07b2ef691b8eec8" - integrity sha512-Caa968uo0n1qQe/SBRGkDNbx0gtZBQSJw5MN1ub2bdXi+320E2bi5+5m3+YRz+FSADIg6XpXs8ODi/fS2LxPqQ== +"@github1s/vscode-web@0.19.0": + version "0.19.0" + resolved "https://registry.yarnpkg.com/@github1s/vscode-web/-/vscode-web-0.19.0.tgz#fd7aa91366379ad791bceb14506a49ac88dc9dd6" + integrity sha512-l/QrTA6e2ejaLZQSPgC1x32A1a+zeqUP+SdhUdPocjptjDrS3I+NwL8L2+jPD2XLI+Mg59Z62ABbNuHFiWCSNA== dependencies: "@vscode/iconv-lite-umd" "0.7.0" "@vscode/vscode-languagedetection" "1.0.21"