Update to VS Code 1.52.1

This commit is contained in:
Asher
2021-02-09 16:08:37 +00:00
1351 changed files with 56560 additions and 38990 deletions

View File

@@ -36,9 +36,11 @@ export class ViewsWelcomeContribution extends Disposable implements IWorkbenchCo
for (const welcome of contribution.value) {
const id = ViewIdentifierMap[welcome.view] ?? welcome.view;
const { group, order } = parseGroupAndOrder(welcome, contribution);
const precondition = ContextKeyExpr.deserialize(welcome.enablement);
const disposable = viewsRegistry.registerViewWelcomeContent(id, {
content: welcome.contents,
when: ContextKeyExpr.deserialize(welcome.when),
precondition,
group,
order
});

View File

@@ -11,6 +11,7 @@ export enum ViewsWelcomeExtensionPointFields {
contents = 'contents',
when = 'when',
group = 'group',
enablement = 'enablement',
}
export interface ViewWelcome {
@@ -18,6 +19,7 @@ export interface ViewWelcome {
readonly [ViewsWelcomeExtensionPointFields.contents]: string;
readonly [ViewsWelcomeExtensionPointFields.when]: string;
readonly [ViewsWelcomeExtensionPointFields.group]: string;
readonly [ViewsWelcomeExtensionPointFields.enablement]: string;
}
export type ViewsWelcomeExtensionPoint = ViewWelcome[];
@@ -64,6 +66,10 @@ const viewsWelcomeExtensionPointSchema = Object.freeze<IConfigurationPropertySch
type: 'string',
description: nls.localize('contributes.viewsWelcome.view.group', "Group to which this welcome content belongs."),
},
[ViewsWelcomeExtensionPointFields.enablement]: {
type: 'string',
description: nls.localize('contributes.viewsWelcome.view.enablement', "Condition when the welcome content buttons should be enabled."),
},
}
}
});

View File

@@ -0,0 +1,52 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { localize } from 'vs/nls';
import { GettingStartedInputFactory, GettingStartedPage, GettingStartedInput } from 'vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted';
import { Registry } from 'vs/platform/registry/common/platform';
import { Extensions as EditorInputExtensions, IEditorInputFactoryRegistry } from 'vs/workbench/common/editor';
import { MenuId, registerAction2, Action2 } from 'vs/platform/actions/common/actions';
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { Extensions as ConfigurationExtensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry';
import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuration';
import product from 'vs/platform/product/common/product';
registerAction2(class extends Action2 {
constructor() {
super({
id: 'workbench.action.showGettingStarted',
title: localize('Getting Started', "Getting Started"),
category: localize('help', "Help"),
f1: true,
precondition: ContextKeyExpr.has('config.workbench.experimental.gettingStarted'),
menu: {
id: MenuId.MenubarHelpMenu,
when: ContextKeyExpr.has('config.workbench.experimental.gettingStarted'),
group: '1_welcome',
order: 2,
}
});
}
public run(accessor: ServicesAccessor) {
return accessor.get(IInstantiationService).createInstance(GettingStartedPage, {}).openEditor();
}
});
Registry.as<IEditorInputFactoryRegistry>(EditorInputExtensions.EditorInputFactories).registerEditorInputFactory(GettingStartedInput.ID, GettingStartedInputFactory);
if (product.quality !== 'stable') {
Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).registerConfiguration({
...workbenchConfigurationNodeBase,
properties: {
'workbench.experimental.gettingStarted': {
type: 'boolean',
description: localize('gettingStartedDescription', "Enables an experimental Getting Started page, accesible via the Help menu."),
default: false,
}
}
});
}

View File

