Skip to content

Commit

Permalink
Merge pull request #529 from conwnet/master
Browse files Browse the repository at this point in the history
release 0.18.0
  • Loading branch information
conwnet authored Sep 26, 2023
2 parents 2cb6fc5 + 7a769bd commit 597ca7f
Show file tree
Hide file tree
Showing 27 changed files with 1,068 additions and 156 deletions.
8 changes: 4 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# [Choice] Node.js version: 14, 12, 10
ARG VARIANT="14-buster"
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
FROM mcr.microsoft.com/devcontainers/typescript-node:${VARIANT}

# same package list from github1s/scripts/preinstall.sh
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
Expand All @@ -13,7 +13,7 @@ RUN mkdir -p /opt/dev \
&& cd /opt/dev \
&& git clone https://github.com/emscripten-core/emsdk.git \
&& cd /opt/dev/emsdk \
&& ./emsdk install 2.0.6 \
&& ./emsdk activate 2.0.6
&& ./emsdk install 3.1.21 \
&& ./emsdk activate 3.1.21

ENV PATH="/opt/dev/emsdk:/opt/dev/emsdk/node/12.9.1_64bit/bin:/opt/dev/emsdk/upstream/emscripten:${PATH}"
ENV PATH="/opt/dev/emsdk:/opt/dev/emsdk/node/14.18.2_64bit/bin:/opt/dev/emsdk/upstream/emscripten:${PATH}"
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 10, 12, 14
"args": {
"VARIANT": "12"
"VARIANT": "20-bullseye"
}
},

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
node-version: [16.x, 18.x]
node-version: [18.x]

runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-wtih-vscode-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
node-version: [16.x]
node-version: [18.x]

runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion extensions/github1s/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@
"@apollo/client": "^3.5.10",
"@octokit/core": "^3.6.0",
"dayjs": "^1.11.1",
"graphql": "^16.3.0",
"graphql": "^16.8.1",
"history": "^5.3.0",
"js-base64": "^3.7.2",
"json-stable-stringify": "^1.0.1",
Expand Down
18 changes: 0 additions & 18 deletions extensions/github1s/src/adapters/ossinsight/data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,6 @@ export class OSSInsightDataSource extends DataSource {
type: FileType.Directory,
name: '',
children: [
{
type: FileType.Directory,
name: '.vscode',
children: [
{
type: FileType.File,
name: 'settings.json',
content: () =>
JSON.stringify({
'files.exclude': { '.vscode': true },
'markdown.preview.doubleClickToSwitchToEditor': false,
'workbench.editorAssociations': {
'*.md': 'vscode.markdown.preview.editor',
},
}),
},
],
},
{
type: FileType.Directory,
name: 'collections',
Expand Down
8 changes: 4 additions & 4 deletions extensions/github1s/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -961,10 +961,10 @@ graphql-tag@^2.12.6:
dependencies:
tslib "^2.1.0"

graphql@^16.3.0:
version "16.4.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.4.0.tgz#bb10b1b4683045dedcb67000eb4ad134a36c59e6"
integrity sha512-tYDNcRvKCcfHREZYje3v33NSrSD/ZpbWWdPtBtUUuXx9NCo/2QDxYzNqCnMvfsrnbwRpEHMovVrPu/ERoLrIRg==
graphql@^16.8.1:
version "16.8.1"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07"
integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==

has-bigints@^1.0.1, has-bigints@^1.0.2:
version "1.0.2"
Expand Down
4 changes: 2 additions & 2 deletions 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.12.0",
"@github1s/vscode-web": "0.13.0",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"chokidar": "^3.5.3",
Expand All @@ -16,7 +16,7 @@
"css-loader": "^6.7.3",
"eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jsdoc": "^39.3.14",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-prettier": "^4.2.1",
"file-loader": "^6.2.0",
"fs-extra": "^10.1.0",
Expand Down
2 changes: 2 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const createConfigurationDefaults = (disableSomeAnyCodeFeatures: boolean) => {
'workbench.colorTheme': 'Default Dark+',
'telemetry.telemetryLevel': 'off',
'workbench.startupEditor': 'readme',
'workbench.editorAssociations': { '*.md': 'vscode.markdown.preview.editor' },
'markdown.preview.doubleClickToSwitchToEditor': false,
} as Record<string, any>;

// disable some anycode features when we can use sourcegraph instead
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion tests/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ it('should load successfully', async () => {

it('should open file correctly', async () => {
await page.goto(`${BASE_URL}/conwnet/github1s`);
await page.waitForTimeout(3000);
await page.click('[title="~/tsconfig.json"]');
await page.click('[data-resource-name="tsconfig.json"]');
await page.waitForTimeout(3000);
Expand All @@ -76,7 +77,7 @@ it('should show Commit files', async () => {
await page.goto(`${BASE_URL}/conwnet/github1s/commit/ecd252fa54de41b1cb622ff5a1f8a1b715d3b621`);
await page.waitForSelector('.monaco-action-bar.vertical ul.actions-container[aria-label="Active View Switcher"]');
await page.press('body', 'Control+Shift+G');
await page.waitForTimeout(3000);
await page.waitForTimeout(6000);

const container = await page.$('[id="workbench.parts.sidebar"]');
let image = await container?.screenshot();
Expand Down
2 changes: 1 addition & 1 deletion vscode-web/.VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.81.1
1.82.2
14 changes: 8 additions & 6 deletions vscode-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@github1s/vscode-web",
"version": "0.12.0",
"version": "0.13.0",
"description": "VS Code web for GitHub1s",
"author": "github1s",
"license": "MIT",
Expand Down Expand Up @@ -31,14 +31,16 @@
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/vscode-languagedetection": "1.0.21",
"jschardet": "3.0.0",
"tas-client-umd": "0.1.6",
"tas-client-umd": "0.1.8",
"vscode-oniguruma": "1.7.0",
"vscode-textmate": "9.0.0",
"xterm": "5.2.0-beta.30",
"xterm-addon-canvas": "0.4.0-beta.7",
"xterm-addon-search": "0.11.0",
"xterm-addon-unicode11": "0.5.0",
"xterm-addon-webgl": "0.15.0-beta.7"
"xterm-addon-canvas": "0.5.0-beta.22",
"xterm-addon-image": "0.6.0-beta.14",
"xterm-addon-search": "0.13.0-beta.20",
"xterm-addon-serialize": "0.11.0-beta.20",
"xterm-addon-unicode11": "0.6.0-beta.12",
"xterm-addon-webgl": "0.16.0-beta.30"
},
"devDependencies": {
"@types/trusted-types": "^2.0.0",
Expand Down
17 changes: 9 additions & 8 deletions vscode-web/scripts/.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"vs/code/browser/workbench/workbench.ts": "be140606a59a329584a67af7a8ec3d624ab71028ed3717a3d41bf368412beb4a",
"vs/editor/common/config/editorOptions.ts": "648903f0306c733cb2df5c0b7c241a8b1423a46ea7f2b746ef879cd43992117a",
"vs/workbench/browser/parts/activitybar/activitybarActions.ts": "a4813477aac947fc94d84f563143ef67370a9cf9c34a054741e051ec88f2eca2",
"vs/workbench/browser/parts/activitybar/activitybarPart.ts": "0a9ff35eaa2bf4ffaa22ecf362b070cf47d8a63fc9e7055a280b456150677a06",
"vs/workbench/browser/parts/titlebar/media/titlebarpart.css": "715607e6f7330e1137a4ddf7892c4846b40fe0d6c04a164d2b684eefa608846f",
"vs/workbench/browser/web.main.ts": "707d64b8fc7436e704fb1e6e06cddc6b48224c75c2617cc2175d7763906f1895",
"vs/code/browser/workbench/workbench.ts": "a954327b52b6ed462b3b7fbd2301c6ba11bf135ca7ba70c5f552214309492946",
"vs/editor/common/config/editorOptions.ts": "5dee522e65874effeb1d1a0a3637d8dedcfceb929892cf0c51c9cf29162f44da",
"vs/workbench/browser/parts/activitybar/activitybarActions.ts": "51c169706a121b1008f9173812cbc77d864255e24bfe78dfac53fec5dd6263da",
"vs/workbench/browser/parts/activitybar/activitybarPart.ts": "e202c8406f9c4c8dc998ecd8763a2753191d2a325d6fe28d6ab951966dc84d0e",
"vs/workbench/browser/parts/titlebar/media/titlebarpart.css": "e9a29c2d1a9ed11262667ce3433e03ca98e87e4a1d9cb591383333eb4988e50b",
"vs/workbench/browser/web.main.ts": "6faa17247fc0370a4262ebd38d92922eb199c75aa1c92bbd72bbdcfc3e93dac8",
"vs/workbench/contrib/files/browser/editors/fileEditorInput.ts": "d52aa1f962f1a0bdfc6d186762f6fa51c9aa35bb98667aead8d8e9ad75e45215",
"vs/workbench/contrib/webview/browser/pre/index.html": "110da74034afd7843b0939ed0e2aa8a8ce8f4288d0382f9b651913659d3eceaf",
"vs/workbench/contrib/webview/browser/pre/index.html": "6dc11aefde8587732dba85116dac2718cef9287075c8d3a306663a7741e6910f",
"vs/workbench/services/extensionManagement/browser/builtinExtensionsScannerService.ts": "b2c52e36c3d4122aa21b8f9a14fc9b14d45550f5a2251617e6d0e60685dde83c",
"vs/workbench/services/label/common/labelService.ts": "73237cce0f9496151ea8ae5079676bbdfa15ce49de9b05621d39fcd04e9c1f0d",
"vs/workbench/services/textfile/browser/textFileService.ts": "c9e7439cf0356c327c791e1c3ea911cf13399212e84d27f49e6c2bc8a983b861"
"vs/workbench/services/textfile/browser/textFileService.ts": "514ae0a7922c9e0e63c1b50ef08936d0b900e4970c19ba219b73759d62bac1a4",
"vs/workbench/services/editor/browser/editorResolverService.ts": "43cd774a4715e98afaf85b3d44f0381d0b83dc1b9cd75fc090553f84fa0f7e80"
}
43 changes: 37 additions & 6 deletions vscode-web/src/vs/editor/common/config/editorOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,11 @@ export interface IEditorOptions {
* Controls whether the editor receives tabs or defers them to the workbench for navigation.
*/
tabFocusMode?: boolean;

/**
* Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.
*/
inlineCompletionsAccessibilityVerbose?: boolean;
}

/**
Expand All @@ -755,6 +760,16 @@ export interface IDiffEditorBaseOptions {
* Defaults to true.
*/
renderSideBySide?: boolean;
/**
* When `renderSideBySide` is enabled, `useInlineViewWhenSpaceIsLimited` is set,
* and the diff editor has a width less than `renderSideBySideInlineBreakpoint`, the inline view is used.
*/
renderSideBySideInlineBreakpoint?: number | undefined;
/**
* When `renderSideBySide` is enabled, `useInlineViewWhenSpaceIsLimited` is set,
* and the diff editor has a width less than `renderSideBySideInlineBreakpoint`, the inline view is used.
*/
useInlineViewWhenSpaceIsLimited?: boolean;
/**
* Timeout in milliseconds after which diff computation is cancelled.
* Defaults to 5000.
Expand Down Expand Up @@ -810,10 +825,6 @@ export interface IDiffEditorBaseOptions {
accessibilityVerbose?: boolean;

experimental?: {
/**
* Defaults to false.
*/
collapseUnchangedRegions?: boolean;
/**
* Defaults to false.
*/
Expand All @@ -832,6 +843,13 @@ export interface IDiffEditorBaseOptions {
* If the diff editor should only show the difference review mode.
*/
onlyShowAccessibleDiffViewer?: boolean;

hideUnchangedRegions?: {
enabled?: boolean;
revealLineCount?: number;
minimumLineCount?: number;
contextLineCount?: number;
};
}

/**
Expand Down Expand Up @@ -2742,6 +2760,10 @@ export interface IEditorStickyScrollOptions {
* Model to choose for sticky scroll by default
*/
defaultModel?: 'outlineModel' | 'foldingProviderModel' | 'indentationModel';
/**
* Define whether to scroll sticky scroll with editor horizontal scrollbae
*/
scrollWithEditor?: boolean;
}

/**
Expand All @@ -2752,7 +2774,7 @@ export type EditorStickyScrollOptions = Readonly<Required<IEditorStickyScrollOpt
class EditorStickyScroll extends BaseEditorOption<EditorOption.stickyScroll, IEditorStickyScrollOptions, EditorStickyScrollOptions> {

constructor() {
const defaults: EditorStickyScrollOptions = { enabled: false, maxLineCount: 5, defaultModel: 'outlineModel' };
const defaults: EditorStickyScrollOptions = { enabled: false, maxLineCount: 5, defaultModel: 'outlineModel', scrollWithEditor: true };
super(
EditorOption.stickyScroll, 'stickyScroll', defaults,
{
Expand All @@ -2774,6 +2796,11 @@ class EditorStickyScroll extends BaseEditorOption<EditorOption.stickyScroll, IEd
default: defaults.defaultModel,
description: nls.localize('editor.stickyScroll.defaultModel', "Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")
},
'editor.stickyScroll.scrollWithEditor': {
type: 'boolean',
default: defaults.scrollWithEditor,
description: nls.localize('editor.stickyScroll.scrollWithEditor', "Enable scrolling of the sticky scroll widget with the editor's horizontal scrollbar.")
},
}
);
}
Expand All @@ -2787,6 +2814,7 @@ class EditorStickyScroll extends BaseEditorOption<EditorOption.stickyScroll, IEd
enabled: boolean(input.enabled, this.defaultValue.enabled),
maxLineCount: EditorIntOption.clampedInt(input.maxLineCount, this.defaultValue.maxLineCount, 1, 10),
defaultModel: stringSet<'outlineModel' | 'foldingProviderModel' | 'indentationModel'>(input.defaultModel, this.defaultValue.defaultModel, ['outlineModel', 'foldingProviderModel', 'indentationModel']),
scrollWithEditor: boolean(input.scrollWithEditor, this.defaultValue.scrollWithEditor)
};
}
}
Expand Down Expand Up @@ -5123,7 +5151,8 @@ export const enum EditorOption {
layoutInfo,
wrappingInfo,
defaultColorDecorators,
colorDecoratorsActivatedOn
colorDecoratorsActivatedOn,
inlineCompletionsAccessibilityVerbose
}

export const EditorOptions = {
Expand Down Expand Up @@ -5716,6 +5745,8 @@ export const EditorOptions = {
)),
suggest: register(new EditorSuggest()),
inlineSuggest: register(new InlineEditorSuggest()),
inlineCompletionsAccessibilityVerbose: register(new EditorBooleanOption(EditorOption.inlineCompletionsAccessibilityVerbose, 'inlineCompletionsAccessibilityVerbose', false,
{ description: nls.localize('inlineCompletionsAccessibilityVerbose', "Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.") })),
suggestFontSize: register(new EditorIntOption(
EditorOption.suggestFontSize, 'suggestFontSize',
0, 0, 1000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { ACTIVITY_BAR_ACTIVE_FOCUS_BORDER, ACTIVITY_BAR_ACTIVE_BACKGROUND, ACTIV
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { createAndFillInActionBarActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
import { getCurrentAuthenticationSessionInfo } from 'vs/workbench/services/authentication/browser/authenticationService';
import { AuthenticationSessionInfo, getCurrentAuthenticationSessionInfo } from 'vs/workbench/services/authentication/browser/authenticationService';
import { AuthenticationSessionAccount, IAuthenticationService } from 'vs/workbench/services/authentication/common/authentication';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
Expand All @@ -41,6 +41,9 @@ import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/c
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
import { ILogService } from 'vs/platform/log/common/log';
import { ISecretStorageService } from 'vs/platform/secrets/common/secrets';
import { ILifecycleService, LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
import { runWhenIdle } from 'vs/base/common/async';
import { Lazy } from 'vs/base/common/lazy';

export class ViewContainerActivityAction extends ActivityAction {

Expand Down Expand Up @@ -273,14 +276,15 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem {
private readonly problematicProviders: Set<string> = new Set();

private initialized = false;
private sessionFromEmbedder = getCurrentAuthenticationSessionInfo(this.credentialsService, this.secretStorageService, this.productService);
private sessionFromEmbedder = new Lazy<Promise<AuthenticationSessionInfo | undefined>>(() => getCurrentAuthenticationSessionInfo(this.credentialsService, this.secretStorageService, this.productService));

constructor(
action: ActivityAction,
contextMenuActionsProvider: () => IAction[],
colors: (theme: IColorTheme) => ICompositeBarColors,
activityHoverOptions: IActivityHoverOptions,
@IThemeService themeService: IThemeService,
@ILifecycleService private readonly lifecycleService: ILifecycleService,
@IHoverService hoverService: IHoverService,
@IContextMenuService contextMenuService: IContextMenuService,
@IMenuService menuService: IMenuService,
Expand Down Expand Up @@ -327,6 +331,16 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem {
// This function exists to ensure that the accounts are added for auth providers that had already been registered
// before the menu was created.
private async initialize(): Promise<void> {
// Resolving the menu doesn't need to happen immediately, so we can wait until after the workbench has been restored
// and only run this when the system is idle.
await this.lifecycleService.when(LifecyclePhase.Restored);
const disposable = this._register(runWhenIdle(async () => {
await this.doInitialize();
disposable.dispose();
}));
}

private async doInitialize(): Promise<void> {
const providerIds = this.authenticationService.getProviderIds();
const results = await Promise.allSettled(providerIds.map(providerId => this.addAccountsFromProvider(providerId)));

Expand Down Expand Up @@ -443,7 +457,7 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem {
this.groupedAccounts.set(providerId, accounts);
}

const sessionFromEmbedder = await this.sessionFromEmbedder;
const sessionFromEmbedder = await this.sessionFromEmbedder.value;
// If the session stored from the embedder allows sign out, then we can treat it and all others as sign out-able
let canSignOut = !!sessionFromEmbedder?.canSignOut;
if (!canSignOut) {
Expand Down
Loading

1 comment on commit 597ca7f

@vercel
Copy link

@vercel vercel bot commented on 597ca7f Sep 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.