@codingame/monaco-vscode-walkthrough-service-override 16.1.0 → 17.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 +10 -10
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.js +56 -24
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.d.ts +10 -2
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.js +418 -53
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedAccessibleView.js +3 -3
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors.js +7 -7
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +37 -37
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons.js +2 -2
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService._contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +4 -3
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css +375 -14
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.js +9 -6
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +267 -168
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/ai-powered-suggestions.svg +63 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/all.svg.js +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/multi-file-edits.svg +376 -512
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.js +3 -3
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.js +5 -5
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker_small.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker_small.js +31 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js +3 -3
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils.js +1 -1
|
@@ -35,7 +35,7 @@ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platf
|
|
|
35
35
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
36
36
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
37
37
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
38
|
-
import { Verbosity } from '@codingame/monaco-vscode-
|
|
38
|
+
import { Verbosity } from '@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common/vscode/vs/platform/label/common/label';
|
|
39
39
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
40
40
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
41
41
|
import { Link } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/browser/link';
|
|
@@ -50,11 +50,11 @@ import { getTelemetryLevel } from '@codingame/monaco-vscode-api/vscode/vs/platfo
|
|
|
50
50
|
import { defaultToggleStyles, defaultButtonStyles, defaultKeybindingLabelStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
51
51
|
import { UNKNOWN_EMPTY_WINDOW_WORKSPACE } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
|
|
52
52
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
53
|
-
import { isRecentFolder, isRecentWorkspace } from '@codingame/monaco-vscode-
|
|
53
|
+
import { isRecentFolder, isRecentWorkspace } from '@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common/vscode/vs/platform/workspaces/common/workspaces';
|
|
54
54
|
import { IWorkspacesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspaces/common/workspaces.service';
|
|
55
|
-
import { OpenRecentAction } from '@codingame/monaco-vscode-
|
|
56
|
-
import { OpenFolderViaWorkspaceAction, OpenFileFolderAction, OpenFolderAction } from '@codingame/monaco-vscode-
|
|
57
|
-
import { EditorPane } from '@codingame/monaco-vscode-
|
|
55
|
+
import { OpenRecentAction } from '@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common/vscode/vs/workbench/browser/actions/windowActions';
|
|
56
|
+
import { OpenFolderViaWorkspaceAction, OpenFileFolderAction, OpenFolderAction } from '@codingame/monaco-vscode-97284942-b044-5fbb-b53b-3f46d2468746-common/vscode/vs/workbench/browser/actions/workspaceActions';
|
|
57
|
+
import { EditorPane } from '@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
58
58
|
import { WorkbenchStateContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
59
59
|
import { IWebviewService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview.service';
|
|
60
60
|
import './gettingStartedColors.js';
|
|
@@ -64,12 +64,12 @@ import { GettingStartedInput } from './gettingStartedInput.js';
|
|
|
64
64
|
import { hiddenEntriesConfigurationKey, parseDescription } from './gettingStartedService.js';
|
|
65
65
|
import { IWalkthroughsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.service';
|
|
66
66
|
import { restoreWalkthroughsConfigurationKey } from './startupPage.js';
|
|
67
|
-
import { startEntries } from '../common/gettingStartedContent.js';
|
|
67
|
+
import { startEntries, NEW_WELCOME_EXPERIENCE } from '../common/gettingStartedContent.js';
|
|
68
68
|
import { GroupDirection, GroupsOrder } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
69
69
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
70
70
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
71
71
|
import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
|
|
72
|
-
import { IWorkbenchThemeService } from '@codingame/monaco-vscode-
|
|
72
|
+
import { IWorkbenchThemeService } from '@codingame/monaco-vscode-7443a901-21f6-577a-9674-42893b997ee0-common/vscode/vs/workbench/services/themes/common/workbenchThemeService.service';
|
|
73
73
|
import { GettingStartedIndexList } from './gettingStartedList.js';
|
|
74
74
|
import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
75
75
|
import { AccessibleViewAction } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibleViewActions';
|
|
@@ -131,7 +131,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
131
131
|
this.container = $('.gettingStartedContainer', {
|
|
132
132
|
role: 'document',
|
|
133
133
|
tabindex: 0,
|
|
134
|
-
'aria-label': ( localize(
|
|
134
|
+
'aria-label': ( localize(11502, "Overview of how to get up to speed with your editor."))
|
|
135
135
|
});
|
|
136
136
|
this.stepMediaComponent = $('.getting-started-media');
|
|
137
137
|
this.stepMediaComponent.id = generateUuid();
|
|
@@ -181,7 +181,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
181
181
|
this.container.querySelectorAll(`[x-category-description-for="${category.id}"]`).forEach(step => step.innerText = ourCategory.description);
|
|
182
182
|
}));
|
|
183
183
|
this._register(this.gettingStartedService.onDidProgressStep(step => {
|
|
184
|
-
const category =
|
|
184
|
+
const category = step.category === NEW_WELCOME_EXPERIENCE ? this.gettingStartedService.getWalkthrough(step.category) :
|
|
185
|
+
this.gettingStartedCategories.find(c => c.id === step.category);
|
|
185
186
|
if (!category) {
|
|
186
187
|
throw Error('Could not find category with ID: ' + step.category);
|
|
187
188
|
}
|
|
@@ -207,14 +208,14 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
207
208
|
badgeelement.parentElement?.setAttribute('aria-checked', 'true');
|
|
208
209
|
badgeelement.classList.remove(...ThemeIcon.asClassNameArray(gettingStartedUncheckedCodicon));
|
|
209
210
|
badgeelement.classList.add('complete', ...ThemeIcon.asClassNameArray(gettingStartedCheckedCodicon));
|
|
210
|
-
badgeelement.setAttribute('aria-label', ( localize(
|
|
211
|
+
badgeelement.setAttribute('aria-label', ( localize(11503, "Checkbox for Step {0}: Completed", step.title)));
|
|
211
212
|
}
|
|
212
213
|
else {
|
|
213
214
|
badgeelement.setAttribute('aria-checked', 'false');
|
|
214
215
|
badgeelement.parentElement?.setAttribute('aria-checked', 'false');
|
|
215
216
|
badgeelement.classList.remove('complete', ...ThemeIcon.asClassNameArray(gettingStartedCheckedCodicon));
|
|
216
217
|
badgeelement.classList.add(...ThemeIcon.asClassNameArray(gettingStartedUncheckedCodicon));
|
|
217
|
-
badgeelement.setAttribute('aria-label', ( localize(
|
|
218
|
+
badgeelement.setAttribute('aria-label', ( localize(11504, "Checkbox for Step {0}: Not completed", step.title)));
|
|
218
219
|
}
|
|
219
220
|
});
|
|
220
221
|
}
|
|
@@ -257,6 +258,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
257
258
|
async setInput(newInput, options, context, token) {
|
|
258
259
|
this.container.classList.remove('animatable');
|
|
259
260
|
this.editorInput = newInput;
|
|
261
|
+
this.editorInput.showTelemetryNotice = options?.showTelemetryNotice ?? true;
|
|
260
262
|
await super.setInput(newInput, options, context, token);
|
|
261
263
|
await this.buildCategoriesSlide();
|
|
262
264
|
if (this.shouldAnimate()) {
|
|
@@ -415,7 +417,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
415
417
|
label: x.title,
|
|
416
418
|
detail: x.description,
|
|
417
419
|
description: x.source,
|
|
418
|
-
}))), { canPickMany: false, matchOnDescription: true, matchOnDetail: true, title: ( localize(
|
|
420
|
+
}))), { canPickMany: false, matchOnDescription: true, matchOnDetail: true, title: ( localize(11505, "Open Walkthrough...")) });
|
|
419
421
|
if (selection) {
|
|
420
422
|
this.runDispatchCommand('selectCategory', selection.id);
|
|
421
423
|
}
|
|
@@ -596,7 +598,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
596
598
|
const themeType = this.themeService.getColorTheme().type;
|
|
597
599
|
const videoPath = media.path[themeType];
|
|
598
600
|
const videoPoster = media.poster ? media.poster[themeType] : undefined;
|
|
599
|
-
const altText = media.altText ? media.altText : ( localize(
|
|
601
|
+
const altText = media.altText ? media.altText : ( localize(11506, "Video for {0}", stepToExpand.title));
|
|
600
602
|
const rawHTML = await this.detailsRenderer.renderVideo(videoPath, videoPoster, altText);
|
|
601
603
|
this.webview.setHtml(rawHTML);
|
|
602
604
|
let isDisposed = false;
|
|
@@ -624,8 +626,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
624
626
|
provideScreenReaderUpdate() {
|
|
625
627
|
if (this.configurationService.getValue(AccessibilityVerbositySettingId.Walkthrough)) {
|
|
626
628
|
const kbLabel = this.keybindingService.lookupKeybinding(AccessibleViewAction.id)?.getAriaLabel();
|
|
627
|
-
return kbLabel ? ( localize(
|
|
628
|
-
|
|
629
|
+
return kbLabel ? ( localize(11507, "Inspect this in the accessible view ({0}).\n", kbLabel)) : ( localize(
|
|
630
|
+
11508,
|
|
629
631
|
"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding.\n"
|
|
630
632
|
));
|
|
631
633
|
}
|
|
@@ -685,7 +687,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
685
687
|
this.categoriesPageScrollbar.dispose();
|
|
686
688
|
}
|
|
687
689
|
this.categoriesSlide = $('.gettingStartedSlideCategories.gettingStartedSlide');
|
|
688
|
-
const prevButton = $('button.prev-button.button-link', { 'x-dispatch': 'scrollPrev' }, $('span.scroll-button.codicon.codicon-chevron-left'), $('span.moreText', {}, ( localize(
|
|
690
|
+
const prevButton = $('button.prev-button.button-link', { 'x-dispatch': 'scrollPrev' }, $('span.scroll-button.codicon.codicon-chevron-left'), $('span.moreText', {}, ( localize(11509, "Go Back"))));
|
|
689
691
|
this.stepsSlide = $('.gettingStartedSlideDetails.gettingStartedSlide', {}, prevButton);
|
|
690
692
|
this.stepsContent = $('.gettingStartedDetailsContent', {});
|
|
691
693
|
this.detailsPageScrollbar = this._register(( new DomScrollableElement(
|
|
@@ -709,11 +711,11 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
709
711
|
icon: Codicon.check,
|
|
710
712
|
actionClassName: 'getting-started-checkbox',
|
|
711
713
|
isChecked: this.configurationService.getValue(configurationKey) === 'welcomePage',
|
|
712
|
-
title: ( localize(
|
|
714
|
+
title: ( localize(11510, "When checked, this page will be shown on startup.")),
|
|
713
715
|
...defaultToggleStyles
|
|
714
716
|
}));
|
|
715
717
|
showOnStartupCheckbox.domNode.id = 'showOnStartup';
|
|
716
|
-
const showOnStartupLabel = $('label.caption', { for: 'showOnStartup' }, ( localize(
|
|
718
|
+
const showOnStartupLabel = $('label.caption', { for: 'showOnStartup' }, ( localize(11511, "Show welcome page on startup")));
|
|
717
719
|
const onShowOnStartupChanged = () => {
|
|
718
720
|
if (showOnStartupCheckbox.checked) {
|
|
719
721
|
this.telemetryService.publicLog2('gettingStarted.ActionExecuted', { command: 'showOnStartupChecked', argument: undefined, walkthroughId: this.currentWalkthrough?.id });
|
|
@@ -732,7 +734,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
732
734
|
showOnStartupCheckbox.checked = !showOnStartupCheckbox.checked;
|
|
733
735
|
onShowOnStartupChanged();
|
|
734
736
|
}));
|
|
735
|
-
const header = $('.header', {}, $('h1.product-name.caption', {}, this.productService.nameLong), $('p.subtitle.description', {}, ( localize(
|
|
737
|
+
const header = $('.header', {}, $('h1.product-name.caption', {}, this.productService.nameLong), $('p.subtitle.description', {}, ( localize(11512, "Editing evolved"))));
|
|
736
738
|
const leftColumn = $('.categories-column.categories-column-left', {});
|
|
737
739
|
const rightColumn = $('.categories-column.categories-column-right', {});
|
|
738
740
|
const startList = this.buildStartList();
|
|
@@ -769,18 +771,29 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
769
771
|
this.updateCategoryProgress();
|
|
770
772
|
this.registerDispatchListeners();
|
|
771
773
|
if (this.editorInput.selectedCategory) {
|
|
774
|
+
const showNewExperience = this.editorInput.selectedCategory === NEW_WELCOME_EXPERIENCE;
|
|
772
775
|
this.currentWalkthrough = this.gettingStartedCategories.find(category => category.id === this.editorInput.selectedCategory);
|
|
773
776
|
if (!this.currentWalkthrough) {
|
|
774
777
|
this.gettingStartedCategories = this.gettingStartedService.getWalkthroughs();
|
|
775
|
-
this.currentWalkthrough = this.gettingStartedCategories.find(category => category.id === this.editorInput.selectedCategory);
|
|
778
|
+
this.currentWalkthrough = showNewExperience ? this.gettingStartedService.getWalkthrough(this.editorInput.selectedCategory) : this.gettingStartedCategories.find(category => category.id === this.editorInput.selectedCategory);
|
|
776
779
|
if (this.currentWalkthrough) {
|
|
777
|
-
|
|
780
|
+
if (showNewExperience) {
|
|
781
|
+
this.buildNewCategorySlide(this.editorInput.selectedCategory, this.editorInput.selectedStep);
|
|
782
|
+
}
|
|
783
|
+
else {
|
|
784
|
+
this.buildCategorySlide(this.editorInput.selectedCategory, this.editorInput.selectedStep);
|
|
785
|
+
}
|
|
778
786
|
this.setSlide('details');
|
|
779
787
|
return;
|
|
780
788
|
}
|
|
781
789
|
}
|
|
782
790
|
else {
|
|
783
|
-
|
|
791
|
+
if (showNewExperience) {
|
|
792
|
+
this.buildNewCategorySlide(this.editorInput.selectedCategory, this.editorInput.selectedStep);
|
|
793
|
+
}
|
|
794
|
+
else {
|
|
795
|
+
this.buildCategorySlide(this.editorInput.selectedCategory, this.editorInput.selectedStep);
|
|
796
|
+
}
|
|
784
797
|
this.setSlide('details');
|
|
785
798
|
return;
|
|
786
799
|
}
|
|
@@ -827,7 +840,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
827
840
|
const link = $('button.button-link');
|
|
828
841
|
link.innerText = name;
|
|
829
842
|
link.title = fullPath;
|
|
830
|
-
link.setAttribute('aria-label', ( localize(
|
|
843
|
+
link.setAttribute('aria-label', ( localize(11513, "Open folder {0} with path {1}", name, parentPath)));
|
|
831
844
|
link.addEventListener('click', e => {
|
|
832
845
|
this.telemetryService.publicLog2('gettingStarted.ActionExecuted', { command: 'openRecent', argument: undefined, walkthroughId: this.currentWalkthrough?.id });
|
|
833
846
|
this.hostService.openWindow([windowOpenable], {
|
|
@@ -850,18 +863,18 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
850
863
|
this.recentlyOpenedList.dispose();
|
|
851
864
|
}
|
|
852
865
|
const recentlyOpenedList = this.recentlyOpenedList = ( new GettingStartedIndexList({
|
|
853
|
-
title: ( localize(
|
|
866
|
+
title: ( localize(11514, "Recent")),
|
|
854
867
|
klass: 'recently-opened',
|
|
855
868
|
limit: 5,
|
|
856
|
-
empty: $('.empty-recent', {}, ( localize(
|
|
869
|
+
empty: $('.empty-recent', {}, ( localize(11515, "You have no recent folders,")), $('button.button-link', { 'x-dispatch': 'openFolder' }, ( localize(11516, "open a folder"))), ( localize(11517, "to start."))),
|
|
857
870
|
more: $('.more', {}, $('button.button-link', {
|
|
858
871
|
'x-dispatch': 'showMoreRecents',
|
|
859
872
|
title: ( localize(
|
|
860
|
-
|
|
873
|
+
11518,
|
|
861
874
|
"Show All Recent Folders {0}",
|
|
862
875
|
this.getKeybindingLabel(OpenRecentAction.ID)
|
|
863
876
|
))
|
|
864
|
-
}, ( localize(
|
|
877
|
+
}, ( localize(11519, "More...")))),
|
|
865
878
|
renderElement: renderRecent,
|
|
866
879
|
contextService: this.contextService
|
|
867
880
|
}));
|
|
@@ -889,7 +902,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
889
902
|
this.startList.dispose();
|
|
890
903
|
}
|
|
891
904
|
const startList = this.startList = ( new GettingStartedIndexList({
|
|
892
|
-
title: ( localize(
|
|
905
|
+
title: ( localize(11520, "Start")),
|
|
893
906
|
klass: 'start-container',
|
|
894
907
|
limit: 10,
|
|
895
908
|
renderElement: renderStartEntry,
|
|
@@ -905,10 +918,10 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
905
918
|
const renderNewBadge = (category.newItems || category.newEntry) && !category.isFeatured;
|
|
906
919
|
const newBadge = $('.new-badge', {});
|
|
907
920
|
if (category.newEntry) {
|
|
908
|
-
reset(newBadge, $('.new-category', {}, ( localize(
|
|
921
|
+
reset(newBadge, $('.new-category', {}, ( localize(11521, "New"))));
|
|
909
922
|
}
|
|
910
923
|
else if (category.newItems) {
|
|
911
|
-
reset(newBadge, $('.new-items', {}, ( localize(
|
|
924
|
+
reset(newBadge, $('.new-items', {}, ( localize(11522, "Updated"))));
|
|
912
925
|
}
|
|
913
926
|
const featuredBadge = $('.featured-badge', {});
|
|
914
927
|
const descriptionContent = $('.description-content', {});
|
|
@@ -924,9 +937,9 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
924
937
|
}, featuredBadge, $('.main-content', {}, this.iconWidgetFor(category), titleContent, renderNewBadge ? newBadge : $('.no-badge'), $('a.codicon.codicon-close.hide-category-button', {
|
|
925
938
|
'tabindex': 0,
|
|
926
939
|
'x-dispatch': 'hideCategory:' + category.id,
|
|
927
|
-
'title': ( localize(
|
|
940
|
+
'title': ( localize(11523, "Hide")),
|
|
928
941
|
'role': 'button',
|
|
929
|
-
'aria-label': ( localize(
|
|
942
|
+
'aria-label': ( localize(11524, "Hide")),
|
|
930
943
|
})), descriptionContent, $('.category-progress', { 'x-data-category-id': category.id, }, $('.progress-bar-outer', { 'role': 'progressbar' }, $('.progress-bar-inner'))));
|
|
931
944
|
};
|
|
932
945
|
if (this.gettingStartedList) {
|
|
@@ -952,10 +965,10 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
952
965
|
return rank;
|
|
953
966
|
};
|
|
954
967
|
const gettingStartedList = this.gettingStartedList = ( new GettingStartedIndexList({
|
|
955
|
-
title: ( localize(
|
|
968
|
+
title: ( localize(11525, "Walkthroughs")),
|
|
956
969
|
klass: 'getting-started',
|
|
957
970
|
limit: 5,
|
|
958
|
-
footer: $('span.button-link.see-all-walkthroughs', { 'x-dispatch': 'seeAllWalkthroughs', 'tabindex': 0 }, ( localize(
|
|
971
|
+
footer: $('span.button-link.see-all-walkthroughs', { 'x-dispatch': 'seeAllWalkthroughs', 'tabindex': 0 }, ( localize(11519, "More..."))),
|
|
959
972
|
renderElement: renderGetttingStaredWalkthrough,
|
|
960
973
|
rankElement: rankWalkthrough,
|
|
961
974
|
contextService: this.contextService,
|
|
@@ -988,6 +1001,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
988
1001
|
this.container.classList.toggle('height-constrained', size.height <= 600);
|
|
989
1002
|
this.container.classList.toggle('width-constrained', size.width <= 400);
|
|
990
1003
|
this.container.classList.toggle('width-semi-constrained', size.width <= 950);
|
|
1004
|
+
this.container.classList.toggle('new-layout-width-constrained', size.width <= 800);
|
|
991
1005
|
this.categoriesPageScrollbar?.scanDomNode();
|
|
992
1006
|
this.detailsPageScrollbar?.scanDomNode();
|
|
993
1007
|
this.detailsScrollbar?.scanDomNode();
|
|
@@ -995,7 +1009,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
995
1009
|
updateCategoryProgress() {
|
|
996
1010
|
this.window.document.querySelectorAll('.category-progress').forEach(element => {
|
|
997
1011
|
const categoryID = element.getAttribute('x-data-category-id');
|
|
998
|
-
const category = this.
|
|
1012
|
+
const category = categoryID === NEW_WELCOME_EXPERIENCE ? this.gettingStartedService.getWalkthrough(categoryID) :
|
|
1013
|
+
this.gettingStartedCategories.find(c => c.id === categoryID);
|
|
999
1014
|
if (!category) {
|
|
1000
1015
|
throw Error('Could not find category with ID ' + categoryID);
|
|
1001
1016
|
}
|
|
@@ -1008,10 +1023,10 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1008
1023
|
bar.style.width = `${progress}%`;
|
|
1009
1024
|
element.parentElement.classList.toggle('no-progress', stats.stepsComplete === 0);
|
|
1010
1025
|
if (stats.stepsTotal === stats.stepsComplete) {
|
|
1011
|
-
bar.title = ( localize(
|
|
1026
|
+
bar.title = ( localize(11526, "All {0} steps complete!", stats.stepsComplete));
|
|
1012
1027
|
}
|
|
1013
1028
|
else {
|
|
1014
|
-
bar.title = ( localize(
|
|
1029
|
+
bar.title = ( localize(11527, "{0} of {1} steps complete", stats.stepsComplete, stats.stepsTotal));
|
|
1015
1030
|
}
|
|
1016
1031
|
});
|
|
1017
1032
|
}
|
|
@@ -1019,7 +1034,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1019
1034
|
if (!( this.gettingStartedCategories.some(c => c.id === categoryID))) {
|
|
1020
1035
|
this.gettingStartedCategories = this.gettingStartedService.getWalkthroughs();
|
|
1021
1036
|
}
|
|
1022
|
-
const ourCategory = this.
|
|
1037
|
+
const ourCategory = categoryID === NEW_WELCOME_EXPERIENCE ? this.gettingStartedService.getWalkthrough(categoryID) :
|
|
1038
|
+
this.gettingStartedCategories.find(c => c.id === categoryID);
|
|
1023
1039
|
if (!ourCategory) {
|
|
1024
1040
|
throw Error('Could not find category with ID: ' + categoryID);
|
|
1025
1041
|
}
|
|
@@ -1133,8 +1149,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1133
1149
|
}, null, this.detailsPageDisposables);
|
|
1134
1150
|
if (isCommand) {
|
|
1135
1151
|
const keybinding = this.getKeyBinding(command);
|
|
1136
|
-
if (keybinding) {
|
|
1137
|
-
const shortcutMessage = $('span.shortcut-message', {}, ( localize(
|
|
1152
|
+
if (keybinding && this.editorInput.selectedCategory !== NEW_WELCOME_EXPERIENCE) {
|
|
1153
|
+
const shortcutMessage = $('span.shortcut-message', {}, ( localize(11528, 'Tip: Use keyboard shortcut ')));
|
|
1138
1154
|
container.appendChild(shortcutMessage);
|
|
1139
1155
|
const label = ( new KeybindingLabel(shortcutMessage, OS, { ...defaultKeybindingLabelStyles }));
|
|
1140
1156
|
label.set(keybinding);
|
|
@@ -1171,7 +1187,349 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1171
1187
|
this.stepDisposables.clear();
|
|
1172
1188
|
super.clearInput();
|
|
1173
1189
|
}
|
|
1190
|
+
selectStepByIndex(newIndex, steps, direction) {
|
|
1191
|
+
const currentIndex = steps.findIndex(step => step.id === this.editorInput.selectedStep);
|
|
1192
|
+
this.selectSlide(steps[newIndex].id);
|
|
1193
|
+
const footer = this.stepsContent.querySelector('.getting-started-footer');
|
|
1194
|
+
if (footer && newIndex !== 0) {
|
|
1195
|
+
footer.style.display = 'none';
|
|
1196
|
+
}
|
|
1197
|
+
else if (footer) {
|
|
1198
|
+
footer.style.display = 'block';
|
|
1199
|
+
}
|
|
1200
|
+
this.updateNavButtons(newIndex, steps);
|
|
1201
|
+
const dots = this.stepsContent.querySelectorAll('.step-dot');
|
|
1202
|
+
dots.forEach((dot, index) => {
|
|
1203
|
+
if (index === newIndex) {
|
|
1204
|
+
dot.classList.add('active');
|
|
1205
|
+
}
|
|
1206
|
+
else {
|
|
1207
|
+
dot.classList.remove('active');
|
|
1208
|
+
}
|
|
1209
|
+
});
|
|
1210
|
+
if (currentIndex === newIndex) {
|
|
1211
|
+
return;
|
|
1212
|
+
}
|
|
1213
|
+
const slidesContainer = this.stepsContent.querySelector('.step-slides-container');
|
|
1214
|
+
if (slidesContainer) {
|
|
1215
|
+
const slides = slidesContainer.querySelectorAll('.step-slide');
|
|
1216
|
+
slides.forEach((slide, index) => {
|
|
1217
|
+
const slideElement = slide;
|
|
1218
|
+
if (index === currentIndex) {
|
|
1219
|
+
slideElement.style.display = 'block';
|
|
1220
|
+
slideElement.style.transform = 'translateX(0)';
|
|
1221
|
+
}
|
|
1222
|
+
else if (index === newIndex) {
|
|
1223
|
+
slideElement.style.display = 'block';
|
|
1224
|
+
slideElement.style.transform = `translateX(${direction < 0 ? '-100%' : '100%'})`;
|
|
1225
|
+
}
|
|
1226
|
+
else {
|
|
1227
|
+
slideElement.style.display = 'none';
|
|
1228
|
+
}
|
|
1229
|
+
});
|
|
1230
|
+
slidesContainer.getBoundingClientRect();
|
|
1231
|
+
setTimeout(() => {
|
|
1232
|
+
slides.forEach((slide, index) => {
|
|
1233
|
+
const slideElement = slide;
|
|
1234
|
+
if (index === currentIndex) {
|
|
1235
|
+
slideElement.style.transform = `translateX(${direction > 0 ? '-100%' : '100%'})`;
|
|
1236
|
+
setTimeout(() => {
|
|
1237
|
+
slideElement.style.display = 'none';
|
|
1238
|
+
}, SLIDE_TRANSITION_TIME_MS);
|
|
1239
|
+
}
|
|
1240
|
+
else if (index === newIndex) {
|
|
1241
|
+
slideElement.style.transform = 'translateX(0)';
|
|
1242
|
+
}
|
|
1243
|
+
});
|
|
1244
|
+
}, 20);
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
updateNavButtons(newIndex, steps) {
|
|
1248
|
+
const prevButton = this.stepsContent.querySelector('.button-link.navigation.back');
|
|
1249
|
+
if (newIndex === 0) {
|
|
1250
|
+
if (prevButton) {
|
|
1251
|
+
prevButton.classList.add('inactive');
|
|
1252
|
+
prevButton.setAttribute('aria-hidden', 'true');
|
|
1253
|
+
prevButton.setAttribute('tabindex', '-1');
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
else {
|
|
1257
|
+
if (prevButton) {
|
|
1258
|
+
prevButton.classList.remove('inactive');
|
|
1259
|
+
prevButton.removeAttribute('aria-hidden');
|
|
1260
|
+
prevButton.removeAttribute('tabindex');
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
buildNewCategorySlide(categoryID, selectedStep) {
|
|
1265
|
+
this.container.classList.add('newSlide');
|
|
1266
|
+
if (this.detailsScrollbar) {
|
|
1267
|
+
this.detailsScrollbar.dispose();
|
|
1268
|
+
}
|
|
1269
|
+
this.detailsPageDisposables.clear();
|
|
1270
|
+
this.mediaDisposables.clear();
|
|
1271
|
+
const category = this.gettingStartedService.getWalkthrough(categoryID);
|
|
1272
|
+
if (!category) {
|
|
1273
|
+
throw Error('could not find category with ID ' + categoryID);
|
|
1274
|
+
}
|
|
1275
|
+
const steps = category.steps.filter(step => this.contextService.contextMatchesRules(step.when));
|
|
1276
|
+
const groupedSteps = ( new Map());
|
|
1277
|
+
steps.forEach(step => {
|
|
1278
|
+
const prefixMatch = step.id.match(/^([^.]+)\./);
|
|
1279
|
+
const prefix = prefixMatch ? prefixMatch[1] : step.id;
|
|
1280
|
+
if (!( groupedSteps.has(prefix))) {
|
|
1281
|
+
groupedSteps.set(prefix, []);
|
|
1282
|
+
}
|
|
1283
|
+
groupedSteps.get(prefix)?.push(step);
|
|
1284
|
+
});
|
|
1285
|
+
const slidesContainer = $('.step-slides-container');
|
|
1286
|
+
const navigationContainer = $('.step-dots-container');
|
|
1287
|
+
const prevButton = $('button.button-link.navigation.back', {
|
|
1288
|
+
'aria-label': ( localize(11529, "Previous Step")),
|
|
1289
|
+
'tabindex': '0'
|
|
1290
|
+
}, $('span.codicon.codicon-arrow-left'), ( localize(11530, "Back")));
|
|
1291
|
+
const dotsContainer = $('.dots-centered');
|
|
1292
|
+
navigationContainer.appendChild(prevButton);
|
|
1293
|
+
navigationContainer.appendChild(dotsContainer);
|
|
1294
|
+
const allSlides = [];
|
|
1295
|
+
groupedSteps.forEach((stepsInGroup, prefix) => {
|
|
1296
|
+
if (stepsInGroup.length === 1) {
|
|
1297
|
+
allSlides.push({ id: stepsInGroup[0].id, steps: [stepsInGroup[0]] });
|
|
1298
|
+
}
|
|
1299
|
+
else {
|
|
1300
|
+
allSlides.push({ id: prefix, steps: stepsInGroup });
|
|
1301
|
+
}
|
|
1302
|
+
});
|
|
1303
|
+
allSlides.forEach((slide, index) => {
|
|
1304
|
+
const slideElement = $('.step-slide', { 'data-step': slide.id });
|
|
1305
|
+
const slideContent = $('.step-slide-content');
|
|
1306
|
+
const textContent = $('.step-text-content');
|
|
1307
|
+
if (slide.steps.length === 1) {
|
|
1308
|
+
const step = slide.steps[0];
|
|
1309
|
+
const titleElement = $('h3.step-title', { 'x-step-title-for': step.id });
|
|
1310
|
+
reset(titleElement, ...renderLabelWithIcons(step.title));
|
|
1311
|
+
textContent.appendChild(titleElement);
|
|
1312
|
+
const descriptionContainer = $('.step-description', { 'x-step-description-for': step.id });
|
|
1313
|
+
this.buildMarkdownDescription(descriptionContainer, step.description);
|
|
1314
|
+
textContent.appendChild(descriptionContainer);
|
|
1315
|
+
}
|
|
1316
|
+
else {
|
|
1317
|
+
const multiStepContainer = $('.multi-step-container');
|
|
1318
|
+
slide.steps.forEach((step, i) => {
|
|
1319
|
+
const subStep = $('.sub-step', { 'data-sub-step-id': step.id });
|
|
1320
|
+
this.detailsPageDisposables.add(addDisposableListener(subStep, 'click', () => {
|
|
1321
|
+
this.selectSubStep(step.id);
|
|
1322
|
+
}));
|
|
1323
|
+
this.detailsPageDisposables.add(addDisposableListener(subStep, 'mouseenter', () => {
|
|
1324
|
+
this.selectSubStep(step.id);
|
|
1325
|
+
}));
|
|
1326
|
+
const subStepTitleEl = $('.sub-step-title', {}, ...renderLabelWithIcons(step.title));
|
|
1327
|
+
subStep.appendChild(subStepTitleEl);
|
|
1328
|
+
const subStepDesc = $('.sub-step-description');
|
|
1329
|
+
this.buildMarkdownDescription(subStepDesc, [step.description[0]]);
|
|
1330
|
+
subStep.appendChild(subStepDesc);
|
|
1331
|
+
if (i === 0 || step.id === this.editorInput.selectedStep) {
|
|
1332
|
+
subStep.classList.add('active');
|
|
1333
|
+
}
|
|
1334
|
+
else {
|
|
1335
|
+
subStep.classList.remove('active');
|
|
1336
|
+
}
|
|
1337
|
+
multiStepContainer.appendChild(subStep);
|
|
1338
|
+
});
|
|
1339
|
+
const lastStep = slide.steps[slide.steps.length - 1];
|
|
1340
|
+
const linkedText = lastStep.description.length > 1 ? lastStep.description[1] : undefined;
|
|
1341
|
+
if (linkedText) {
|
|
1342
|
+
const descElement = $('.multi-step-action');
|
|
1343
|
+
this.buildMarkdownDescription(descElement, [linkedText]);
|
|
1344
|
+
multiStepContainer.appendChild(descElement);
|
|
1345
|
+
}
|
|
1346
|
+
textContent.appendChild(multiStepContainer);
|
|
1347
|
+
}
|
|
1348
|
+
slideContent.appendChild(textContent);
|
|
1349
|
+
slideElement.appendChild(slideContent);
|
|
1350
|
+
slidesContainer.appendChild(slideElement);
|
|
1351
|
+
const dot = $('button.step-dot', {
|
|
1352
|
+
'data-step-dot-index': `${index}`,
|
|
1353
|
+
'role': 'button'
|
|
1354
|
+
});
|
|
1355
|
+
if (index === 0) {
|
|
1356
|
+
dot.classList.add('active');
|
|
1357
|
+
}
|
|
1358
|
+
dotsContainer.appendChild(dot);
|
|
1359
|
+
this.detailsPageDisposables.add(addDisposableListener(dot, 'click', () => {
|
|
1360
|
+
const currentIndex = this.getCurrentSlideIndex(allSlides);
|
|
1361
|
+
if (currentIndex === index) {
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
this.selectStepByIndex(index, ( allSlides.map(s => s.steps[0])), index > currentIndex ? 1 : -1);
|
|
1365
|
+
}));
|
|
1366
|
+
});
|
|
1367
|
+
const nextButton = $('button.button-link.navigation.next', {
|
|
1368
|
+
'aria-label': ( localize(11531, "Next")),
|
|
1369
|
+
}, ( localize(11532, "Next")), $('span.codicon.codicon-arrow-right'));
|
|
1370
|
+
navigationContainer.appendChild(nextButton);
|
|
1371
|
+
this.detailsPageDisposables.add(addDisposableListener(prevButton, 'click', () => {
|
|
1372
|
+
const currentIndex = this.getCurrentSlideIndex(allSlides);
|
|
1373
|
+
if (currentIndex > 0) {
|
|
1374
|
+
this.selectStepByIndex(currentIndex - 1, ( allSlides.map(s => s.steps[0])), -1);
|
|
1375
|
+
}
|
|
1376
|
+
}));
|
|
1377
|
+
this.detailsPageDisposables.add(addDisposableListener(nextButton, 'click', () => {
|
|
1378
|
+
const currentIndex = this.getCurrentSlideIndex(allSlides);
|
|
1379
|
+
if (currentIndex < allSlides.length - 1) {
|
|
1380
|
+
this.selectStepByIndex(currentIndex + 1, ( allSlides.map(s => s.steps[0])), 1);
|
|
1381
|
+
}
|
|
1382
|
+
else {
|
|
1383
|
+
this.scrollPrev();
|
|
1384
|
+
}
|
|
1385
|
+
}));
|
|
1386
|
+
this.currentWalkthrough = category;
|
|
1387
|
+
this.editorInput.selectedCategory = categoryID;
|
|
1388
|
+
this.editorInput.selectedStep = this.currentWalkthrough.steps[0].id;
|
|
1389
|
+
const categoryHeader = $('.category-header');
|
|
1390
|
+
const categoryTitle = $('h2.category-title', { 'x-category-title-for': category.id });
|
|
1391
|
+
reset(categoryTitle, ...renderLabelWithIcons(category.title));
|
|
1392
|
+
categoryHeader.appendChild(categoryTitle);
|
|
1393
|
+
const descriptionContainer = $('.category-description.description.max-lines-3', { 'x-category-description-for': category.id });
|
|
1394
|
+
this.buildMarkdownDescription(descriptionContainer, parseDescription(category.description));
|
|
1395
|
+
reset(descriptionContainer, ...renderLabelWithIcons(category.description));
|
|
1396
|
+
categoryHeader.appendChild(descriptionContainer);
|
|
1397
|
+
const categoryFooter = $('.getting-started-footer');
|
|
1398
|
+
if (this.editorInput.showTelemetryNotice && getTelemetryLevel(this.configurationService) !== TelemetryLevel.NONE && this.productService.enableTelemetry) {
|
|
1399
|
+
this.buildTelemetryFooter(categoryFooter);
|
|
1400
|
+
}
|
|
1401
|
+
const stepsContainer = $('.getting-started-steps-container', {}, categoryHeader, slidesContainer, navigationContainer, categoryFooter);
|
|
1402
|
+
this.detailsScrollbar = this._register(( new DomScrollableElement(stepsContainer, { className: 'steps-container' })));
|
|
1403
|
+
const stepListComponent = this.detailsScrollbar.getDomNode();
|
|
1404
|
+
reset(this.stepsContent, stepListComponent);
|
|
1405
|
+
stepListComponent.tabIndex = 0;
|
|
1406
|
+
stepListComponent.focus();
|
|
1407
|
+
this.selectStepByIndex(0, this.currentWalkthrough.steps, 1);
|
|
1408
|
+
this.detailsPageDisposables.add(addDisposableListener(stepListComponent, 'keydown', (e) => {
|
|
1409
|
+
const event = ( new StandardKeyboardEvent(e));
|
|
1410
|
+
if (event.keyCode === KeyCode.RightArrow) {
|
|
1411
|
+
const currentIndex = this.getCurrentSlideIndex(allSlides);
|
|
1412
|
+
if (currentIndex < allSlides.length - 1) {
|
|
1413
|
+
this.selectStepByIndex(currentIndex + 1, ( allSlides.map(s => s.steps[0])), 1);
|
|
1414
|
+
}
|
|
1415
|
+
else {
|
|
1416
|
+
this.scrollPrev();
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
else if (event.keyCode === KeyCode.LeftArrow) {
|
|
1420
|
+
const currentIndex = this.getCurrentSlideIndex(allSlides);
|
|
1421
|
+
if (currentIndex > 0) {
|
|
1422
|
+
this.selectStepByIndex(currentIndex - 1, ( allSlides.map(s => s.steps[0])), -1);
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
else if (event.keyCode === KeyCode.UpArrow || event.keyCode === KeyCode.DownArrow) {
|
|
1426
|
+
const currentIndex = this.getCurrentSlideIndex(allSlides);
|
|
1427
|
+
if (currentIndex > 0) {
|
|
1428
|
+
return;
|
|
1429
|
+
}
|
|
1430
|
+
this.navigateWithinMultiStepContainer(event.keyCode);
|
|
1431
|
+
}
|
|
1432
|
+
}));
|
|
1433
|
+
this.registerDispatchListeners();
|
|
1434
|
+
this.detailsScrollbar.scanDomNode();
|
|
1435
|
+
this.detailsPageScrollbar?.scanDomNode();
|
|
1436
|
+
}
|
|
1437
|
+
navigateWithinMultiStepContainer(keyCode) {
|
|
1438
|
+
const currentElement = this.container.querySelector(`.multi-step-container`);
|
|
1439
|
+
if (!currentElement) {
|
|
1440
|
+
return;
|
|
1441
|
+
}
|
|
1442
|
+
const currentSubStep = currentElement.querySelector('.sub-step.active');
|
|
1443
|
+
const allElements = Array.from(this.container.querySelectorAll('.sub-step'));
|
|
1444
|
+
const currentIndex = currentSubStep ? allElements.indexOf(currentSubStep) : -1;
|
|
1445
|
+
let targetElement;
|
|
1446
|
+
if (keyCode === KeyCode.UpArrow && currentIndex > 0) {
|
|
1447
|
+
targetElement = allElements[currentIndex - 1];
|
|
1448
|
+
}
|
|
1449
|
+
else if (keyCode === KeyCode.DownArrow && currentIndex < allElements.length - 1) {
|
|
1450
|
+
targetElement = allElements[currentIndex + 1];
|
|
1451
|
+
}
|
|
1452
|
+
if (targetElement) {
|
|
1453
|
+
const stepId = targetElement.getAttribute('data-sub-step-id');
|
|
1454
|
+
this.selectSubStep(stepId);
|
|
1455
|
+
targetElement.focus();
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
selectSubStep(selectedStepId) {
|
|
1459
|
+
if (this.editorInput.selectedStep === selectedStepId) {
|
|
1460
|
+
return;
|
|
1461
|
+
}
|
|
1462
|
+
this.editorInput.selectedStep = selectedStepId;
|
|
1463
|
+
const multiStepContainer = this.container.querySelector('.multi-step-container');
|
|
1464
|
+
if (!multiStepContainer) {
|
|
1465
|
+
return;
|
|
1466
|
+
}
|
|
1467
|
+
const subSteps = multiStepContainer.querySelectorAll('.sub-step');
|
|
1468
|
+
subSteps.forEach(subStepEl => {
|
|
1469
|
+
const stepId = subStepEl.getAttribute('data-sub-step-id');
|
|
1470
|
+
if (stepId === selectedStepId) {
|
|
1471
|
+
subStepEl.classList.add('active');
|
|
1472
|
+
}
|
|
1473
|
+
else {
|
|
1474
|
+
subStepEl.classList.remove('active');
|
|
1475
|
+
}
|
|
1476
|
+
});
|
|
1477
|
+
const prefixMatch = selectedStepId.match(/^([^.]+)\./);
|
|
1478
|
+
const prefix = prefixMatch ? prefixMatch[1] : selectedStepId;
|
|
1479
|
+
this.selectSlideWithPrefix(selectedStepId, prefix);
|
|
1480
|
+
this.gettingStartedService.progressByEvent('stepSelected:' + selectedStepId);
|
|
1481
|
+
}
|
|
1482
|
+
selectSlideWithPrefix(stepId, prefix) {
|
|
1483
|
+
this.editorInput.selectedStep = stepId;
|
|
1484
|
+
const step = this.currentWalkthrough?.steps.find(step => step.id === stepId);
|
|
1485
|
+
if (!step) {
|
|
1486
|
+
return;
|
|
1487
|
+
}
|
|
1488
|
+
const selectedSlide = this.stepsContent.querySelector(`.step-slide[data-step="${prefix}"]`);
|
|
1489
|
+
if (selectedSlide) {
|
|
1490
|
+
const selectedSlideContent = selectedSlide.querySelector('.step-slide-content');
|
|
1491
|
+
this.mediaDisposables.clear();
|
|
1492
|
+
this.stepDisposables.clear();
|
|
1493
|
+
this.buildMediaComponent(this.editorInput.selectedStep);
|
|
1494
|
+
selectedSlideContent?.appendChild(this.stepMediaComponent);
|
|
1495
|
+
setTimeout(() => selectedSlideContent.focus(), 0);
|
|
1496
|
+
}
|
|
1497
|
+
this.gettingStartedService.progressByEvent('stepSelected:' + stepId);
|
|
1498
|
+
this.detailsPageScrollbar?.scanDomNode();
|
|
1499
|
+
this.detailsScrollbar?.scanDomNode();
|
|
1500
|
+
}
|
|
1501
|
+
getCurrentSlideIndex(allSlides) {
|
|
1502
|
+
if (!this.editorInput.selectedStep) {
|
|
1503
|
+
return 0;
|
|
1504
|
+
}
|
|
1505
|
+
const directMatch = allSlides.findIndex(slide => slide.id === this.editorInput.selectedStep);
|
|
1506
|
+
if (directMatch !== -1) {
|
|
1507
|
+
return directMatch;
|
|
1508
|
+
}
|
|
1509
|
+
return allSlides.findIndex(slide => ( slide.steps.some(step => step.id === this.editorInput.selectedStep)));
|
|
1510
|
+
}
|
|
1511
|
+
selectSlide(stepId) {
|
|
1512
|
+
this.editorInput.selectedStep = stepId;
|
|
1513
|
+
const step = this.currentWalkthrough?.steps.find(step => step.id === stepId);
|
|
1514
|
+
if (!step) {
|
|
1515
|
+
return;
|
|
1516
|
+
}
|
|
1517
|
+
const effectiveStepId = stepId.match(/^([^.]+)\./)?.[1] ?? stepId;
|
|
1518
|
+
const selectedSlide = this.stepsContent.querySelector(`.step-slide[data-step="${effectiveStepId}"]`);
|
|
1519
|
+
if (selectedSlide) {
|
|
1520
|
+
const selectedSlideContent = selectedSlide.querySelector('.step-slide-content');
|
|
1521
|
+
this.mediaDisposables.clear();
|
|
1522
|
+
this.stepDisposables.clear();
|
|
1523
|
+
this.buildMediaComponent(this.editorInput.selectedStep);
|
|
1524
|
+
selectedSlideContent?.appendChild(this.stepMediaComponent);
|
|
1525
|
+
setTimeout(() => selectedSlideContent.focus(), 0);
|
|
1526
|
+
}
|
|
1527
|
+
this.gettingStartedService.progressByEvent('stepSelected:' + stepId);
|
|
1528
|
+
this.detailsPageScrollbar?.scanDomNode();
|
|
1529
|
+
this.detailsScrollbar?.scanDomNode();
|
|
1530
|
+
}
|
|
1174
1531
|
buildCategorySlide(categoryID, selectedStep) {
|
|
1532
|
+
this.container.classList.remove('newSlide');
|
|
1175
1533
|
if (this.detailsScrollbar) {
|
|
1176
1534
|
this.detailsScrollbar.dispose();
|
|
1177
1535
|
}
|
|
@@ -1180,7 +1538,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1180
1538
|
});
|
|
1181
1539
|
this.detailsPageDisposables.clear();
|
|
1182
1540
|
this.mediaDisposables.clear();
|
|
1183
|
-
const category = this.
|
|
1541
|
+
const category = categoryID === NEW_WELCOME_EXPERIENCE ? this.gettingStartedService.getWalkthrough(categoryID) :
|
|
1542
|
+
this.gettingStartedCategories.find(category => category.id === categoryID);
|
|
1184
1543
|
if (!category) {
|
|
1185
1544
|
throw Error('could not find category with ID ' + categoryID);
|
|
1186
1545
|
}
|
|
@@ -1222,8 +1581,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1222
1581
|
'role': 'checkbox',
|
|
1223
1582
|
'aria-checked': step.done ? 'true' : 'false',
|
|
1224
1583
|
'aria-label': step.done
|
|
1225
|
-
? ( localize(
|
|
1226
|
-
: ( localize(
|
|
1584
|
+
? ( localize(11503, "Checkbox for Step {0}: Completed", step.title))
|
|
1585
|
+
: ( localize(11504, "Checkbox for Step {0}: Not completed", step.title)),
|
|
1227
1586
|
});
|
|
1228
1587
|
const container = $('.step-description-container', { 'x-step-description-for': step.id });
|
|
1229
1588
|
this.buildMarkdownDescription(container, step.description);
|
|
@@ -1231,10 +1590,10 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1231
1590
|
reset(stepTitle, ...renderLabelWithIcons(step.title));
|
|
1232
1591
|
const stepDescription = $('.step-container', {}, stepTitle, container);
|
|
1233
1592
|
if (step.media.type === 'image') {
|
|
1234
|
-
stepDescription.appendChild($('.image-description', { 'aria-label': ( localize(
|
|
1593
|
+
stepDescription.appendChild($('.image-description', { 'aria-label': ( localize(11533, "Image showing {0}", step.media.altText)) }));
|
|
1235
1594
|
}
|
|
1236
1595
|
else if (step.media.type === 'video') {
|
|
1237
|
-
stepDescription.appendChild($('.video-description', { 'aria-label': ( localize(
|
|
1596
|
+
stepDescription.appendChild($('.video-description', { 'aria-label': ( localize(11534, "Video showing {0}", step.media.altText)) }));
|
|
1238
1597
|
}
|
|
1239
1598
|
return $('button.getting-started-step', {
|
|
1240
1599
|
'x-dispatch': 'selectTask:' + step.id,
|
|
@@ -1254,8 +1613,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1254
1613
|
}
|
|
1255
1614
|
}));
|
|
1256
1615
|
const showNextCategory = this.gettingStartedCategories.find(_category => _category.id === category.next);
|
|
1257
|
-
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'), ( localize(
|
|
1258
|
-
? [$('button.button-link.next', { 'x-dispatch': 'nextSection' }, ( localize(
|
|
1616
|
+
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'), ( localize(11535, "Mark Done"))), ...(showNextCategory
|
|
1617
|
+
? [$('button.button-link.next', { 'x-dispatch': 'nextSection' }, ( localize(11536, "Next Section")), $('span.codicon.codicon-arrow-right'))]
|
|
1259
1618
|
: [])));
|
|
1260
1619
|
this.detailsScrollbar = this._register(( new DomScrollableElement(stepsContainer, { className: 'steps-container' })));
|
|
1261
1620
|
const stepListComponent = this.detailsScrollbar.getDomNode();
|
|
@@ -1272,18 +1631,19 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1272
1631
|
}
|
|
1273
1632
|
buildTelemetryFooter(parent) {
|
|
1274
1633
|
const mdRenderer = this.instantiationService.createInstance(MarkdownRenderer, {});
|
|
1275
|
-
const privacyStatementCopy = ( localize(
|
|
1634
|
+
const privacyStatementCopy = ( localize(11537, "privacy statement"));
|
|
1276
1635
|
const privacyStatementButton = `[${privacyStatementCopy}](command:workbench.action.openPrivacyStatementUrl)`;
|
|
1277
|
-
const optOutCopy = ( localize(
|
|
1636
|
+
const optOutCopy = ( localize(11538, "opt out"));
|
|
1278
1637
|
const optOutButton = `[${optOutCopy}](command:settings.filterByTelemetry)`;
|
|
1279
1638
|
const text = ( localize(
|
|
1280
|
-
|
|
1639
|
+
11539,
|
|
1281
1640
|
"{0} collects usage data. Read our {1} and learn how to {2}.",
|
|
1282
1641
|
this.productService.nameShort,
|
|
1283
1642
|
privacyStatementButton,
|
|
1284
1643
|
optOutButton
|
|
1285
1644
|
));
|
|
1286
|
-
|
|
1645
|
+
const renderedContents = this.detailsPageDisposables.add(mdRenderer.render({ value: text, isTrusted: true }));
|
|
1646
|
+
parent.append(renderedContents.element);
|
|
1287
1647
|
}
|
|
1288
1648
|
getKeybindingLabel(command) {
|
|
1289
1649
|
command = command.replace(/^command:/, '');
|
|
@@ -1347,8 +1707,13 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1347
1707
|
slideManager.classList.remove('showCategories');
|
|
1348
1708
|
const prevButton = this.container.querySelector('.prev-button.button-link');
|
|
1349
1709
|
prevButton.style.display = this.editorInput.showWelcome || this.prevWalkthrough ? 'block' : 'none';
|
|
1350
|
-
|
|
1351
|
-
|
|
1710
|
+
if (this.editorInput.selectedCategory === NEW_WELCOME_EXPERIENCE) {
|
|
1711
|
+
prevButton.style.display = 'none';
|
|
1712
|
+
}
|
|
1713
|
+
else {
|
|
1714
|
+
const moreTextElement = prevButton.querySelector('.moreText');
|
|
1715
|
+
moreTextElement.textContent = firstLaunch ? ( localize(11540, "Welcome")) : ( localize(11509, "Go Back"));
|
|
1716
|
+
}
|
|
1352
1717
|
this.container.querySelector('.gettingStartedSlideDetails').querySelectorAll('button').forEach(button => button.disabled = false);
|
|
1353
1718
|
this.container.querySelector('.gettingStartedSlideCategories').querySelectorAll('button').forEach(button => button.disabled = true);
|
|
1354
1719
|
this.container.querySelector('.gettingStartedSlideCategories').querySelectorAll('input').forEach(button => button.disabled = true);
|