@@ -0,0 +1,248 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.file-icons-enabled .show-file-icons .vs_code_editor_getting_started\.md-name-file-icon.md-ext-file-icon.ext-file-icon.markdown-lang-file-icon.file-icon::before {
content: ' ';
background-image: url('../../../../browser/media/code-icon.svg');
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide {
width: 100%;
height: 100%;
position: absolute;
transition: left 0.25s, opacity 0.25s;
left: 0;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.categories {
height: calc(100% - 50px);
display: flex;
flex-direction: column;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.categories .gap {
flex: 150px 0 1
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.categories .header {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.categories .category-title {
margin-bottom: 4px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.categories .category-description-container {
width: 100%
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.categories .category-progress {
margin-top: 12px;
font-size: 12px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.categories progress {
font-size: 12pt;
width: 100%;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.categories #getting-started-categories-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
max-width: 900px;
margin: 32px auto;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide .getting-started-category {
width: 330px;
min-height: 80px;
margin: 12px;
text-align: left;
display: flex;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.categories .getting-started-category {
padding-right: 46px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide .getting-started-category .codicon {
margin-right: 10px;
font-size: 32px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-category {
width: 330px;
display: flex;
padding: 40px 0 20px;
margin-left: 12px;
min-height: auto;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-category .codicon {
margin-left:0;
font-size: 22pt;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail #getting-started-detail-columns {
display: flex;
height: 100%;
justify-content: center;
padding: 44px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task {
display: flex;
width: 100%;
overflow: hidden;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task:not(.expanded) .task-description,
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task:not(.expanded) .actions,
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task:not(.expanded) button,
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task:not(.expanded) a {
display: none;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task.expanded {
width: 100%;
height: unset;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task .task-title {
font-size: 14pt;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task .task-description {
margin-top: 4px;
font-size: 13px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task .actions {
margin-top: 12px;
display: flex;
align-items: center;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task .task-next {
margin-left: auto;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task .codicon.hidden {
display: none;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task .codicon {
margin-right: 8px;
font-size: 20px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task-action {
padding: 6px 12px;
font-size: 11pt;
min-width: 100px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail #getting-started-detail-left {
min-width: 330px;
width: 40%;
max-width: 400px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail #getting-started-detail-right {
width: 66%;
text-align: center;
padding-left: 44px;
margin-bottom: 50px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer button {
border: none;
color: inherit;
text-align: left;
padding: 16px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer button:not(:first-child) {
margin-top: 12px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer button:hover {
cursor: pointer;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer button:focus {
outline-style: solid;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .prev-button {
position: absolute;
left: 0;
font-size: 12pt;
margin: 10px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .prev-button:hover {
cursor: pointer;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .prev-button .codicon {
position: relative;
top: 2px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide .skip {
display: block;
width: 150px;
margin: 0 auto;
text-align: center;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide h1 {
font-size: 32px;
font-weight: normal;
border-bottom: none;
margin: 0;
padding: 0;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide h2 {
font-weight: normal;
margin: 0 0 4px 0;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide h3 {
font-size: 18px;
font-weight: bold;
margin: 0;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide .subtitle {
font-size: 16px;
margin: 0;
padding: 0;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .footer {
position: absolute;
text-align: center;
bottom: 0;
width: calc(100% - 40px);
margin-bottom: 20px;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.next {
left: 100%;
opacity: 0;
}
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.prev {
left: -100%;
opacity: 0;
}

View File

@@ -0,0 +1,430 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./gettingStarted';
import 'vs/workbench/contrib/welcome/gettingStarted/browser/vs_code_editor_getting_started';
import { localize } from 'vs/nls';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { WalkThroughInput } from 'vs/workbench/contrib/welcome/walkThrough/browser/walkThroughInput';
import { FileAccess, Schemas } from 'vs/base/common/network';
import { IEditorInputFactory } from 'vs/workbench/common/editor';
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
import { IEditorOptions } from 'vs/platform/editor/common/editor';
import { assertIsDefined } from 'vs/base/common/types';
import { $, addDisposableListener } from 'vs/base/browser/dom';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { IProductService } from 'vs/platform/product/common/productService';
import { IGettingStartedCategoryWithProgress, IGettingStartedService } from 'vs/workbench/services/gettingStarted/common/gettingStartedService';
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { buttonBackground as welcomeButtonBackground, buttonHoverBackground as welcomeButtonHoverBackground, welcomePageBackground } from 'vs/workbench/contrib/welcome/page/browser/welcomePageColors';
import { activeContrastBorder, buttonBackground, buttonForeground, buttonHoverBackground, contrastBorder, descriptionForeground, focusBorder, foreground, textLinkActiveForeground, textLinkForeground } from 'vs/platform/theme/common/colorRegistry';
import { getExtraColor } from 'vs/workbench/contrib/welcome/walkThrough/common/walkThroughUtils';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
export const gettingStartedInputTypeId = 'workbench.editors.gettingStartedInput';
const telemetryFrom = 'gettingStartedPage';
export class GettingStartedInput extends WalkThroughInput {
static readonly ID = gettingStartedInputTypeId;
selectedCategory: string | undefined;
selectedTask: string | undefined;
}
export class GettingStartedPage extends Disposable {
readonly editorInput: GettingStartedInput;
private inProgressScroll = Promise.resolve();
private dispatchListeners = new DisposableStore();
private gettingStartedCategories: IGettingStartedCategoryWithProgress[];
private currentCategory: IGettingStartedCategoryWithProgress | undefined;
constructor(
initialState: { selectedCategory?: string, selectedTask?: string },
@IEditorService private readonly editorService: IEditorService,
@ICommandService private readonly commandService: ICommandService,
@IProductService private readonly productService: IProductService,
@IKeybindingService private readonly keybindingService: IKeybindingService,
@IGettingStartedService private readonly gettingStartedService: IGettingStartedService,
@ITelemetryService private readonly telemetryService: ITelemetryService,
@IInstantiationService private readonly instantiationService: IInstantiationService
) {
super();
const resource = FileAccess.asBrowserUri('./vs_code_editor_getting_started.md', require)
.with({
scheme: Schemas.walkThrough,
query: JSON.stringify({ moduleId: 'vs/workbench/contrib/welcome/gettingStarted/browser/vs_code_editor_getting_started' })
});
this.editorInput = this.instantiationService.createInstance(GettingStartedInput, {
typeId: gettingStartedInputTypeId,
name: localize('editorGettingStarted.title', "Getting Started"),
resource,
telemetryFrom,
onReady: (container: HTMLElement) => this.onReady(container)
});
this.editorInput.selectedCategory = initialState.selectedCategory;
this.editorInput.selectedTask = initialState.selectedTask;
this.gettingStartedCategories = this.gettingStartedService.getCategories();
this._register(this.dispatchListeners);
this._register(this.gettingStartedService.onDidAddTask(task => console.log('added new task', task, 'that isnt being rendered yet')));
this._register(this.gettingStartedService.onDidAddCategory(category => console.log('added new category', category, 'that isnt being rendered yet')));
this._register(this.gettingStartedService.onDidProgressTask(task => {
const category = this.gettingStartedCategories.find(category => category.id === task.category);
if (!category) { throw Error('Could not find category with ID: ' + task.category); }
if (category.content.type !== 'items') { throw Error('internaal error: progressing task in a non-items category'); }
const ourTask = category.content.items.find(_task => _task.id === task.id);
if (!ourTask) {
throw Error('Could not find task with ID: ' + task.id);
}
ourTask.done = task.done;
if (category.id === this.currentCategory?.id) {
const badgeelement = assertIsDefined(document.getElementById('done-task-' + task.id));
if (task.done) {
badgeelement.classList.remove('codicon-star-empty');
badgeelement.classList.add('codicon-star-full');
}
else {
badgeelement.classList.add('codicon-star-empty');
badgeelement.classList.remove('codicon-star-full');
}
}
this.updateCategoryProgress();
}));
}
public openEditor(options: IEditorOptions = { pinned: true }) {
return this.editorService.openEditor(this.editorInput, options);
}
private registerDispatchListeners(container: HTMLElement) {
this.dispatchListeners.clear();
container.querySelectorAll('[x-dispatch]').forEach(element => {
const [command, argument] = (element.getAttribute('x-dispatch') ?? '').split(':');
if (command) {
this.dispatchListeners.add(addDisposableListener(element, 'click', (e) => {
type GettingStartedActionClassification = {
command: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' };
argument: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' };
};
type GettingStartedActionEvent = {
command: string;
argument: string | undefined;
};
this.telemetryService.publicLog2<GettingStartedActionEvent, GettingStartedActionClassification>('gettingStarted.ActionExecuted', { command, argument });
switch (command) {
case 'scrollPrev': {
this.scrollPrev(container);
break;
}
case 'skip': {
this.commandService.executeCommand('workbench.action.closeActiveEditor');
break;
}
case 'selectCategory': {
const selectedCategory = this.gettingStartedCategories.find(category => category.id === argument);
if (!selectedCategory) { throw Error('Could not find category with ID ' + argument); }
if (selectedCategory.content.type === 'command') {
this.commandService.executeCommand(selectedCategory.content.command);
} else {
this.scrollToCategory(container, argument);
}
break;
}
case 'selectTask': {
this.selectTask(argument);
e.stopPropagation();
break;
}
case 'runTaskAction': {
if (!this.currentCategory || this.currentCategory.content.type !== 'items') {
throw Error('cannot run task action for category of non items type' + this.currentCategory?.id);
}
const taskToRun = assertIsDefined(this.currentCategory?.content.items.find(task => task.id === argument));
const commandToRun = assertIsDefined(taskToRun.button?.command);
this.commandService.executeCommand(commandToRun);
break;
}
default: {
console.error('Dispatch to', command, argument, 'not defined');
break;
}
}
}));
}
});
}
private selectTask(id: string | undefined) {
const mediaElement = assertIsDefined(document.getElementById('getting-started-media'));
if (id) {
const taskElement = assertIsDefined(document.getElementById('getting-started-task-' + id));
if (!this.currentCategory || this.currentCategory.content.type !== 'items') {
throw Error('cannot expand task for category of non items type' + this.currentCategory?.id);
}
this.editorInput.selectedTask = id;
const taskToExpand = assertIsDefined(this.currentCategory.content.items.find(task => task.id === id));
mediaElement.setAttribute('src', taskToExpand.media.path.toString());
mediaElement.setAttribute('alt', taskToExpand.media.altText);
taskElement.parentElement?.querySelectorAll('.expanded').forEach(node => node.classList.remove('expanded'));
taskElement.classList.add('expanded');
} else {
mediaElement.setAttribute('src', '');
mediaElement.setAttribute('alt', '');
}
}
private onReady(container: HTMLElement) {
const categoryElements = this.gettingStartedCategories.map(
category => {
const categoryDescriptionElement =
category.content.type === 'items' ?
$('.category-description-container', {},
$('h3.category-title', {}, category.title),
$('.category-description.description', {}, category.description),
$('.category-progress', { 'x-data-category-id': category.id, }, $('.message'), $('progress'))) :
$('.category-description-container', {},
$('h3.category-title', {}, category.title),
$('.category-description.description', {}, category.description));
return $('button.getting-started-category',
{ 'x-dispatch': 'selectCategory:' + category.id },
$('.codicon.codicon-' + category.codicon, {}), categoryDescriptionElement);
});
const rightColumn = assertIsDefined(container.querySelector('#getting-started-detail-right'));
rightColumn.appendChild($('img#getting-started-media'));
const categoriesContainer = assertIsDefined(document.getElementById('getting-started-categories-container'));
categoryElements.forEach(element => {
categoriesContainer.appendChild(element);
});
this.updateCategoryProgress();
assertIsDefined(document.getElementById('product-name')).textContent = this.productService.nameLong;
this.registerDispatchListeners(container);
const categoriesSlide = assertIsDefined(document.getElementById('gettingStartedSlideCategory'));
const tasksSlide = assertIsDefined(document.getElementById('gettingStartedSlideDetails'));
if (this.editorInput.selectedCategory) {
this.currentCategory = this.gettingStartedCategories.find(category => category.id === this.editorInput.selectedCategory);
if (!this.currentCategory) {
throw Error('Could not restore to category ' + this.editorInput.selectedCategory + ' as it was not found');
}
this.buildCategorySlide(container, this.editorInput.selectedCategory, this.editorInput.selectedTask);
categoriesSlide.classList.add('prev');
} else {
tasksSlide.classList.add('next');
}
}
private updateCategoryProgress() {
document.querySelectorAll('.category-progress').forEach(element => {
const categoryID = element.getAttribute('x-data-category-id');
const category = this.gettingStartedCategories.find(category => category.id === categoryID);
if (!category) { throw Error('Could not find c=ategory with ID ' + categoryID); }
if (category.content.type !== 'items') { throw Error('Category with ID ' + categoryID + ' is not of items type'); }
const numDone = category.content.items.filter(task => task.done).length;
const numTotal = category.content.items.length;
const message = assertIsDefined(element.firstChild);
const bar = assertIsDefined(element.lastChild) as HTMLProgressElement;
bar.value = numDone;
bar.max = numTotal;
if (numTotal === numDone) {
message.textContent = `All items complete!`;
}
else {
message.textContent = `${numDone} of ${numTotal} items complete`;
}
});
}
private async scrollToCategory(container: HTMLElement, categoryID: string) {
this.inProgressScroll = this.inProgressScroll.then(async () => {
this.clearDetialView();
this.editorInput.selectedCategory = categoryID;
this.currentCategory = this.gettingStartedCategories.find(category => category.id === categoryID);
const slides = [...container.querySelectorAll('.gettingStartedSlide').values()];
const currentSlide = slides.findIndex(element => !element.classList.contains('prev') && !element.classList.contains('next'));
if (currentSlide < slides.length - 1) {
this.buildCategorySlide(container, categoryID);
slides[currentSlide].classList.add('prev');
slides[currentSlide + 1].classList.remove('next');
}
});
}
private buildCategorySlide(container: HTMLElement, categoryID: string, selectedItem?: string) {
const category = this.gettingStartedCategories.find(category => category.id === categoryID);
if (!category) { throw Error('could not find category with ID ' + categoryID); }
if (category.content.type !== 'items') { throw Error('category with ID ' + categoryID + ' is not of items type'); }
const detailTitle = assertIsDefined(document.getElementById('getting-started-detail-title'));
detailTitle.appendChild(
$('.getting-started-category',
{},
$('.codicon.codicon-' + category.codicon, {}),
$('.category-description-container', {},
$('h2.category-title', {}, category.title),
$('.category-description.description', {}, category.description))));
const categoryElements = category.content.items.map(
(task, i, arr) => $('button.getting-started-task',
{ 'x-dispatch': 'selectTask:' + task.id, id: 'getting-started-task-' + task.id },
$('.codicon' + (task.done ? '.codicon-pass-filled' : '.codicon-circle-large-outline'), { id: 'done-task-' + task.id }),
$('.task-description-container', {},
$('h3.task-title', {}, task.title),
$('.task-description.description', {}, task.description),
$('.actions', {},
...(
task.button
? [$('button.emphasis.getting-started-task-action', { 'x-dispatch': 'runTaskAction:' + task.id },
task.button.title + this.getKeybindingLabel(task.button.command)
)]
: []),
...(
arr[i + 1]
? [
$('a.task-next',
{ 'x-dispatch': 'selectTask:' + arr[i + 1].id }, localize('next', "Next")),
] : []
))
)));
const detailContainer = assertIsDefined(document.getElementById('getting-started-detail-container'));
categoryElements.forEach(element => detailContainer.appendChild(element));
const toExpand = category.content.items.find(item => !item.done) ?? category.content.items[0];
this.selectTask(selectedItem ?? toExpand.id);
this.registerDispatchListeners(container);
}
private clearDetialView() {
const detailContainer = assertIsDefined(document.getElementById('getting-started-detail-container'));
while (detailContainer.firstChild) { detailContainer.removeChild(detailContainer.firstChild); }
const detailTitle = assertIsDefined(document.getElementById('getting-started-detail-title'));
while (detailTitle.firstChild) { detailTitle.removeChild(detailTitle.firstChild); }
}
private getKeybindingLabel(command: string) {
const binding = this.keybindingService.lookupKeybinding(command);
if (!binding) { return ''; }
else { return ` (${binding.getLabel()})`; }
}
private async scrollPrev(container: HTMLElement) {
this.inProgressScroll = this.inProgressScroll.then(async () => {
this.currentCategory = undefined;
this.editorInput.selectedCategory = undefined;
this.editorInput.selectedTask = undefined;
this.selectTask(undefined);
const slides = [...container.querySelectorAll('.gettingStartedSlide').values()];
const currentSlide = slides.findIndex(element =>
!element.classList.contains('prev') && !element.classList.contains('next'));
if (currentSlide > 0) {
slides[currentSlide].classList.add('next');
assertIsDefined(slides[currentSlide - 1]).classList.remove('prev');
}
});
}
}
export class GettingStartedInputFactory implements IEditorInputFactory {
public canSerialize(editorInput: GettingStartedInput): boolean {
return true;
}
public serialize(editorInput: GettingStartedInput): string {
return JSON.stringify({ selectedCategory: editorInput.selectedCategory, selectedTask: editorInput.selectedTask });
}
public deserialize(instantiationService: IInstantiationService, serializedEditorInput: string): GettingStartedInput {
try {
const { selectedCategory, selectedTask } = JSON.parse(serializedEditorInput);
return instantiationService.createInstance(GettingStartedPage, { selectedCategory, selectedTask }).editorInput;
} catch { }
return instantiationService.createInstance(GettingStartedPage, {}).editorInput;
}
}
registerThemingParticipant((theme, collector) => {
const backgroundColor = theme.getColor(welcomePageBackground);
if (backgroundColor) {
collector.addRule(`.monaco-workbench .part.editor > .content .welcomePageContainer { background-color: ${backgroundColor}; }`);
}
const foregroundColor = theme.getColor(foreground);
if (foregroundColor) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer { color: ${foregroundColor}; }`);
}
const descriptionColor = theme.getColor(descriptionForeground);
if (descriptionColor) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .description { color: ${descriptionColor}; }`);
}
const buttonColor = getExtraColor(theme, welcomeButtonBackground, { dark: 'rgba(0, 0, 0, .2)', extra_dark: 'rgba(200, 235, 255, .042)', light: 'rgba(0,0,0,.04)', hc: 'black' });
if (buttonColor) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer button { background: ${buttonColor}; }`);
}
const buttonHoverColor = getExtraColor(theme, welcomeButtonHoverBackground, { dark: 'rgba(200, 235, 255, .072)', extra_dark: 'rgba(200, 235, 255, .072)', light: 'rgba(0,0,0,.10)', hc: null });
if (buttonHoverColor) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer button:hover { background: ${buttonHoverColor}; }`);
}
if (buttonColor && buttonHoverColor) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer button.expanded:hover { background: ${buttonColor}; }`);
}
const emphasisButtonForeground = theme.getColor(buttonForeground);
if (emphasisButtonForeground) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer button.emphasis { color: ${emphasisButtonForeground}; }`);
}
const emphasisButtonBackground = theme.getColor(buttonBackground);
if (emphasisButtonBackground) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer button.emphasis { background: ${emphasisButtonBackground}; }`);
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .getting-started-category .codicon { color: ${emphasisButtonBackground} }`);
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task .codicon { color: ${emphasisButtonBackground} } `);
}
const emphasisButtonHoverBackground = theme.getColor(buttonHoverBackground);
if (emphasisButtonHoverBackground) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer button.emphasis:hover { background: ${emphasisButtonHoverBackground}; }`);
}
const link = theme.getColor(textLinkForeground);
if (link) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer a { color: ${link}; }`);
}
const activeLink = theme.getColor(textLinkActiveForeground);
if (activeLink) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer a:hover,
.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer a:active { color: ${activeLink}; }`);
}
const focusColor = theme.getColor(focusBorder);
if (focusColor) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer a:focus { outline-color: ${focusColor}; }`);
}
const border = theme.getColor(contrastBorder);
if (border) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer button { border-color: ${border}; border: 1px solid; }`);
}
const activeBorder = theme.getColor(activeContrastBorder);
if (activeBorder) {
collector.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .gettingStartedContainer button:hover { outline-color: ${activeBorder}; }`);
}
});

View File

@@ -0,0 +1,38 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { escape } from 'vs/base/common/strings';
import { localize } from 'vs/nls';
export default () => `
<div class="gettingStartedContainer">
<div class="gettingStarted" role="document">
<div id="gettingStartedSlideCategory" class="gettingStartedSlide categories">
<div class="gap"></div>
<div class="header">
<h1 id="product-name" class="caption">${escape(localize('gettingStarted.vscode', "Visual Studio Code"))}</h1>
<p class="subtitle description">${escape(localize({ key: 'gettingStarted.editingRedefined', comment: ['Shown as subtitle on the Welcome page.'] }, "Code editing. Redefined"))}</p>
</div>
<div id="getting-started-categories-container"></div>
<div class="gap"></div>
</div>
<div id="gettingStartedSlideDetails" class="gettingStartedSlide detail">
<a class="prev-button" x-dispatch="scrollPrev"><span
class="scroll-button codicon codicon-chevron-left"></span>Back</a>
<div id="getting-started-detail-columns">
<div id="getting-started-detail-left">
<div id="getting-started-detail-title"></div>
<div id="getting-started-detail-container"></div>
</div>
<div id="getting-started-detail-right">
</div>
</div>
</div>
<div class="footer">
<a class="skip" x-dispatch="skip">Skip</a>
</div>
</div>
</div>
`.replace(/\|/g, '`');

View File

@@ -20,9 +20,8 @@ export default () => `
<h2 class="caption">${escape(localize('welcomePage.start', "Start"))}</h2>
<ul>
<li><a href="command:workbench.action.files.newUntitledFile">${escape(localize('welcomePage.newFile', "New file"))}</a></li>
<li class="mac-only"><a href="command:workbench.action.files.openFileFolder">${escape(localize('welcomePage.openFolder', "Open folder..."))}</a></li>
<li class="windows-only linux-only"><a href="command:workbench.action.files.openFolder">${escape(localize('welcomePage.openFolder', "Open folder..."))}</a></li>
<li><a href="command:workbench.action.addRootFolder">${escape(localize('welcomePage.addWorkspaceFolder', "Add workspace folder..."))}</a></li>
<li class="mac-only"><a href="command:workbench.action.files.openFileFolder">${escape(localize('welcomePage.openFolder', "Open folder..."))}</a> or <a href="command:git.clone">${escape(localize('welcomePage.gitClone', "clone repository..."))}</a></li>
<li class="windows-only linux-only"><a href="command:workbench.action.files.openFolder">${escape(localize('welcomePage.openFolder', "Open folder..."))}</a> or <a href="command:git.clone">${escape(localize('welcomePage.gitClone', "clone repository..."))}</a></li>
</ul>
</div>
<div class="section recent">

View File

@@ -13,6 +13,7 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions, Configur
import { IEditorInputFactoryRegistry, Extensions as EditorExtensions } from 'vs/workbench/common/editor';
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuration';
import product from 'vs/platform/product/common/product';
Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
.registerConfiguration({
@@ -21,13 +22,21 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
'workbench.startupEditor': {
'scope': ConfigurationScope.APPLICATION, // Make sure repositories cannot trigger opening a README for tracking.
'type': 'string',
'enum': ['none', 'welcomePage', 'readme', 'newUntitledFile', 'welcomePageInEmptyWorkbench'],
'enumDescriptions': [
'enum': [
...['none', 'welcomePage', 'readme', 'newUntitledFile', 'welcomePageInEmptyWorkbench'],
...(product.quality !== 'stable'
? ['gettingStarted']
: [])
],
'enumDescriptions': [...[
localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.none' }, "Start without an editor."),
localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.welcomePage' }, "Open the Welcome page (default)."),
localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.readme' }, "Open the README when opening a folder that contains one, fallback to 'welcomePage' otherwise."),
localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.newUntitledFile' }, "Open a new untitled file (only applies when opening an empty workspace)."),
localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.welcomePageInEmptyWorkbench' }, "Open the Welcome page when opening an empty workbench."),
localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.welcomePageInEmptyWorkbench' }, "Open the Welcome page when opening an empty workbench."),],
...(product.quality !== 'stable'
? [localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.gettingStarted' }, "Open the Getting Started page (experimental).")]
: [])
],
'default': 'welcomePage',
'description': localize('workbench.startupEditor', "Controls which editor is shown at startup, if none are restored from the previous session.")

View File

@@ -15,7 +15,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
import { onUnexpectedError, isPromiseCanceledError } from 'vs/base/common/errors';
import { IWindowOpenable } from 'vs/platform/windows/common/windows';
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';
import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { localize } from 'vs/nls';
import { Action, WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification } from 'vs/base/common/actions';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
@@ -29,7 +29,7 @@ import { ILifecycleService, StartupKind } from 'vs/workbench/services/lifecycle/
import { Disposable } from 'vs/base/common/lifecycle';
import { splitName } from 'vs/base/common/labels';
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { registerColor, focusBorder, textLinkForeground, textLinkActiveForeground, foreground, descriptionForeground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { focusBorder, textLinkForeground, textLinkActiveForeground, foreground, descriptionForeground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { getExtraColor } from 'vs/workbench/contrib/welcome/walkThrough/common/walkThroughUtils';
import { IExtensionsViewPaneContainer, IExtensionsWorkbenchService, VIEWLET_ID } from 'vs/workbench/contrib/extensions/common/extensions';
import { IEditorInputFactory, EditorInput } from 'vs/workbench/common/editor';
@@ -46,6 +46,8 @@ import { IProductService } from 'vs/platform/product/common/productService';
import { IEditorOptions } from 'vs/platform/editor/common/editor';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { gettingStartedInputTypeId, GettingStartedPage } from 'vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted';
import { buttonBackground, buttonHoverBackground, welcomePageBackground } from 'vs/workbench/contrib/welcome/page/browser/welcomePageColors';
const configurationKey = 'workbench.startupEditor';
const oldConfigurationKey = 'workbench.welcome.enabled';
@@ -69,7 +71,8 @@ export class WelcomePageContribution implements IWorkbenchContribution {
backupFileService.hasBackups().then(hasBackups => {
// Open the welcome even if we opened a set of default editors
if ((!editorService.activeEditor || layoutService.openedDefaultEditors) && !hasBackups) {
const openWithReadme = configurationService.getValue(configurationKey) === 'readme';
const startupEditorSetting = configurationService.getValue(configurationKey) as string;
const openWithReadme = startupEditorSetting === 'readme';
if (openWithReadme) {
return Promise.all(contextService.getWorkspace().folders.map(folder => {
const folderUri = folder.uri;
@@ -101,18 +104,23 @@ export class WelcomePageContribution implements IWorkbenchContribution {
return undefined;
});
} else {
const startupEditorTypeID = startupEditorSetting === 'gettingStarted' ? gettingStartedInputTypeId : welcomeInputTypeId;
const launchEditor = startupEditorSetting === 'gettingStarted'
? instantiationService.createInstance(GettingStartedPage, {})
: instantiationService.createInstance(WelcomePage);
let options: IEditorOptions;
let editor = editorService.activeEditor;
if (editor) {
// Ensure that the welcome editor won't get opened more than once
if (editor.getTypeId() === welcomeInputTypeId || editorService.editors.some(e => e.getTypeId() === welcomeInputTypeId)) {
if (editor.getTypeId() === startupEditorTypeID || editorService.editors.some(e => e.getTypeId() === startupEditorTypeID)) {
return undefined;
}
options = { pinned: false, index: 0 };
} else {
options = { pinned: false };
}
return instantiationService.createInstance(WelcomePage).openEditor(options);
return launchEditor.openEditor(options);
}
}
return undefined;
@@ -129,7 +137,7 @@ function isWelcomePageEnabled(configurationService: IConfigurationService, conte
return welcomeEnabled.value;
}
}
return startupEditor.value === 'welcomePage' || startupEditor.value === 'readme' || startupEditor.value === 'welcomePageInEmptyWorkbench' && contextService.getWorkbenchState() === WorkbenchState.EMPTY;
return startupEditor.value === 'welcomePage' || startupEditor.value === 'gettingStarted' || startupEditor.value === 'readme' || startupEditor.value === 'welcomePageInEmptyWorkbench' && contextService.getWorkbenchState() === WorkbenchState.EMPTY;
}
export class WelcomePageAction extends Action {
@@ -323,7 +331,7 @@ class WelcomePage extends Disposable {
showOnStartup.setAttribute('checked', 'checked');
}
showOnStartup.addEventListener('click', e => {
this.configurationService.updateValue(configurationKey, showOnStartup.checked ? 'welcomePage' : 'newUntitledFile', ConfigurationTarget.USER);
this.configurationService.updateValue(configurationKey, showOnStartup.checked ? 'welcomePage' : 'newUntitledFile');
});
const prodName = container.querySelector('.welcomePage .title .caption') as HTMLElement;
@@ -637,10 +645,6 @@ export class WelcomeInputFactory implements IEditorInputFactory {
// theming
export const buttonBackground = registerColor('welcomePage.buttonBackground', { dark: null, light: null, hc: null }, localize('welcomePage.buttonBackground', 'Background color for the buttons on the Welcome page.'));
export const buttonHoverBackground = registerColor('welcomePage.buttonHoverBackground', { dark: null, light: null, hc: null }, localize('welcomePage.buttonHoverBackground', 'Hover background color for the buttons on the Welcome page.'));
export const welcomePageBackground = registerColor('welcomePage.background', { light: null, dark: null, hc: null }, localize('welcomePage.background', 'Background color for the Welcome page.'));
registerThemingParticipant((theme, collector) => {
const backgroundColor = theme.getColor(welcomePageBackground);
if (backgroundColor) {

View File

@@ -0,0 +1,12 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { registerColor } from 'vs/platform/theme/common/colorRegistry';
import { localize } from 'vs/nls';
// Seprate from main module to break dependency cycles between welcomePage and gettingStarted.
export const buttonBackground = registerColor('welcomePage.buttonBackground', { dark: null, light: null, hc: null }, localize('welcomePage.buttonBackground', 'Background color for the buttons on the Welcome page.'));
export const buttonHoverBackground = registerColor('welcomePage.buttonHoverBackground', { dark: null, light: null, hc: null }, localize('welcomePage.buttonHoverBackground', 'Hover background color for the buttons on the Welcome page.'));
export const welcomePageBackground = registerColor('welcomePage.background', { light: null, dark: null, hc: null }, localize('welcomePage.background', 'Background color for the Welcome page.'));

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
@@ -19,7 +19,6 @@ import { IProductService } from 'vs/platform/product/common/productService';
import { IHostService } from 'vs/workbench/services/host/browser/host';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { IJSONEditingService } from 'vs/workbench/services/configuration/common/jsonEditing';
import { IStorageKeysSyncRegistryService } from 'vs/platform/userDataSync/common/storageKeys';
export abstract class AbstractTelemetryOptOut implements IWorkbenchContribution {
@@ -28,7 +27,6 @@ export abstract class AbstractTelemetryOptOut implements IWorkbenchContribution
constructor(
@IStorageService private readonly storageService: IStorageService,
@IStorageKeysSyncRegistryService storageKeysSyncRegistryService: IStorageKeysSyncRegistryService,
@IOpenerService private readonly openerService: IOpenerService,
@INotificationService private readonly notificationService: INotificationService,
@IHostService private readonly hostService: IHostService,
@@ -40,7 +38,6 @@ export abstract class AbstractTelemetryOptOut implements IWorkbenchContribution
@IEnvironmentService private readonly environmentService: IEnvironmentService,
@IJSONEditingService private readonly jsonEditingService: IJSONEditingService
) {
storageKeysSyncRegistryService.registerStorageKey({ key: AbstractTelemetryOptOut.TELEMETRY_OPT_OUT_SHOWN, version: 1 });
}
protected async handleTelemetryOptOut(): Promise<void> {
@@ -53,7 +50,7 @@ export abstract class AbstractTelemetryOptOut implements IWorkbenchContribution
return; // return early if meanwhile another window opened (we only show the opt-out once)
}
this.storageService.store(AbstractTelemetryOptOut.TELEMETRY_OPT_OUT_SHOWN, true, StorageScope.GLOBAL);
this.storageService.store(AbstractTelemetryOptOut.TELEMETRY_OPT_OUT_SHOWN, true, StorageScope.GLOBAL, StorageTarget.USER);
this.privacyUrl = this.productService.privacyStatementUrl || this.productService.telemetryOptOutUrl;
@@ -165,7 +162,6 @@ export class BrowserTelemetryOptOut extends AbstractTelemetryOptOut {
constructor(
@IStorageService storageService: IStorageService,
@IStorageKeysSyncRegistryService storageKeysSyncRegistryService: IStorageKeysSyncRegistryService,
@IOpenerService openerService: IOpenerService,
@INotificationService notificationService: INotificationService,
@IHostService hostService: IHostService,
@@ -177,7 +173,7 @@ export class BrowserTelemetryOptOut extends AbstractTelemetryOptOut {
@IEnvironmentService environmentService: IEnvironmentService,
@IJSONEditingService jsonEditingService: IJSONEditingService
) {
super(storageService, storageKeysSyncRegistryService, openerService, notificationService, hostService, telemetryService, experimentService, configurationService, galleryService, productService, environmentService, jsonEditingService);
super(storageService, openerService, notificationService, hostService, telemetryService, experimentService, configurationService, galleryService, productService, environmentService, jsonEditingService);
this.handleTelemetryOptOut();
}

View File

@@ -16,13 +16,11 @@ import { AbstractTelemetryOptOut } from 'vs/workbench/contrib/welcome/telemetryO
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { IJSONEditingService } from 'vs/workbench/services/configuration/common/jsonEditing';
import { INativeHostService } from 'vs/platform/native/electron-sandbox/native';
import { IStorageKeysSyncRegistryService } from 'vs/platform/userDataSync/common/storageKeys';
export class NativeTelemetryOptOut extends AbstractTelemetryOptOut {
constructor(
@IStorageService storageService: IStorageService,
@IStorageKeysSyncRegistryService storageKeysSyncRegistryService: IStorageKeysSyncRegistryService,
@IOpenerService openerService: IOpenerService,
@INotificationService notificationService: INotificationService,
@IHostService hostService: IHostService,
@@ -35,7 +33,7 @@ export class NativeTelemetryOptOut extends AbstractTelemetryOptOut {
@IJSONEditingService jsonEditingService: IJSONEditingService,
@INativeHostService private readonly nativeHostService: INativeHostService
) {
super(storageService, storageKeysSyncRegistryService, openerService, notificationService, hostService, telemetryService, experimentService, configurationService, galleryService, productService, environmentService, jsonEditingService);
super(storageService, openerService, notificationService, hostService, telemetryService, experimentService, configurationService, galleryService, productService, environmentService, jsonEditingService);
this.handleTelemetryOptOut();
}

View File

@@ -40,7 +40,7 @@ export class EditorWalkThroughAction extends Action {
public run(): Promise<void> {
const input = this.instantiationService.createInstance(WalkThroughInput, inputOptions);
return this.editorService.openEditor(input, { pinned: true })
return this.editorService.openEditor(input, { pinned: true, override: false })
.then(() => void (0));
}
}

View File

@@ -7,6 +7,7 @@
box-sizing: border-box;
padding: 10px 20px;
line-height: 22px;
height: inherit;
user-select: initial;
-webkit-user-select: initial;
}