@codingame/monaco-vscode-walkthrough-service-override 4.5.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.js +51 -136
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.js +146 -253
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors.js +8 -35
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +61 -116
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons.js +5 -4
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +3 -6
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService._contribution.js +44 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +74 -77
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.js +29 -32
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +147 -498
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.js +4 -15
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.js +6 -25
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js +13 -13
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.js +5 -12
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.js +24 -31
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils.js +4 -3
|
@@ -43,7 +43,6 @@ import { firstSessionDateStorageKey } from 'vscode/vscode/vs/platform/telemetry/
|
|
|
43
43
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
44
44
|
import { getTelemetryLevel } from 'vscode/vscode/vs/platform/telemetry/common/telemetryUtils';
|
|
45
45
|
import { defaultToggleStyles, defaultButtonStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
|
|
46
|
-
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
47
46
|
import { UNKNOWN_EMPTY_WINDOW_WORKSPACE } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
48
47
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
49
48
|
import { isRecentFolder, isRecentWorkspace } from 'vscode/vscode/vs/platform/workspaces/common/workspaces';
|
|
@@ -64,16 +63,17 @@ import { startEntries } from '../common/gettingStartedContent.js';
|
|
|
64
63
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
65
64
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
66
65
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
67
|
-
import {
|
|
66
|
+
import { IWorkbenchThemeService } from 'vscode/vscode/vs/workbench/services/themes/common/workbenchThemeService.service';
|
|
68
67
|
import { GettingStartedIndexList } from './gettingStartedList.js';
|
|
69
68
|
import { IWorkbenchAssignmentService } from 'vscode/vscode/vs/workbench/services/assignment/common/assignmentService.service';
|
|
70
69
|
|
|
71
70
|
var GettingStartedPage_1;
|
|
71
|
+
const _moduleId = "vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted";
|
|
72
72
|
const SLIDE_TRANSITION_TIME_MS = 250;
|
|
73
73
|
const configurationKey = 'workbench.startupEditor';
|
|
74
|
-
const allWalkthroughsHiddenContext = ( new RawContextKey('allWalkthroughsHidden', false));
|
|
75
|
-
const inWelcomeContext = ( new RawContextKey('inWelcome', false));
|
|
76
|
-
const parsedStartEntries = ( startEntries.map((e, i) => ({
|
|
74
|
+
const allWalkthroughsHiddenContext = ( (new RawContextKey('allWalkthroughsHidden', false)));
|
|
75
|
+
const inWelcomeContext = ( (new RawContextKey('inWelcome', false)));
|
|
76
|
+
const parsedStartEntries = ( (startEntries.map((e, i) => ({
|
|
77
77
|
command: e.content.command,
|
|
78
78
|
description: e.description,
|
|
79
79
|
icon: { type: 'icon', icon: e.icon },
|
|
@@ -81,7 +81,7 @@ const parsedStartEntries = ( startEntries.map((e, i) => ({
|
|
|
81
81
|
order: i,
|
|
82
82
|
title: e.title,
|
|
83
83
|
when: ContextKeyExpr.deserialize(e.when) ?? ContextKeyExpr.true()
|
|
84
|
-
})));
|
|
84
|
+
}))));
|
|
85
85
|
const REDUCED_MOTION_KEY = 'workbench.welcomePage.preferReducedMotion';
|
|
86
86
|
let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
87
87
|
static { GettingStartedPage_1 = this; }
|
|
@@ -96,6 +96,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
96
96
|
this.languageService = languageService;
|
|
97
97
|
this.fileService = fileService;
|
|
98
98
|
this.openerService = openerService;
|
|
99
|
+
this.themeService = themeService;
|
|
99
100
|
this.storageService = storageService;
|
|
100
101
|
this.extensionService = extensionService;
|
|
101
102
|
this.instantiationService = instantiationService;
|
|
@@ -110,11 +111,11 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
110
111
|
this.accessibilityService = accessibilityService;
|
|
111
112
|
this.tasExperimentService = tasExperimentService;
|
|
112
113
|
this.inProgressScroll = Promise.resolve();
|
|
113
|
-
this.dispatchListeners = ( new DisposableStore());
|
|
114
|
-
this.stepDisposables = ( new DisposableStore());
|
|
115
|
-
this.detailsPageDisposables = ( new DisposableStore());
|
|
116
|
-
this.mediaDisposables = ( new DisposableStore());
|
|
117
|
-
this.buildSlideThrottle = ( new Throttler());
|
|
114
|
+
this.dispatchListeners = ( (new DisposableStore()));
|
|
115
|
+
this.stepDisposables = ( (new DisposableStore()));
|
|
116
|
+
this.detailsPageDisposables = ( (new DisposableStore()));
|
|
117
|
+
this.mediaDisposables = ( (new DisposableStore()));
|
|
118
|
+
this.buildSlideThrottle = ( (new Throttler()));
|
|
118
119
|
this.hasScrolledToFirstCategory = false;
|
|
119
120
|
this.showFeaturedWalkthrough = true;
|
|
120
121
|
this.currentMediaComponent = undefined;
|
|
@@ -122,33 +123,29 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
122
123
|
this.container = $('.gettingStartedContainer', {
|
|
123
124
|
role: 'document',
|
|
124
125
|
tabindex: 0,
|
|
125
|
-
'aria-label': ( localizeWithPath(
|
|
126
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
127
|
-
'welcomeAriaLabel',
|
|
128
|
-
"Overview of how to get up to speed with your editor."
|
|
129
|
-
))
|
|
126
|
+
'aria-label': ( localizeWithPath(_moduleId, 0, "Overview of how to get up to speed with your editor."))
|
|
130
127
|
});
|
|
131
128
|
this.stepMediaComponent = $('.getting-started-media');
|
|
132
129
|
this.stepMediaComponent.id = generateUuid();
|
|
133
|
-
this.categoriesSlideDisposables = this._register(( new DisposableStore()));
|
|
134
|
-
this.detailsRenderer = ( new GettingStartedDetailsRenderer(
|
|
130
|
+
this.categoriesSlideDisposables = this._register(( (new DisposableStore())));
|
|
131
|
+
this.detailsRenderer = ( (new GettingStartedDetailsRenderer(
|
|
135
132
|
this.fileService,
|
|
136
133
|
this.notificationService,
|
|
137
134
|
this.extensionService,
|
|
138
135
|
this.languageService
|
|
139
|
-
));
|
|
136
|
+
)));
|
|
140
137
|
this.contextService = this._register(contextService.createScoped(this.container));
|
|
141
138
|
inWelcomeContext.bindTo(this.contextService).set(true);
|
|
142
139
|
this.gettingStartedCategories = this.gettingStartedService.getWalkthroughs();
|
|
143
140
|
this._register(this.dispatchListeners);
|
|
144
|
-
this.buildSlideThrottle = ( new Throttler());
|
|
141
|
+
this.buildSlideThrottle = ( (new Throttler()));
|
|
145
142
|
const rerender = () => {
|
|
146
143
|
this.gettingStartedCategories = this.gettingStartedService.getWalkthroughs();
|
|
147
144
|
if (this.currentWalkthrough) {
|
|
148
|
-
const existingSteps = ( this.currentWalkthrough.steps.map(step => step.id));
|
|
145
|
+
const existingSteps = ( (this.currentWalkthrough.steps.map(step => step.id)));
|
|
149
146
|
const newCategory = this.gettingStartedCategories.find(category => this.currentWalkthrough?.id === category.id);
|
|
150
147
|
if (newCategory) {
|
|
151
|
-
const newSteps = ( newCategory.steps.map(step => step.id));
|
|
148
|
+
const newSteps = ( (newCategory.steps.map(step => step.id)));
|
|
152
149
|
if (!equals(newSteps, existingSteps)) {
|
|
153
150
|
this.buildSlideThrottle.queue(() => this.buildCategoriesSlide());
|
|
154
151
|
}
|
|
@@ -272,7 +269,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
272
269
|
this.runDispatchCommand(command, argument);
|
|
273
270
|
}));
|
|
274
271
|
this.dispatchListeners.add(addDisposableListener(element, 'keyup', (e) => {
|
|
275
|
-
const keyboardEvent = ( new StandardKeyboardEvent(e));
|
|
272
|
+
const keyboardEvent = ( (new StandardKeyboardEvent(e)));
|
|
276
273
|
e.stopPropagation();
|
|
277
274
|
switch (keyboardEvent.keyCode) {
|
|
278
275
|
case 3 :
|
|
@@ -305,7 +302,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
305
302
|
break;
|
|
306
303
|
}
|
|
307
304
|
case 'openFolder': {
|
|
308
|
-
if (this.contextService.contextMatchesRules(( ContextKeyExpr.and((
|
|
305
|
+
if (this.contextService.contextMatchesRules(( (ContextKeyExpr.and( (WorkbenchStateContext.isEqualTo('workspace'))))))) {
|
|
309
306
|
this.commandService.executeCommand(OpenFolderViaWorkspaceAction.ID);
|
|
310
307
|
}
|
|
311
308
|
else {
|
|
@@ -404,26 +401,24 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
404
401
|
}
|
|
405
402
|
}
|
|
406
403
|
async openWalkthroughSelector() {
|
|
407
|
-
const selection = await this.quickInputService.pick(( this.gettingStartedCategories
|
|
404
|
+
const selection = await this.quickInputService.pick(( (this.gettingStartedCategories
|
|
408
405
|
.filter(c => this.contextService.contextMatchesRules(c.when))
|
|
409
406
|
.map(x => ({
|
|
410
407
|
id: x.id,
|
|
411
408
|
label: x.title,
|
|
412
409
|
detail: x.description,
|
|
413
410
|
description: x.source,
|
|
414
|
-
}))), { canPickMany: false, matchOnDescription: true, matchOnDetail: true, title: ( localizeWithPath(
|
|
415
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
416
|
-
'pickWalkthroughs',
|
|
417
|
-
"Open Walkthrough..."
|
|
418
|
-
)) });
|
|
411
|
+
})))), { canPickMany: false, matchOnDescription: true, matchOnDetail: true, title: ( localizeWithPath(_moduleId, 1, "Open Walkthrough...")) });
|
|
419
412
|
if (selection) {
|
|
420
413
|
this.runDispatchCommand('selectCategory', selection.id);
|
|
421
414
|
}
|
|
422
415
|
}
|
|
423
416
|
getHiddenCategories() {
|
|
424
|
-
return (
|
|
425
|
-
|
|
426
|
-
|
|
417
|
+
return (
|
|
418
|
+
(new Set(
|
|
419
|
+
JSON.parse(this.storageService.get(hiddenEntriesConfigurationKey, 0 , '[]'))
|
|
420
|
+
))
|
|
421
|
+
);
|
|
427
422
|
}
|
|
428
423
|
setHiddenCategories(hidden) {
|
|
429
424
|
this.storageService.store(hiddenEntriesConfigurationKey, JSON.stringify(hidden), 0 , 0 );
|
|
@@ -468,7 +463,9 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
468
463
|
mediaElement.setAttribute('alt', media.altText);
|
|
469
464
|
this.updateMediaSourceForColorMode(mediaElement, media.path);
|
|
470
465
|
this.stepDisposables.add(addDisposableListener(this.stepMediaComponent, 'click', () => {
|
|
471
|
-
const hrefs = flatten(( stepToExpand.description.map(
|
|
466
|
+
const hrefs = flatten(( (stepToExpand.description.map(
|
|
467
|
+
lt => ( (lt.nodes.filter((node) => typeof node !== 'string').map(node => node.href)))
|
|
468
|
+
))));
|
|
472
469
|
if (hrefs.length === 1) {
|
|
473
470
|
const href = hrefs[0];
|
|
474
471
|
if (href.startsWith('http')) {
|
|
@@ -493,7 +490,9 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
493
490
|
}
|
|
494
491
|
}));
|
|
495
492
|
this.stepDisposables.add(addDisposableListener(this.stepMediaComponent, 'click', () => {
|
|
496
|
-
const hrefs = flatten(( stepToExpand.description.map(
|
|
493
|
+
const hrefs = flatten(( (stepToExpand.description.map(
|
|
494
|
+
lt => ( (lt.nodes.filter((node) => typeof node !== 'string').map(node => node.href)))
|
|
495
|
+
))));
|
|
497
496
|
if (hrefs.length === 1) {
|
|
498
497
|
const href = hrefs[0];
|
|
499
498
|
if (href.startsWith('http')) {
|
|
@@ -526,8 +525,10 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
526
525
|
}
|
|
527
526
|
};
|
|
528
527
|
if (serializedContextKeyExprs) {
|
|
529
|
-
const contextKeyExprs = coalesce(( serializedContextKeyExprs.map(expr => ContextKeyExpr.deserialize(expr))));
|
|
530
|
-
const watchingKeys = ( new Set(
|
|
528
|
+
const contextKeyExprs = coalesce(( (serializedContextKeyExprs.map(expr => ContextKeyExpr.deserialize(expr)))));
|
|
529
|
+
const watchingKeys = ( (new Set(
|
|
530
|
+
flatten(( (contextKeyExprs.map(expr => ( (expr.keys()))))))
|
|
531
|
+
)));
|
|
531
532
|
this.stepDisposables.add(this.contextService.onDidChangeContext(e => {
|
|
532
533
|
if (e.affectsSome(watchingKeys)) {
|
|
533
534
|
postTrueKeysMessage();
|
|
@@ -555,7 +556,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
555
556
|
}
|
|
556
557
|
}));
|
|
557
558
|
}
|
|
558
|
-
const layoutDelayer = ( new Delayer(50));
|
|
559
|
+
const layoutDelayer = ( (new Delayer(50)));
|
|
559
560
|
this.layoutMarkdown = () => {
|
|
560
561
|
layoutDelayer.trigger(() => {
|
|
561
562
|
this.webview.postMessage({ layoutMeNow: true });
|
|
@@ -564,13 +565,17 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
564
565
|
this.stepDisposables.add(layoutDelayer);
|
|
565
566
|
this.stepDisposables.add({ dispose: () => this.layoutMarkdown = undefined });
|
|
566
567
|
postTrueKeysMessage();
|
|
567
|
-
this.stepDisposables.add(this.webview.onMessage(e => {
|
|
568
|
+
this.stepDisposables.add(this.webview.onMessage(async (e) => {
|
|
568
569
|
const message = e.message;
|
|
569
570
|
if (message.startsWith('command:')) {
|
|
570
571
|
this.openerService.open(message, { allowCommands: true });
|
|
571
572
|
}
|
|
572
573
|
else if (message.startsWith('setTheme:')) {
|
|
573
|
-
|
|
574
|
+
const themeId = message.slice('setTheme:'.length);
|
|
575
|
+
const theme = (await this.themeService.getColorThemes()).find(theme => theme.settingsId === themeId);
|
|
576
|
+
if (theme) {
|
|
577
|
+
this.themeService.setColorTheme(theme.id, 2 );
|
|
578
|
+
}
|
|
574
579
|
}
|
|
575
580
|
else {
|
|
576
581
|
console.error('Unexpected message', message);
|
|
@@ -618,7 +623,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
618
623
|
}
|
|
619
624
|
updateMediaSourceForColorMode(element, sources) {
|
|
620
625
|
const themeType = this.themeService.getColorTheme().type;
|
|
621
|
-
const src = ( sources[themeType].toString(true)).replace(/ /g, '%20');
|
|
626
|
+
const src = ( (sources[themeType].toString(true))).replace(/ /g, '%20');
|
|
622
627
|
element.srcset = src.toLowerCase().endsWith('.svg') ? src : (src + ' 1.5x');
|
|
623
628
|
}
|
|
624
629
|
createEditor(parent) {
|
|
@@ -629,18 +634,14 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
629
634
|
this.categoriesPageScrollbar.dispose();
|
|
630
635
|
}
|
|
631
636
|
this.categoriesSlide = $('.gettingStartedSlideCategories.gettingStartedSlide');
|
|
632
|
-
const prevButton = $('button.prev-button.button-link', { 'x-dispatch': 'scrollPrev' }, $('span.scroll-button.codicon.codicon-chevron-left'), $('span.moreText', {}, ( localizeWithPath(
|
|
633
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
634
|
-
'welcome',
|
|
635
|
-
"Welcome"
|
|
636
|
-
))));
|
|
637
|
+
const prevButton = $('button.prev-button.button-link', { 'x-dispatch': 'scrollPrev' }, $('span.scroll-button.codicon.codicon-chevron-left'), $('span.moreText', {}, ( localizeWithPath(_moduleId, 2, "Welcome"))));
|
|
637
638
|
this.stepsSlide = $('.gettingStartedSlideDetails.gettingStartedSlide', {}, prevButton);
|
|
638
639
|
this.stepsContent = $('.gettingStartedDetailsContent', {});
|
|
639
|
-
this.detailsPageScrollbar = this._register(( new DomScrollableElement(this.stepsContent, { className: 'full-height-scrollable' })));
|
|
640
|
-
this.categoriesPageScrollbar = this._register(( new DomScrollableElement(
|
|
640
|
+
this.detailsPageScrollbar = this._register(( (new DomScrollableElement(this.stepsContent, { className: 'full-height-scrollable' }))));
|
|
641
|
+
this.categoriesPageScrollbar = this._register(( (new DomScrollableElement(
|
|
641
642
|
this.categoriesSlide,
|
|
642
643
|
{ className: 'full-height-scrollable categoriesScrollbar' }
|
|
643
|
-
)));
|
|
644
|
+
))));
|
|
644
645
|
this.stepsSlide.appendChild(this.detailsPageScrollbar.getDomNode());
|
|
645
646
|
const gettingStartedPage = $('.gettingStarted', {}, this.categoriesPageScrollbar.getDomNode(), this.stepsSlide);
|
|
646
647
|
this.container.appendChild(gettingStartedPage);
|
|
@@ -650,23 +651,15 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
650
651
|
}
|
|
651
652
|
async buildCategoriesSlide() {
|
|
652
653
|
this.categoriesSlideDisposables.clear();
|
|
653
|
-
const showOnStartupCheckbox = ( new Toggle({
|
|
654
|
+
const showOnStartupCheckbox = ( (new Toggle({
|
|
654
655
|
icon: Codicon.check,
|
|
655
656
|
actionClassName: 'getting-started-checkbox',
|
|
656
657
|
isChecked: this.configurationService.getValue(configurationKey) === 'welcomePage',
|
|
657
|
-
title: ( localizeWithPath(
|
|
658
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
659
|
-
'checkboxTitle',
|
|
660
|
-
"When checked, this page will be shown on startup."
|
|
661
|
-
)),
|
|
658
|
+
title: ( localizeWithPath(_moduleId, 3, "When checked, this page will be shown on startup.")),
|
|
662
659
|
...defaultToggleStyles
|
|
663
|
-
}));
|
|
660
|
+
})));
|
|
664
661
|
showOnStartupCheckbox.domNode.id = 'showOnStartup';
|
|
665
|
-
const showOnStartupLabel = $('label.caption', { for: 'showOnStartup' }, ( localizeWithPath(
|
|
666
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
667
|
-
'welcomePage.showOnStartup',
|
|
668
|
-
"Show welcome page on startup"
|
|
669
|
-
)));
|
|
662
|
+
const showOnStartupLabel = $('label.caption', { for: 'showOnStartup' }, ( localizeWithPath(_moduleId, 4, "Show welcome page on startup")));
|
|
670
663
|
const onShowOnStartupChanged = () => {
|
|
671
664
|
if (showOnStartupCheckbox.checked) {
|
|
672
665
|
this.telemetryService.publicLog2('gettingStarted.ActionExecuted', { command: 'showOnStartupChecked', argument: undefined, walkthroughId: this.currentWalkthrough?.id });
|
|
@@ -685,18 +678,14 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
685
678
|
showOnStartupCheckbox.checked = !showOnStartupCheckbox.checked;
|
|
686
679
|
onShowOnStartupChanged();
|
|
687
680
|
}));
|
|
688
|
-
const header = $('.header', {}, $('h1.product-name.caption', {}, this.productService.nameLong), $('p.subtitle.description', {}, ( localizeWithPath(
|
|
689
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
690
|
-
{ key: 'gettingStarted.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] },
|
|
691
|
-
"Editing evolved"
|
|
692
|
-
))));
|
|
681
|
+
const header = $('.header', {}, $('h1.product-name.caption', {}, this.productService.nameLong), $('p.subtitle.description', {}, ( localizeWithPath(_moduleId, 5, "Editing evolved"))));
|
|
693
682
|
const leftColumn = $('.categories-column.categories-column-left', {});
|
|
694
683
|
const rightColumn = $('.categories-column.categories-column-right', {});
|
|
695
684
|
const startList = this.buildStartList();
|
|
696
685
|
const recentList = this.buildRecentlyOpenedList();
|
|
697
686
|
const showVideoTutorials = await Promise.race([
|
|
698
687
|
this.tasExperimentService?.getTreatment('gettingStarted.showVideoTutorials'),
|
|
699
|
-
( new Promise(resolve => setTimeout(() => resolve(false), 200)))
|
|
688
|
+
( (new Promise(resolve => setTimeout(() => resolve(false), 200))))
|
|
700
689
|
]);
|
|
701
690
|
let videoList;
|
|
702
691
|
if (showVideoTutorials === true) {
|
|
@@ -776,15 +765,15 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
776
765
|
return;
|
|
777
766
|
}
|
|
778
767
|
}
|
|
779
|
-
const someStepsComplete = ( this.gettingStartedCategories.some(category => category.steps.find(s => s.done)));
|
|
768
|
+
const someStepsComplete = ( (this.gettingStartedCategories.some(category => category.steps.find(s => s.done))));
|
|
780
769
|
if (this.editorInput.showTelemetryNotice && this.productService.openToWelcomeMainPage) {
|
|
781
770
|
const telemetryNotice = $('p.telemetry-notice');
|
|
782
771
|
this.buildTelemetryFooter(telemetryNotice);
|
|
783
772
|
footer.appendChild(telemetryNotice);
|
|
784
773
|
}
|
|
785
774
|
else if (!this.productService.openToWelcomeMainPage && !someStepsComplete && !this.hasScrolledToFirstCategory && this.showFeaturedWalkthrough) {
|
|
786
|
-
const firstSessionDateString = this.storageService.get(firstSessionDateStorageKey, -1 ) || ( new Date()).toUTCString();
|
|
787
|
-
const daysSinceFirstSession = ((+( new Date())) - (+( new Date(firstSessionDateString)))) / 1000 / 60 / 60 / 24;
|
|
775
|
+
const firstSessionDateString = this.storageService.get(firstSessionDateStorageKey, -1 ) || ( (new Date())).toUTCString();
|
|
776
|
+
const daysSinceFirstSession = ((+( (new Date()))) - (+( (new Date(firstSessionDateString))))) / 1000 / 60 / 60 / 24;
|
|
788
777
|
const fistContentBehaviour = daysSinceFirstSession < 1 ? 'openToFirstCategory' : 'index';
|
|
789
778
|
if (fistContentBehaviour === 'openToFirstCategory') {
|
|
790
779
|
const first = this.gettingStartedCategories.filter(c => !c.when || this.contextService.contextMatchesRules(c.when))[0];
|
|
@@ -817,13 +806,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
817
806
|
const link = $('button.button-link');
|
|
818
807
|
link.innerText = name;
|
|
819
808
|
link.title = fullPath;
|
|
820
|
-
link.setAttribute('aria-label', ( localizeWithPath(
|
|
821
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
822
|
-
'welcomePage.openFolderWithPath',
|
|
823
|
-
"Open folder {0} with path {1}",
|
|
824
|
-
name,
|
|
825
|
-
parentPath
|
|
826
|
-
)));
|
|
809
|
+
link.setAttribute('aria-label', ( localizeWithPath(_moduleId, 6, "Open folder {0} with path {1}", name, parentPath)));
|
|
827
810
|
link.addEventListener('click', e => {
|
|
828
811
|
this.telemetryService.publicLog2('gettingStarted.ActionExecuted', { command: 'openRecent', argument: undefined, walkthroughId: this.currentWalkthrough?.id });
|
|
829
812
|
this.hostService.openWindow([windowOpenable], {
|
|
@@ -845,50 +828,30 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
845
828
|
if (this.recentlyOpenedList) {
|
|
846
829
|
this.recentlyOpenedList.dispose();
|
|
847
830
|
}
|
|
848
|
-
const recentlyOpenedList = this.recentlyOpenedList = ( new GettingStartedIndexList({
|
|
849
|
-
title: ( localizeWithPath(
|
|
850
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
851
|
-
'recent',
|
|
852
|
-
"Recent"
|
|
853
|
-
)),
|
|
831
|
+
const recentlyOpenedList = this.recentlyOpenedList = ( (new GettingStartedIndexList({
|
|
832
|
+
title: ( localizeWithPath(_moduleId, 7, "Recent")),
|
|
854
833
|
klass: 'recently-opened',
|
|
855
834
|
limit: 5,
|
|
856
|
-
empty: $('.empty-recent', {}, ( localizeWithPath(
|
|
857
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
858
|
-
'noRecents',
|
|
859
|
-
"You have no recent folders,"
|
|
860
|
-
)), $('button.button-link', { 'x-dispatch': 'openFolder' }, ( localizeWithPath(
|
|
861
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
862
|
-
'openFolder',
|
|
863
|
-
"open a folder"
|
|
864
|
-
))), ( localizeWithPath(
|
|
865
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
866
|
-
'toStart',
|
|
867
|
-
"to start."
|
|
868
|
-
))),
|
|
835
|
+
empty: $('.empty-recent', {}, ( localizeWithPath(_moduleId, 8, "You have no recent folders,")), $('button.button-link', { 'x-dispatch': 'openFolder' }, ( localizeWithPath(_moduleId, 9, "open a folder"))), ( localizeWithPath(_moduleId, 10, "to start."))),
|
|
869
836
|
more: $('.more', {}, $('button.button-link', {
|
|
870
837
|
'x-dispatch': 'showMoreRecents',
|
|
871
838
|
title: ( localizeWithPath(
|
|
872
|
-
|
|
873
|
-
|
|
839
|
+
_moduleId,
|
|
840
|
+
11,
|
|
874
841
|
"Show All Recent Folders {0}",
|
|
875
842
|
this.getKeybindingLabel(OpenRecentAction.ID)
|
|
876
843
|
))
|
|
877
|
-
}, ( localizeWithPath(
|
|
878
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
879
|
-
'showAll',
|
|
880
|
-
"More..."
|
|
881
|
-
)))),
|
|
844
|
+
}, ( localizeWithPath(_moduleId, 12, "More...")))),
|
|
882
845
|
renderElement: renderRecent,
|
|
883
846
|
contextService: this.contextService
|
|
884
|
-
}));
|
|
847
|
+
})));
|
|
885
848
|
recentlyOpenedList.onDidChange(() => this.registerDispatchListeners());
|
|
886
849
|
this.recentlyOpened.then(({ workspaces }) => {
|
|
887
|
-
const workspacesWithID = ( workspaces
|
|
850
|
+
const workspacesWithID = ( (workspaces
|
|
888
851
|
.filter(recent => !this.workspaceContextService.isCurrentWorkspace(isRecentWorkspace(recent) ? recent.workspace : recent.folderUri))
|
|
889
852
|
.map(
|
|
890
|
-
recent => ({ ...recent, id: isRecentWorkspace(recent) ? recent.workspace.id : ( recent.folderUri.toString()) })
|
|
891
|
-
));
|
|
853
|
+
recent => ({ ...recent, id: isRecentWorkspace(recent) ? recent.workspace.id : ( (recent.folderUri.toString())) })
|
|
854
|
+
)));
|
|
892
855
|
const updateEntries = () => {
|
|
893
856
|
recentlyOpenedList.setEntries(workspacesWithID);
|
|
894
857
|
};
|
|
@@ -905,18 +868,14 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
905
868
|
if (this.startList) {
|
|
906
869
|
this.startList.dispose();
|
|
907
870
|
}
|
|
908
|
-
const startList = this.startList = ( new GettingStartedIndexList({
|
|
909
|
-
title: ( localizeWithPath(
|
|
910
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
911
|
-
'start',
|
|
912
|
-
"Start"
|
|
913
|
-
)),
|
|
871
|
+
const startList = this.startList = ( (new GettingStartedIndexList({
|
|
872
|
+
title: ( localizeWithPath(_moduleId, 13, "Start")),
|
|
914
873
|
klass: 'start-container',
|
|
915
874
|
limit: 10,
|
|
916
875
|
renderElement: renderStartEntry,
|
|
917
876
|
rankElement: e => -e.order,
|
|
918
877
|
contextService: this.contextService
|
|
919
|
-
}));
|
|
878
|
+
})));
|
|
920
879
|
startList.setEntries(parsedStartEntries);
|
|
921
880
|
startList.onDidChange(() => this.registerDispatchListeners());
|
|
922
881
|
return startList;
|
|
@@ -926,18 +885,10 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
926
885
|
const renderNewBadge = (category.newItems || category.newEntry) && !category.isFeatured;
|
|
927
886
|
const newBadge = $('.new-badge', {});
|
|
928
887
|
if (category.newEntry) {
|
|
929
|
-
reset(newBadge, $('.new-category', {}, ( localizeWithPath(
|
|
930
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
931
|
-
'new',
|
|
932
|
-
"New"
|
|
933
|
-
))));
|
|
888
|
+
reset(newBadge, $('.new-category', {}, ( localizeWithPath(_moduleId, 14, "New"))));
|
|
934
889
|
}
|
|
935
890
|
else if (category.newItems) {
|
|
936
|
-
reset(newBadge, $('.new-items', {}, ( localizeWithPath(
|
|
937
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
938
|
-
{ key: 'newItems', comment: ['Shown when a list of items has changed based on an update from a remote source'] },
|
|
939
|
-
"Updated"
|
|
940
|
-
))));
|
|
891
|
+
reset(newBadge, $('.new-items', {}, ( localizeWithPath(_moduleId, 15, "Updated"))));
|
|
941
892
|
}
|
|
942
893
|
const featuredBadge = $('.featured-badge', {});
|
|
943
894
|
const descriptionContent = $('.description-content', {});
|
|
@@ -953,17 +904,9 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
953
904
|
}, featuredBadge, $('.main-content', {}, this.iconWidgetFor(category), titleContent, renderNewBadge ? newBadge : $('.no-badge'), $('a.codicon.codicon-close.hide-category-button', {
|
|
954
905
|
'tabindex': 0,
|
|
955
906
|
'x-dispatch': 'hideCategory:' + category.id,
|
|
956
|
-
'title': ( localizeWithPath(
|
|
957
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
958
|
-
'close',
|
|
959
|
-
"Hide"
|
|
960
|
-
)),
|
|
907
|
+
'title': ( localizeWithPath(_moduleId, 16, "Hide")),
|
|
961
908
|
'role': 'button',
|
|
962
|
-
'aria-label': ( localizeWithPath(
|
|
963
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
964
|
-
'closeAriaLabel',
|
|
965
|
-
"Hide"
|
|
966
|
-
)),
|
|
909
|
+
'aria-label': ( localizeWithPath(_moduleId, 17, "Hide")),
|
|
967
910
|
})), descriptionContent, $('.category-progress', { 'x-data-category-id': category.id, }, $('.progress-bar-outer', { 'role': 'progressbar' }, $('.progress-bar-inner'))));
|
|
968
911
|
};
|
|
969
912
|
if (this.gettingStartedList) {
|
|
@@ -983,28 +926,20 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
983
926
|
if (e.recencyBonus) {
|
|
984
927
|
rank += 4 * e.recencyBonus;
|
|
985
928
|
}
|
|
986
|
-
if (( this.getHiddenCategories().has(e.id))) {
|
|
929
|
+
if (( (this.getHiddenCategories().has(e.id)))) {
|
|
987
930
|
rank = null;
|
|
988
931
|
}
|
|
989
932
|
return rank;
|
|
990
933
|
};
|
|
991
|
-
const gettingStartedList = this.gettingStartedList = ( new GettingStartedIndexList({
|
|
992
|
-
title: ( localizeWithPath(
|
|
993
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
994
|
-
'walkthroughs',
|
|
995
|
-
"Walkthroughs"
|
|
996
|
-
)),
|
|
934
|
+
const gettingStartedList = this.gettingStartedList = ( (new GettingStartedIndexList({
|
|
935
|
+
title: ( localizeWithPath(_moduleId, 18, "Walkthroughs")),
|
|
997
936
|
klass: 'getting-started',
|
|
998
937
|
limit: 5,
|
|
999
|
-
footer: $('span.button-link.see-all-walkthroughs', { 'x-dispatch': 'seeAllWalkthroughs', 'tabindex': 0 }, ( localizeWithPath(
|
|
1000
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
1001
|
-
'showAll',
|
|
1002
|
-
"More..."
|
|
1003
|
-
))),
|
|
938
|
+
footer: $('span.button-link.see-all-walkthroughs', { 'x-dispatch': 'seeAllWalkthroughs', 'tabindex': 0 }, ( localizeWithPath(_moduleId, 12, "More..."))),
|
|
1004
939
|
renderElement: renderGetttingStaredWalkthrough,
|
|
1005
940
|
rankElement: rankWalkthrough,
|
|
1006
941
|
contextService: this.contextService,
|
|
1007
|
-
}));
|
|
942
|
+
})));
|
|
1008
943
|
gettingStartedList.onDidChange(() => {
|
|
1009
944
|
const hidden = this.getHiddenCategories();
|
|
1010
945
|
const someWalkthroughsHidden = hidden.size || gettingStartedList.itemCount < this.gettingStartedCategories.filter(c => this.contextService.contextMatchesRules(c.when)).length;
|
|
@@ -1031,46 +966,30 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1031
966
|
}, featuredBadge, $('.main-content', {}, this.iconWidgetFor(entry), titleContent, $('a.codicon.codicon-close.hide-category-button', {
|
|
1032
967
|
'tabindex': 0,
|
|
1033
968
|
'x-dispatch': 'hideVideos',
|
|
1034
|
-
'title': ( localizeWithPath(
|
|
1035
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
1036
|
-
'close',
|
|
1037
|
-
"Hide"
|
|
1038
|
-
)),
|
|
969
|
+
'title': ( localizeWithPath(_moduleId, 16, "Hide")),
|
|
1039
970
|
'role': 'button',
|
|
1040
|
-
'aria-label': ( localizeWithPath(
|
|
1041
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
1042
|
-
'closeAriaLabel',
|
|
1043
|
-
"Hide"
|
|
1044
|
-
)),
|
|
971
|
+
'aria-label': ( localizeWithPath(_moduleId, 17, "Hide")),
|
|
1045
972
|
})), descriptionContent);
|
|
1046
973
|
};
|
|
1047
974
|
if (this.videoList) {
|
|
1048
975
|
this.videoList.dispose();
|
|
1049
976
|
}
|
|
1050
|
-
const videoList = this.videoList = ( new GettingStartedIndexList({
|
|
1051
|
-
title: ( localizeWithPath(
|
|
1052
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
1053
|
-
'videos',
|
|
1054
|
-
"Videos"
|
|
1055
|
-
)),
|
|
977
|
+
const videoList = this.videoList = ( (new GettingStartedIndexList({
|
|
978
|
+
title: ( localizeWithPath(_moduleId, 19, "Videos")),
|
|
1056
979
|
klass: 'getting-started-videos',
|
|
1057
980
|
limit: 1,
|
|
1058
981
|
renderElement: renderFeaturedExtensions,
|
|
1059
982
|
contextService: this.contextService,
|
|
1060
|
-
}));
|
|
1061
|
-
if (( this.getHiddenCategories().has('getting-started-videos'))) {
|
|
983
|
+
})));
|
|
984
|
+
if (( (this.getHiddenCategories().has('getting-started-videos')))) {
|
|
1062
985
|
return videoList;
|
|
1063
986
|
}
|
|
1064
987
|
videoList.setEntries([{
|
|
1065
988
|
id: 'getting-started-videos',
|
|
1066
|
-
title: ( localizeWithPath(
|
|
1067
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
1068
|
-
'videos-title',
|
|
1069
|
-
'Watch Getting Started Tutorials'
|
|
1070
|
-
)),
|
|
989
|
+
title: ( localizeWithPath(_moduleId, 20, 'Watch Getting Started Tutorials')),
|
|
1071
990
|
description: ( localizeWithPath(
|
|
1072
|
-
|
|
1073
|
-
|
|
991
|
+
_moduleId,
|
|
992
|
+
21,
|
|
1074
993
|
'Learn VS Code\'s must-have features in short and practical videos'
|
|
1075
994
|
)),
|
|
1076
995
|
command: 'https://aka.ms/vscode-getting-started-tutorials',
|
|
@@ -1118,17 +1037,12 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1118
1037
|
bar.style.width = `${progress}%`;
|
|
1119
1038
|
element.parentElement.classList.toggle('no-progress', stats.stepsComplete === 0);
|
|
1120
1039
|
if (stats.stepsTotal === stats.stepsComplete) {
|
|
1121
|
-
bar.title = ( localizeWithPath(
|
|
1122
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
1123
|
-
'gettingStarted.allStepsComplete',
|
|
1124
|
-
"All {0} steps complete!",
|
|
1125
|
-
stats.stepsComplete
|
|
1126
|
-
));
|
|
1040
|
+
bar.title = ( localizeWithPath(_moduleId, 22, "All {0} steps complete!", stats.stepsComplete));
|
|
1127
1041
|
}
|
|
1128
1042
|
else {
|
|
1129
1043
|
bar.title = ( localizeWithPath(
|
|
1130
|
-
|
|
1131
|
-
|
|
1044
|
+
_moduleId,
|
|
1045
|
+
23,
|
|
1132
1046
|
"{0} of {1} steps complete",
|
|
1133
1047
|
stats.stepsComplete,
|
|
1134
1048
|
stats.stepsTotal
|
|
@@ -1137,7 +1051,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1137
1051
|
});
|
|
1138
1052
|
}
|
|
1139
1053
|
async scrollToCategory(categoryID, stepId) {
|
|
1140
|
-
if (!( this.gettingStartedCategories.some(c => c.id === categoryID))) {
|
|
1054
|
+
if (!( (this.gettingStartedCategories.some(c => c.id === categoryID)))) {
|
|
1141
1055
|
this.gettingStartedCategories = this.gettingStartedService.getWalkthroughs();
|
|
1142
1056
|
}
|
|
1143
1057
|
const ourCategory = this.gettingStartedCategories.find(c => c.id === categoryID);
|
|
@@ -1185,7 +1099,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1185
1099
|
this.focusSideEditorGroup();
|
|
1186
1100
|
}
|
|
1187
1101
|
if (isCommand) {
|
|
1188
|
-
const commandURI = ( URI.parse(command));
|
|
1102
|
+
const commandURI = ( (URI.parse(command)));
|
|
1189
1103
|
let args = [];
|
|
1190
1104
|
try {
|
|
1191
1105
|
args = parse(decodeURIComponent(commandURI.query));
|
|
@@ -1200,8 +1114,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1200
1114
|
if (!Array.isArray(args)) {
|
|
1201
1115
|
args = [args];
|
|
1202
1116
|
}
|
|
1203
|
-
if ((commandURI.path === ( OpenFileFolderAction.ID.toString()) ||
|
|
1204
|
-
commandURI.path === ( OpenFolderAction.ID.toString())) &&
|
|
1117
|
+
if ((commandURI.path === ( (OpenFileFolderAction.ID.toString())) ||
|
|
1118
|
+
commandURI.path === ( (OpenFolderAction.ID.toString()))) &&
|
|
1205
1119
|
this.workspaceContextService.getWorkspace().folders.length === 0) {
|
|
1206
1120
|
const selectedStepIndex = this.currentWalkthrough?.steps.findIndex(step => step.id === this.editorInput.selectedStep);
|
|
1207
1121
|
if (selectedStepIndex !== undefined &&
|
|
@@ -1218,7 +1132,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1218
1132
|
console.warn('Warn: Running walkthrough command', href, 'yielded non-URI `openFolder` result', toOpen, '. It will be disregarded.');
|
|
1219
1133
|
return;
|
|
1220
1134
|
}
|
|
1221
|
-
const restoreData = { folder: ( toOpen.toString()), category: this.editorInput.selectedCategory, step: this.editorInput.selectedStep };
|
|
1135
|
+
const restoreData = { folder: ( (toOpen.toString())), category: this.editorInput.selectedCategory, step: this.editorInput.selectedStep };
|
|
1222
1136
|
this.storageService.store(restoreWalkthroughsConfigurationKey, JSON.stringify(restoreData), 0 , 1 );
|
|
1223
1137
|
this.hostService.openWindow([{ folderUri: toOpen }]);
|
|
1224
1138
|
}
|
|
@@ -1239,10 +1153,10 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1239
1153
|
if (linkedText.nodes.length === 1 && typeof linkedText.nodes[0] !== 'string') {
|
|
1240
1154
|
const node = linkedText.nodes[0];
|
|
1241
1155
|
const buttonContainer = append(container, $('.button-container'));
|
|
1242
|
-
const button = ( new Button(
|
|
1156
|
+
const button = ( (new Button(
|
|
1243
1157
|
buttonContainer,
|
|
1244
1158
|
{ title: node.title, supportIcons: true, ...defaultButtonStyles }
|
|
1245
|
-
));
|
|
1159
|
+
)));
|
|
1246
1160
|
const isCommand = node.href.startsWith('command:');
|
|
1247
1161
|
const command = node.href.replace(/command:(toSide:)?/, 'command:');
|
|
1248
1162
|
button.label = node.label;
|
|
@@ -1254,11 +1168,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1254
1168
|
if (isCommand) {
|
|
1255
1169
|
const keybindingLabel = this.getKeybindingLabel(command);
|
|
1256
1170
|
if (keybindingLabel) {
|
|
1257
|
-
container.appendChild($('span.shortcut-message', {}, ( localizeWithPath(
|
|
1258
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
1259
|
-
'gettingStarted.keyboardTip',
|
|
1260
|
-
'Tip: Use keyboard shortcut '
|
|
1261
|
-
)), $('span.keybinding', {}, keybindingLabel)));
|
|
1171
|
+
container.appendChild($('span.shortcut-message', {}, ( localizeWithPath(_moduleId, 24, 'Tip: Use keyboard shortcut ')), $('span.keybinding', {}, keybindingLabel)));
|
|
1262
1172
|
}
|
|
1263
1173
|
}
|
|
1264
1174
|
this.detailsPageDisposables.add(button);
|
|
@@ -1308,7 +1218,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1308
1218
|
const categoryDescriptorComponent = $('.getting-started-category', {}, $('.category-description-container', {}, $('h2.category-title.max-lines-3', { 'x-category-title-for': category.id }, ...renderLabelWithIcons(category.title)), descriptionContainer));
|
|
1309
1219
|
const stepListContainer = $('.step-list-container');
|
|
1310
1220
|
this.detailsPageDisposables.add(addDisposableListener(stepListContainer, 'keydown', (e) => {
|
|
1311
|
-
const event = ( new StandardKeyboardEvent(e));
|
|
1221
|
+
const event = ( (new StandardKeyboardEvent(e)));
|
|
1312
1222
|
const currentStepIndex = () => category.steps.findIndex(e => e.id === this.editorInput.selectedStep);
|
|
1313
1223
|
if (event.keyCode === 16 ) {
|
|
1314
1224
|
const toExpand = category.steps.filter((step, index) => index < currentStepIndex() && this.contextService.contextMatchesRules(step.when));
|
|
@@ -1324,7 +1234,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1324
1234
|
}
|
|
1325
1235
|
}));
|
|
1326
1236
|
let renderedSteps = undefined;
|
|
1327
|
-
const contextKeysToWatch = ( new Set(category.steps.flatMap(step => ( step.when.keys()))));
|
|
1237
|
+
const contextKeysToWatch = ( (new Set(category.steps.flatMap(step => ( (step.when.keys()))))));
|
|
1328
1238
|
const buildStepList = () => {
|
|
1329
1239
|
category.steps.sort((a, b) => a.order - b.order);
|
|
1330
1240
|
const toRender = category.steps
|
|
@@ -1333,7 +1243,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1333
1243
|
return;
|
|
1334
1244
|
}
|
|
1335
1245
|
renderedSteps = toRender;
|
|
1336
|
-
reset(stepListContainer, ...( renderedSteps
|
|
1246
|
+
reset(stepListContainer, ...( (renderedSteps
|
|
1337
1247
|
.map(step => {
|
|
1338
1248
|
const codicon = $('.codicon' + (step.done ? '.complete' + ThemeIcon.asCSSSelector(gettingStartedCheckedCodicon) : ThemeIcon.asCSSSelector(gettingStartedUncheckedCodicon)), {
|
|
1339
1249
|
'data-done-step-id': step.id,
|
|
@@ -1348,12 +1258,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1348
1258
|
reset(stepTitle, ...renderLabelWithIcons(step.title));
|
|
1349
1259
|
const stepDescription = $('.step-container', {}, stepTitle, container);
|
|
1350
1260
|
if (step.media.type === 'image') {
|
|
1351
|
-
stepDescription.appendChild($('.image-description', { 'aria-label': ( localizeWithPath(
|
|
1352
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
1353
|
-
'imageShowing',
|
|
1354
|
-
"Image showing {0}",
|
|
1355
|
-
step.media.altText
|
|
1356
|
-
)) }));
|
|
1261
|
+
stepDescription.appendChild($('.image-description', { 'aria-label': ( localizeWithPath(_moduleId, 25, "Image showing {0}", step.media.altText)) }));
|
|
1357
1262
|
}
|
|
1358
1263
|
return $('button.getting-started-step', {
|
|
1359
1264
|
'x-dispatch': 'selectTask:' + step.id,
|
|
@@ -1362,7 +1267,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1362
1267
|
'aria-checked': step.done ? 'true' : 'false',
|
|
1363
1268
|
'role': 'button',
|
|
1364
1269
|
}, codicon, stepDescription);
|
|
1365
|
-
})));
|
|
1270
|
+
}))));
|
|
1366
1271
|
};
|
|
1367
1272
|
buildStepList();
|
|
1368
1273
|
this.detailsPageDisposables.add(this.contextService.onDidChangeContext(e => {
|
|
@@ -1373,18 +1278,10 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1373
1278
|
}
|
|
1374
1279
|
}));
|
|
1375
1280
|
const showNextCategory = this.gettingStartedCategories.find(_category => _category.id === category.next);
|
|
1376
|
-
const stepsContainer = $('.getting-started-detail-container', { 'role': 'list' }, stepListContainer, $('.done-next-container', {}, $('button.button-link.all-done', { 'x-dispatch': 'allDone' }, $('span.codicon.codicon-check-all'), ( localizeWithPath(
|
|
1377
|
-
'
|
|
1378
|
-
'allDone',
|
|
1379
|
-
"Mark Done"
|
|
1380
|
-
))), ...(showNextCategory
|
|
1381
|
-
? [$('button.button-link.next', { 'x-dispatch': 'nextSection' }, ( localizeWithPath(
|
|
1382
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
1383
|
-
'nextOne',
|
|
1384
|
-
"Next Section"
|
|
1385
|
-
)), $('span.codicon.codicon-arrow-right'))]
|
|
1281
|
+
const stepsContainer = $('.getting-started-detail-container', { 'role': 'list' }, stepListContainer, $('.done-next-container', {}, $('button.button-link.all-done', { 'x-dispatch': 'allDone' }, $('span.codicon.codicon-check-all'), ( localizeWithPath(_moduleId, 26, "Mark Done"))), ...(showNextCategory
|
|
1282
|
+
? [$('button.button-link.next', { 'x-dispatch': 'nextSection' }, ( localizeWithPath(_moduleId, 27, "Next Section")), $('span.codicon.codicon-arrow-right'))]
|
|
1386
1283
|
: [])));
|
|
1387
|
-
this.detailsScrollbar = this._register(( new DomScrollableElement(stepsContainer, { className: 'steps-container' })));
|
|
1284
|
+
this.detailsScrollbar = this._register(( (new DomScrollableElement(stepsContainer, { className: 'steps-container' }))));
|
|
1388
1285
|
const stepListComponent = this.detailsScrollbar.getDomNode();
|
|
1389
1286
|
const categoryFooter = $('.getting-started-footer');
|
|
1390
1287
|
if (this.editorInput.showTelemetryNotice && getTelemetryLevel(this.configurationService) !== 0 && this.productService.enableTelemetry) {
|
|
@@ -1399,21 +1296,13 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1399
1296
|
}
|
|
1400
1297
|
buildTelemetryFooter(parent) {
|
|
1401
1298
|
const mdRenderer = this.instantiationService.createInstance(MarkdownRenderer, {});
|
|
1402
|
-
const privacyStatementCopy = ( localizeWithPath(
|
|
1403
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
1404
|
-
'privacy statement',
|
|
1405
|
-
"privacy statement"
|
|
1406
|
-
));
|
|
1299
|
+
const privacyStatementCopy = ( localizeWithPath(_moduleId, 28, "privacy statement"));
|
|
1407
1300
|
const privacyStatementButton = `[${privacyStatementCopy}](command:workbench.action.openPrivacyStatementUrl)`;
|
|
1408
|
-
const optOutCopy = ( localizeWithPath(
|
|
1409
|
-
'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted',
|
|
1410
|
-
'optOut',
|
|
1411
|
-
"opt out"
|
|
1412
|
-
));
|
|
1301
|
+
const optOutCopy = ( localizeWithPath(_moduleId, 29, "opt out"));
|
|
1413
1302
|
const optOutButton = `[${optOutCopy}](command:settings.filterByTelemetry)`;
|
|
1414
1303
|
const text = ( localizeWithPath(
|
|
1415
|
-
|
|
1416
|
-
|
|
1304
|
+
_moduleId,
|
|
1305
|
+
30,
|
|
1417
1306
|
"{0} collects usage data. Read our {1} and learn how to {2}.",
|
|
1418
1307
|
this.productService.nameShort,
|
|
1419
1308
|
privacyStatementButton,
|
|
@@ -1488,32 +1377,32 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1488
1377
|
}
|
|
1489
1378
|
}
|
|
1490
1379
|
};
|
|
1491
|
-
GettingStartedPage = GettingStartedPage_1 = ( __decorate([
|
|
1492
|
-
( __param(1, ICommandService)),
|
|
1493
|
-
( __param(2, IProductService)),
|
|
1494
|
-
( __param(3, IKeybindingService)),
|
|
1495
|
-
( __param(4, IWalkthroughsService)),
|
|
1496
|
-
( __param(5, IConfigurationService)),
|
|
1497
|
-
( __param(6, ITelemetryService)),
|
|
1498
|
-
( __param(7, ILanguageService)),
|
|
1499
|
-
( __param(8, IFileService)),
|
|
1500
|
-
( __param(9, IOpenerService)),
|
|
1501
|
-
( __param(10,
|
|
1502
|
-
( __param(11, IStorageService)),
|
|
1503
|
-
( __param(12, IExtensionService)),
|
|
1504
|
-
( __param(13, IInstantiationService)),
|
|
1505
|
-
( __param(14, INotificationService)),
|
|
1506
|
-
( __param(15, IEditorGroupsService)),
|
|
1507
|
-
( __param(16, IContextKeyService)),
|
|
1508
|
-
( __param(17, IQuickInputService)),
|
|
1509
|
-
( __param(18, IWorkspacesService)),
|
|
1510
|
-
( __param(19, ILabelService)),
|
|
1511
|
-
( __param(20, IHostService)),
|
|
1512
|
-
( __param(21, IWebviewService)),
|
|
1513
|
-
( __param(22, IWorkspaceContextService)),
|
|
1514
|
-
( __param(23, IAccessibilityService)),
|
|
1515
|
-
( __param(24, IWorkbenchAssignmentService))
|
|
1516
|
-
], GettingStartedPage));
|
|
1380
|
+
GettingStartedPage = GettingStartedPage_1 = ( (__decorate([
|
|
1381
|
+
( (__param(1, ICommandService))),
|
|
1382
|
+
( (__param(2, IProductService))),
|
|
1383
|
+
( (__param(3, IKeybindingService))),
|
|
1384
|
+
( (__param(4, IWalkthroughsService))),
|
|
1385
|
+
( (__param(5, IConfigurationService))),
|
|
1386
|
+
( (__param(6, ITelemetryService))),
|
|
1387
|
+
( (__param(7, ILanguageService))),
|
|
1388
|
+
( (__param(8, IFileService))),
|
|
1389
|
+
( (__param(9, IOpenerService))),
|
|
1390
|
+
( (__param(10, IWorkbenchThemeService))),
|
|
1391
|
+
( (__param(11, IStorageService))),
|
|
1392
|
+
( (__param(12, IExtensionService))),
|
|
1393
|
+
( (__param(13, IInstantiationService))),
|
|
1394
|
+
( (__param(14, INotificationService))),
|
|
1395
|
+
( (__param(15, IEditorGroupsService))),
|
|
1396
|
+
( (__param(16, IContextKeyService))),
|
|
1397
|
+
( (__param(17, IQuickInputService))),
|
|
1398
|
+
( (__param(18, IWorkspacesService))),
|
|
1399
|
+
( (__param(19, ILabelService))),
|
|
1400
|
+
( (__param(20, IHostService))),
|
|
1401
|
+
( (__param(21, IWebviewService))),
|
|
1402
|
+
( (__param(22, IWorkspaceContextService))),
|
|
1403
|
+
( (__param(23, IAccessibilityService))),
|
|
1404
|
+
( (__param(24, IWorkbenchAssignmentService)))
|
|
1405
|
+
], GettingStartedPage)));
|
|
1517
1406
|
class GettingStartedInputSerializer {
|
|
1518
1407
|
canSerialize(editorInput) {
|
|
1519
1408
|
return true;
|
|
@@ -1524,10 +1413,14 @@ class GettingStartedInputSerializer {
|
|
|
1524
1413
|
deserialize(instantiationService, serializedEditorInput) {
|
|
1525
1414
|
try {
|
|
1526
1415
|
const { selectedCategory, selectedStep } = JSON.parse(serializedEditorInput);
|
|
1527
|
-
return (
|
|
1416
|
+
return (
|
|
1417
|
+
(new GettingStartedInput({ selectedCategory, selectedStep }))
|
|
1418
|
+
);
|
|
1528
1419
|
}
|
|
1529
1420
|
catch { }
|
|
1530
|
-
return (
|
|
1421
|
+
return (
|
|
1422
|
+
(new GettingStartedInput({}))
|
|
1423
|
+
);
|
|
1531
1424
|
}
|
|
1532
1425
|
}
|
|
1533
1426
|
|