Skip to content

Commit

Permalink
Merge pull request #572 from conwnet/master
Browse files Browse the repository at this point in the history
release 0.24.0
  • Loading branch information
conwnet authored Apr 30, 2024
2 parents ae77657 + d13e12b commit 1c78700
Show file tree
Hide file tree
Showing 18 changed files with 106 additions and 70 deletions.
6 changes: 3 additions & 3 deletions api/github-auth-callback/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1135,9 +1135,9 @@ strip-ansi@^6.0.1:
ansi-regex "^5.0.1"

tar@^6.1.11:
version "6.2.0"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.0.tgz#b14ce49a79cb1cd23bc9b016302dea5474493f73"
integrity sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==
version "6.2.1"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a"
integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
Expand Down
6 changes: 3 additions & 3 deletions api/gitlab-auth-callback/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1130,9 +1130,9 @@ strip-ansi@^6.0.1:
ansi-regex "^5.0.1"

tar@^6.1.11:
version "6.2.0"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.0.tgz#b14ce49a79cb1cd23bc9b016302dea5474493f73"
integrity sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==
version "6.2.1"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a"
integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
Expand Down
6 changes: 3 additions & 3 deletions api/vscode-unpkg/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1130,9 +1130,9 @@ strip-ansi@^6.0.1:
ansi-regex "^5.0.1"

tar@^6.1.11:
version "6.2.0"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.0.tgz#b14ce49a79cb1cd23bc9b016302dea5474493f73"
integrity sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==
version "6.2.1"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a"
integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion extensions/github1s/src/adapters/github1s/data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const getPullState = (pull: { state: string; merged_at: string | null }): CodeRe
return CodeReviewState.Merged;
}
// current pull is closed
return CodeReviewState.Merged;
return CodeReviewState.Closed;
};

const sourcegraphDataSource = SourcegraphDataSource.getInstance('github');
Expand Down
2 changes: 1 addition & 1 deletion extensions/github1s/src/adapters/gitlab1s/data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const getMergeRequestState = (mergeRequest: { state: string; merged_at: string |
return CodeReviewState.Merged;
}
// current merge is closed
return CodeReviewState.Merged;
return CodeReviewState.Closed;
};

const resolveComputeAge = (timestamps: number[], ageLimit = 10) => {
Expand Down
2 changes: 1 addition & 1 deletion extensions/github1s/src/commands/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const commandOpenFilePreviousRevision = async (fileUri: vscode.Uri) => {

const repository = Repository.getInstance(fileUri.scheme, repo);
const leftCommit = await repository.getPreviousCommit(rightCommitSha, fileUri.path.slice(1));
// if we can't find previous commit, use the the `emptyFileUri` as the leftFileUri
// if we can't find previous commit, use the `emptyFileUri` as the leftFileUri
const leftFileUri = leftCommit ? rightFileUri.with({ authority: `${repo}+${leftCommit.sha}` }) : emptyFileUri;

const changedStatus = leftCommit ? FileChangeStatus.Modified : FileChangeStatus.Added;
Expand Down
2 changes: 1 addition & 1 deletion extensions/github1s/src/providers/file-system/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export class GitHub1sFileSystemProvider implements FileSystemProvider, Disposabl
readFile = reuseable(
async (uri: Uri): Promise<Uint8Array> => {
let { scheme, authority, path } = uri;
// if `authority` is same with currnet, try to find it with `this.lookupAsFile`,
// if `authority` is same with current, try to find it with `this.lookupAsFile`,
// we can't use `router.getAuthority()` directly because this file may be in submodule
if (authority === workspace.workspaceFolders?.[0].uri.authority) {
const file = (await this.lookupAsFile(uri, false))!;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const NOTIFICATION_STORAGE_KEY = 'GITHUB1S_NOTIFICATION';
// Change this if a new notification should be shown
const NOTIFICATION_STORAGE_VALUE = '20210212';

/*** begin notificaton block ***/
/*** begin notification block ***/
export const renderNotification = (platform: string) => {
// If user has confirmed the notification and checked `don't show me again`, ignore it
if (window.localStorage.getItem(NOTIFICATION_STORAGE_KEY) === NOTIFICATION_STORAGE_VALUE) {
Expand Down
2 changes: 0 additions & 2 deletions tests/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion vscode-web/.VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.87.2
1.88.1
2 changes: 1 addition & 1 deletion vscode-web/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 4 additions & 4 deletions vscode-web/scripts/.patch
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});

Expand Down Expand Up @@ -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({
Expand All @@ -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),
Expand Down
8 changes: 4 additions & 4 deletions vscode-web/src/vs/workbench/browser/web.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -511,7 +511,7 @@ export class BrowserMain extends Disposable {

hostService.reload();
}
});
}));
}

private async createStorageService(workspace: IAnyWorkspaceIdentifier, logService: ILogService, userDataProfileService: IUserDataProfileService): Promise<IStorageService> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -131,6 +132,10 @@
border-radius: 4px;
}
pre code {
padding: 0;
}
blockquote {
background: var(--vscode-textBlockQuote-background);
border-color: var(--vscode-textBlockQuote-border);
Expand Down
Loading

0 comments on commit 1c78700

Please sign in to comment.