@codingame/monaco-vscode-walkthrough-service-override 18.4.0 → 19.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 +26 -73
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.js +72 -62
- 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/gettingStartedDetailsRenderer.js +3 -3
- 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.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService._contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +12 -4
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css +14 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.js +18 -4
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +176 -190
- 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.js +4 -4
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js +3 -3
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.js +2 -2
- 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.js +2 -2
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils.js +1 -1
|
@@ -20,7 +20,7 @@ import { parse } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marsha
|
|
|
20
20
|
import { matchesScheme, Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
21
21
|
import { OS } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
22
22
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
23
|
-
import {
|
|
23
|
+
import { assertReturnsDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
24
24
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
25
25
|
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
26
26
|
import * as gettingStarted from './media/gettingStarted.css';
|
|
@@ -54,7 +54,7 @@ import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs
|
|
|
54
54
|
import { isRecentFolder, isRecentWorkspace } from '@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common/vscode/vs/platform/workspaces/common/workspaces';
|
|
55
55
|
import { IWorkspacesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspaces/common/workspaces.service';
|
|
56
56
|
import { OpenRecentAction } from '@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common/vscode/vs/workbench/browser/actions/windowActions';
|
|
57
|
-
import { OpenFolderViaWorkspaceAction, OpenFileFolderAction, OpenFolderAction } from '@codingame/monaco-vscode-
|
|
57
|
+
import { OpenFolderViaWorkspaceAction, OpenFileFolderAction, OpenFolderAction } from '@codingame/monaco-vscode-f24e325c-2ce0-5bba-8236-bfc4f53180ab-common/vscode/vs/workbench/browser/actions/workspaceActions';
|
|
58
58
|
import { EditorPane } from '@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
59
59
|
import { WorkbenchStateContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
60
60
|
import { IWebviewService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview.service';
|
|
@@ -76,7 +76,7 @@ import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vs
|
|
|
76
76
|
import { AccessibleViewAction } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibleViewActions';
|
|
77
77
|
import { KeybindingLabel } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/keybindingLabel/keybindingLabel';
|
|
78
78
|
import { ScrollbarVisibility } from '@codingame/monaco-vscode-api/vscode/vs/base/common/scrollable';
|
|
79
|
-
import {
|
|
79
|
+
import { startupExpContext, StartupExperimentGroup } from '@codingame/monaco-vscode-516ccb00-d5b9-5317-baf0-fcc96e99669a-common/vscode/vs/workbench/services/coreExperimentation/common/coreExperimentationService';
|
|
80
80
|
|
|
81
81
|
var GettingStartedPage_1;
|
|
82
82
|
registerCss(gettingStarted);
|
|
@@ -97,7 +97,7 @@ const REDUCED_MOTION_KEY = 'workbench.welcomePage.preferReducedMotion';
|
|
|
97
97
|
let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
98
98
|
static { GettingStartedPage_1 = this; }
|
|
99
99
|
static { this.ID = 'gettingStartedPage'; }
|
|
100
|
-
constructor(group, commandService, productService, keybindingService, gettingStartedService, configurationService, telemetryService, languageService, fileService, openerService, themeService, storageService, extensionService, instantiationService, notificationService, groupsService, contextService, quickInputService, workspacesService, labelService, hostService, webviewService, workspaceContextService, accessibilityService
|
|
100
|
+
constructor(group, commandService, productService, keybindingService, gettingStartedService, configurationService, telemetryService, languageService, fileService, openerService, themeService, storageService, extensionService, instantiationService, notificationService, groupsService, contextService, quickInputService, workspacesService, labelService, hostService, webviewService, workspaceContextService, accessibilityService) {
|
|
101
101
|
super(GettingStartedPage_1.ID, group, telemetryService, themeService, storageService);
|
|
102
102
|
this.commandService = commandService;
|
|
103
103
|
this.productService = productService;
|
|
@@ -120,7 +120,6 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
120
120
|
this.webviewService = webviewService;
|
|
121
121
|
this.workspaceContextService = workspaceContextService;
|
|
122
122
|
this.accessibilityService = accessibilityService;
|
|
123
|
-
this.gettingStartedExperimentService = gettingStartedExperimentService;
|
|
124
123
|
this.inProgressScroll = Promise.resolve();
|
|
125
124
|
this.dispatchListeners = ( new DisposableStore());
|
|
126
125
|
this.stepDisposables = ( new DisposableStore());
|
|
@@ -134,7 +133,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
134
133
|
this.container = $('.gettingStartedContainer', {
|
|
135
134
|
role: 'document',
|
|
136
135
|
tabindex: 0,
|
|
137
|
-
'aria-label': ( localize(
|
|
136
|
+
'aria-label': ( localize(12057, "Overview of how to get up to speed with your editor."))
|
|
138
137
|
});
|
|
139
138
|
this.stepMediaComponent = $('.getting-started-media');
|
|
140
139
|
this.stepMediaComponent.id = generateUuid();
|
|
@@ -204,21 +203,21 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
204
203
|
}));
|
|
205
204
|
ourStep.done = step.done;
|
|
206
205
|
if (category.id === this.currentWalkthrough?.id) {
|
|
207
|
-
const badgeelements =
|
|
206
|
+
const badgeelements = assertReturnsDefined(this.window.document.querySelectorAll(`[data-done-step-id="${step.id}"]`));
|
|
208
207
|
badgeelements.forEach(badgeelement => {
|
|
209
208
|
if (step.done) {
|
|
210
209
|
badgeelement.setAttribute('aria-checked', 'true');
|
|
211
210
|
badgeelement.parentElement?.setAttribute('aria-checked', 'true');
|
|
212
211
|
badgeelement.classList.remove(...ThemeIcon.asClassNameArray(gettingStartedUncheckedCodicon));
|
|
213
212
|
badgeelement.classList.add('complete', ...ThemeIcon.asClassNameArray(gettingStartedCheckedCodicon));
|
|
214
|
-
badgeelement.setAttribute('aria-label', ( localize(
|
|
213
|
+
badgeelement.setAttribute('aria-label', ( localize(12058, "Checkbox for Step {0}: Completed", step.title)));
|
|
215
214
|
}
|
|
216
215
|
else {
|
|
217
216
|
badgeelement.setAttribute('aria-checked', 'false');
|
|
218
217
|
badgeelement.parentElement?.setAttribute('aria-checked', 'false');
|
|
219
218
|
badgeelement.classList.remove('complete', ...ThemeIcon.asClassNameArray(gettingStartedCheckedCodicon));
|
|
220
219
|
badgeelement.classList.add(...ThemeIcon.asClassNameArray(gettingStartedUncheckedCodicon));
|
|
221
|
-
badgeelement.setAttribute('aria-label', ( localize(
|
|
220
|
+
badgeelement.setAttribute('aria-label', ( localize(12059, "Checkbox for Step {0}: Not completed", step.title)));
|
|
222
221
|
}
|
|
223
222
|
});
|
|
224
223
|
}
|
|
@@ -404,7 +403,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
404
403
|
}
|
|
405
404
|
}
|
|
406
405
|
toggleStepCompletion(argument) {
|
|
407
|
-
const stepToggle =
|
|
406
|
+
const stepToggle = assertReturnsDefined(this.currentWalkthrough?.steps.find(step => step.id === argument));
|
|
408
407
|
if (stepToggle.done) {
|
|
409
408
|
this.gettingStartedService.deprogressStep(argument);
|
|
410
409
|
}
|
|
@@ -420,7 +419,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
420
419
|
label: x.title,
|
|
421
420
|
detail: x.description,
|
|
422
421
|
description: x.source,
|
|
423
|
-
}))), { canPickMany: false, matchOnDescription: true, matchOnDetail: true, title: ( localize(
|
|
422
|
+
}))), { canPickMany: false, matchOnDescription: true, matchOnDetail: true, title: ( localize(12060, "Open Walkthrough...")) });
|
|
424
423
|
if (selection) {
|
|
425
424
|
this.runDispatchCommand('selectCategory', selection.id);
|
|
426
425
|
}
|
|
@@ -437,7 +436,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
437
436
|
if (!this.currentWalkthrough) {
|
|
438
437
|
throw Error('no walkthrough selected');
|
|
439
438
|
}
|
|
440
|
-
const stepToExpand =
|
|
439
|
+
const stepToExpand = assertReturnsDefined(this.currentWalkthrough.steps.find(step => step.id === stepId));
|
|
441
440
|
if (!forceRebuild && this.currentMediaComponent === stepId) {
|
|
442
441
|
return;
|
|
443
442
|
}
|
|
@@ -601,7 +600,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
601
600
|
const themeType = this.themeService.getColorTheme().type;
|
|
602
601
|
const videoPath = media.path[themeType];
|
|
603
602
|
const videoPoster = media.poster ? media.poster[themeType] : undefined;
|
|
604
|
-
const altText = media.altText ? media.altText : ( localize(
|
|
603
|
+
const altText = media.altText ? media.altText : ( localize(12061, "Video for {0}", stepToExpand.title));
|
|
605
604
|
const rawHTML = await this.detailsRenderer.renderVideo(videoPath, videoPoster, altText);
|
|
606
605
|
this.webview.setHtml(rawHTML);
|
|
607
606
|
let isDisposed = false;
|
|
@@ -629,8 +628,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
629
628
|
provideScreenReaderUpdate() {
|
|
630
629
|
if (this.configurationService.getValue(AccessibilityVerbositySettingId.Walkthrough)) {
|
|
631
630
|
const kbLabel = this.keybindingService.lookupKeybinding(AccessibleViewAction.id)?.getAriaLabel();
|
|
632
|
-
return kbLabel ? ( localize(
|
|
633
|
-
|
|
631
|
+
return kbLabel ? ( localize(12062, "Inspect this in the accessible view ({0}).\n", kbLabel)) : ( localize(
|
|
632
|
+
12063,
|
|
634
633
|
"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding.\n"
|
|
635
634
|
));
|
|
636
635
|
}
|
|
@@ -644,7 +643,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
644
643
|
if (!stepElement) {
|
|
645
644
|
return;
|
|
646
645
|
}
|
|
647
|
-
id =
|
|
646
|
+
id = assertReturnsDefined(stepElement.getAttribute('data-step-id'));
|
|
648
647
|
}
|
|
649
648
|
stepElement.parentElement?.querySelectorAll('.expanded').forEach(node => {
|
|
650
649
|
if (node.getAttribute('data-step-id') !== id) {
|
|
@@ -690,7 +689,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
690
689
|
this.categoriesPageScrollbar.dispose();
|
|
691
690
|
}
|
|
692
691
|
this.categoriesSlide = $('.gettingStartedSlideCategories.gettingStartedSlide');
|
|
693
|
-
const prevButton = $('button.prev-button.button-link', { 'x-dispatch': 'scrollPrev' }, $('span.scroll-button.codicon.codicon-chevron-left'), $('span.moreText', {}, ( localize(
|
|
692
|
+
const prevButton = $('button.prev-button.button-link', { 'x-dispatch': 'scrollPrev' }, $('span.scroll-button.codicon.codicon-chevron-left'), $('span.moreText', {}, ( localize(12064, "Go Back"))));
|
|
694
693
|
this.stepsSlide = $('.gettingStartedSlideDetails.gettingStartedSlide', {}, prevButton);
|
|
695
694
|
this.stepsContent = $('.gettingStartedDetailsContent', {});
|
|
696
695
|
this.detailsPageScrollbar = this._register(( new DomScrollableElement(
|
|
@@ -714,11 +713,11 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
714
713
|
icon: Codicon.check,
|
|
715
714
|
actionClassName: 'getting-started-checkbox',
|
|
716
715
|
isChecked: this.configurationService.getValue(configurationKey) === 'welcomePage',
|
|
717
|
-
title: ( localize(
|
|
716
|
+
title: ( localize(12065, "When checked, this page will be shown on startup.")),
|
|
718
717
|
...defaultToggleStyles
|
|
719
718
|
}));
|
|
720
719
|
showOnStartupCheckbox.domNode.id = 'showOnStartup';
|
|
721
|
-
const showOnStartupLabel = $('label.caption', { for: 'showOnStartup' }, ( localize(
|
|
720
|
+
const showOnStartupLabel = $('label.caption', { for: 'showOnStartup' }, ( localize(12066, "Show welcome page on startup")));
|
|
722
721
|
const onShowOnStartupChanged = () => {
|
|
723
722
|
if (showOnStartupCheckbox.checked) {
|
|
724
723
|
this.telemetryService.publicLog2('gettingStarted.ActionExecuted', { command: 'showOnStartupChecked', argument: undefined, walkthroughId: this.currentWalkthrough?.id });
|
|
@@ -737,7 +736,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
737
736
|
showOnStartupCheckbox.checked = !showOnStartupCheckbox.checked;
|
|
738
737
|
onShowOnStartupChanged();
|
|
739
738
|
}));
|
|
740
|
-
const header = $('.header', {}, $('h1.product-name.caption', {}, this.productService.nameLong), $('p.subtitle.description', {}, ( localize(
|
|
739
|
+
const header = $('.header', {}, $('h1.product-name.caption', {}, this.productService.nameLong), $('p.subtitle.description', {}, ( localize(12067, "Editing evolved"))));
|
|
741
740
|
const leftColumn = $('.categories-column.categories-column-left', {});
|
|
742
741
|
const rightColumn = $('.categories-column.categories-column-right', {});
|
|
743
742
|
const startList = this.buildStartList();
|
|
@@ -811,9 +810,9 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
811
810
|
const firstSessionDateString = this.storageService.get(firstSessionDateStorageKey, StorageScope.APPLICATION) || ( new Date()).toUTCString();
|
|
812
811
|
const daysSinceFirstSession = ((+( new Date())) - (+( new Date(firstSessionDateString)))) / 1000 / 60 / 60 / 24;
|
|
813
812
|
const fistContentBehaviour = daysSinceFirstSession < 1 ? 'openToFirstCategory' : 'index';
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
const first =
|
|
813
|
+
const startupExpValue = startupExpContext.getValue(this.contextService);
|
|
814
|
+
if (fistContentBehaviour === 'openToFirstCategory' && ((!startupExpValue || startupExpValue === '' || startupExpValue === StartupExperimentGroup.Control))) {
|
|
815
|
+
const first = this.gettingStartedCategories.filter(c => !c.when || this.contextService.contextMatchesRules(c.when))[0];
|
|
817
816
|
if (first) {
|
|
818
817
|
this.hasScrolledToFirstCategory = true;
|
|
819
818
|
this.currentWalkthrough = first;
|
|
@@ -849,7 +848,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
849
848
|
const link = $('button.button-link');
|
|
850
849
|
link.innerText = name;
|
|
851
850
|
link.title = fullPath;
|
|
852
|
-
link.setAttribute('aria-label', ( localize(
|
|
851
|
+
link.setAttribute('aria-label', ( localize(12068, "Open folder {0} with path {1}", name, parentPath)));
|
|
853
852
|
link.addEventListener('click', e => {
|
|
854
853
|
this.telemetryService.publicLog2('gettingStarted.ActionExecuted', { command: 'openRecent', argument: undefined, walkthroughId: this.currentWalkthrough?.id });
|
|
855
854
|
this.hostService.openWindow([windowOpenable], {
|
|
@@ -872,18 +871,18 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
872
871
|
this.recentlyOpenedList.dispose();
|
|
873
872
|
}
|
|
874
873
|
const recentlyOpenedList = this.recentlyOpenedList = ( new GettingStartedIndexList({
|
|
875
|
-
title: ( localize(
|
|
874
|
+
title: ( localize(12069, "Recent")),
|
|
876
875
|
klass: 'recently-opened',
|
|
877
876
|
limit: 5,
|
|
878
|
-
empty: $('.empty-recent', {}, ( localize(
|
|
877
|
+
empty: $('.empty-recent', {}, ( localize(12070, "You have no recent folders,")), $('button.button-link', { 'x-dispatch': 'openFolder' }, ( localize(12071, "open a folder"))), ( localize(12072, "to start."))),
|
|
879
878
|
more: $('.more', {}, $('button.button-link', {
|
|
880
879
|
'x-dispatch': 'showMoreRecents',
|
|
881
880
|
title: ( localize(
|
|
882
|
-
|
|
881
|
+
12073,
|
|
883
882
|
"Show All Recent Folders {0}",
|
|
884
883
|
this.getKeybindingLabel(OpenRecentAction.ID)
|
|
885
884
|
))
|
|
886
|
-
}, ( localize(
|
|
885
|
+
}, ( localize(12074, "More...")))),
|
|
887
886
|
renderElement: renderRecent,
|
|
888
887
|
contextService: this.contextService
|
|
889
888
|
}));
|
|
@@ -911,7 +910,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
911
910
|
this.startList.dispose();
|
|
912
911
|
}
|
|
913
912
|
const startList = this.startList = ( new GettingStartedIndexList({
|
|
914
|
-
title: ( localize(
|
|
913
|
+
title: ( localize(12075, "Start")),
|
|
915
914
|
klass: 'start-container',
|
|
916
915
|
limit: 10,
|
|
917
916
|
renderElement: renderStartEntry,
|
|
@@ -927,10 +926,10 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
927
926
|
const renderNewBadge = (category.newItems || category.newEntry) && !category.isFeatured;
|
|
928
927
|
const newBadge = $('.new-badge', {});
|
|
929
928
|
if (category.newEntry) {
|
|
930
|
-
reset(newBadge, $('.new-category', {}, ( localize(
|
|
929
|
+
reset(newBadge, $('.new-category', {}, ( localize(12076, "New"))));
|
|
931
930
|
}
|
|
932
931
|
else if (category.newItems) {
|
|
933
|
-
reset(newBadge, $('.new-items', {}, ( localize(
|
|
932
|
+
reset(newBadge, $('.new-items', {}, ( localize(12077, "Updated"))));
|
|
934
933
|
}
|
|
935
934
|
const featuredBadge = $('.featured-badge', {});
|
|
936
935
|
const descriptionContent = $('.description-content', {});
|
|
@@ -946,9 +945,9 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
946
945
|
}, featuredBadge, $('.main-content', {}, this.iconWidgetFor(category), titleContent, renderNewBadge ? newBadge : $('.no-badge'), $('a.codicon.codicon-close.hide-category-button', {
|
|
947
946
|
'tabindex': 0,
|
|
948
947
|
'x-dispatch': 'hideCategory:' + category.id,
|
|
949
|
-
'title': ( localize(
|
|
948
|
+
'title': ( localize(12078, "Hide")),
|
|
950
949
|
'role': 'button',
|
|
951
|
-
'aria-label': ( localize(
|
|
950
|
+
'aria-label': ( localize(12079, "Hide")),
|
|
952
951
|
})), descriptionContent, $('.category-progress', { 'x-data-category-id': category.id, }, $('.progress-bar-outer', { 'role': 'progressbar' }, $('.progress-bar-inner'))));
|
|
953
952
|
};
|
|
954
953
|
if (this.gettingStartedList) {
|
|
@@ -974,10 +973,10 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
974
973
|
return rank;
|
|
975
974
|
};
|
|
976
975
|
const gettingStartedList = this.gettingStartedList = ( new GettingStartedIndexList({
|
|
977
|
-
title: ( localize(
|
|
976
|
+
title: ( localize(12080, "Walkthroughs")),
|
|
978
977
|
klass: 'getting-started',
|
|
979
978
|
limit: 5,
|
|
980
|
-
footer: $('span.button-link.see-all-walkthroughs', { 'x-dispatch': 'seeAllWalkthroughs', 'tabindex': 0 }, ( localize(
|
|
979
|
+
footer: $('span.button-link.see-all-walkthroughs', { 'x-dispatch': 'seeAllWalkthroughs', 'tabindex': 0 }, ( localize(12074, "More..."))),
|
|
981
980
|
renderElement: renderGetttingStaredWalkthrough,
|
|
982
981
|
rankElement: rankWalkthrough,
|
|
983
982
|
contextService: this.contextService,
|
|
@@ -1024,7 +1023,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1024
1023
|
throw Error('Could not find category with ID ' + categoryID);
|
|
1025
1024
|
}
|
|
1026
1025
|
const stats = this.getWalkthroughCompletionStats(category);
|
|
1027
|
-
const bar =
|
|
1026
|
+
const bar = assertReturnsDefined(element.querySelector('.progress-bar-inner'));
|
|
1028
1027
|
bar.setAttribute('aria-valuemin', '0');
|
|
1029
1028
|
bar.setAttribute('aria-valuenow', '' + stats.stepsComplete);
|
|
1030
1029
|
bar.setAttribute('aria-valuemax', '' + stats.stepsTotal);
|
|
@@ -1032,10 +1031,10 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1032
1031
|
bar.style.width = `${progress}%`;
|
|
1033
1032
|
element.parentElement.classList.toggle('no-progress', stats.stepsComplete === 0);
|
|
1034
1033
|
if (stats.stepsTotal === stats.stepsComplete) {
|
|
1035
|
-
bar.title = ( localize(
|
|
1034
|
+
bar.title = ( localize(12081, "All {0} steps complete!", stats.stepsComplete));
|
|
1036
1035
|
}
|
|
1037
1036
|
else {
|
|
1038
|
-
bar.title = ( localize(
|
|
1037
|
+
bar.title = ( localize(12082, "{0} of {1} steps complete", stats.stepsComplete, stats.stepsTotal));
|
|
1039
1038
|
}
|
|
1040
1039
|
});
|
|
1041
1040
|
}
|
|
@@ -1065,7 +1064,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1065
1064
|
}
|
|
1066
1065
|
focusSideEditorGroup() {
|
|
1067
1066
|
const fullSize = this.groupsService.getPart(this.group).contentDimension;
|
|
1068
|
-
if (!fullSize || fullSize.width <= 700) {
|
|
1067
|
+
if (!fullSize || fullSize.width <= 700 || this.container.classList.contains('width-constrained') || this.container.classList.contains('width-semi-constrained')) {
|
|
1069
1068
|
return;
|
|
1070
1069
|
}
|
|
1071
1070
|
if (this.groupsService.count === 1) {
|
|
@@ -1073,7 +1072,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1073
1072
|
this.groupsService.activateGroup(sideGroup);
|
|
1074
1073
|
const gettingStartedSize = Math.floor(fullSize.width / 2);
|
|
1075
1074
|
const gettingStartedGroup = this.groupsService.getGroups(GroupsOrder.MOST_RECENTLY_ACTIVE).find(group => (group.activeEditor instanceof GettingStartedInput));
|
|
1076
|
-
this.groupsService.setSize(
|
|
1075
|
+
this.groupsService.setSize(assertReturnsDefined(gettingStartedGroup), { width: gettingStartedSize, height: fullSize.height });
|
|
1077
1076
|
}
|
|
1078
1077
|
const nonGettingStartedGroup = this.groupsService.getGroups(GroupsOrder.MOST_RECENTLY_ACTIVE).find(group => !(group.activeEditor instanceof GettingStartedInput));
|
|
1079
1078
|
if (nonGettingStartedGroup) {
|
|
@@ -1158,8 +1157,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1158
1157
|
}, null, this.detailsPageDisposables);
|
|
1159
1158
|
if (isCommand) {
|
|
1160
1159
|
const keybinding = this.getKeyBinding(command);
|
|
1161
|
-
if (keybinding
|
|
1162
|
-
const shortcutMessage = $('span.shortcut-message', {}, ( localize(
|
|
1160
|
+
if (keybinding) {
|
|
1161
|
+
const shortcutMessage = $('span.shortcut-message', {}, ( localize(12083, 'Tip: Use keyboard shortcut ')));
|
|
1163
1162
|
container.appendChild(shortcutMessage);
|
|
1164
1163
|
const label = ( new KeybindingLabel(shortcutMessage, OS, { ...defaultKeybindingLabelStyles }));
|
|
1165
1164
|
label.set(keybinding);
|
|
@@ -1270,6 +1269,18 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1270
1269
|
prevButton.removeAttribute('tabindex');
|
|
1271
1270
|
}
|
|
1272
1271
|
}
|
|
1272
|
+
if (this.nextButton) {
|
|
1273
|
+
const isLastSlide = newIndex === steps.length - 1;
|
|
1274
|
+
const textNode = this.nextButton.firstChild;
|
|
1275
|
+
if (textNode && textNode.nodeType === Node.TEXT_NODE) {
|
|
1276
|
+
textNode.textContent = isLastSlide
|
|
1277
|
+
? ( localize(12084, "Start coding"))
|
|
1278
|
+
: ( localize(12085, "Next"));
|
|
1279
|
+
}
|
|
1280
|
+
this.nextButton.setAttribute('aria-label', isLastSlide
|
|
1281
|
+
? ( localize(12086, "Start coding"))
|
|
1282
|
+
: ( localize(12087, "Next")));
|
|
1283
|
+
}
|
|
1273
1284
|
}
|
|
1274
1285
|
buildNewCategorySlide(categoryID, selectedStep) {
|
|
1275
1286
|
this.container.classList.add('newSlide');
|
|
@@ -1295,9 +1306,9 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1295
1306
|
const slidesContainer = $('.step-slides-container');
|
|
1296
1307
|
const navigationContainer = $('.step-dots-container');
|
|
1297
1308
|
const prevButton = $('button.button-link.navigation.back', {
|
|
1298
|
-
'aria-label': ( localize(
|
|
1309
|
+
'aria-label': ( localize(12088, "Previous Step")),
|
|
1299
1310
|
'tabindex': '0'
|
|
1300
|
-
}, $('span.codicon.codicon-arrow-left'), ( localize(
|
|
1311
|
+
}, $('span.codicon.codicon-arrow-left'), ( localize(12089, "Back")));
|
|
1301
1312
|
const dotsContainer = $('.dots-centered');
|
|
1302
1313
|
navigationContainer.appendChild(prevButton);
|
|
1303
1314
|
navigationContainer.appendChild(dotsContainer);
|
|
@@ -1378,17 +1389,17 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1378
1389
|
this.selectStepByIndex(index, ( allSlides.map(s => s.steps[0])), index > currentIndex ? 1 : -1);
|
|
1379
1390
|
}));
|
|
1380
1391
|
});
|
|
1381
|
-
|
|
1382
|
-
'aria-label': ( localize(
|
|
1383
|
-
}, ( localize(
|
|
1384
|
-
navigationContainer.appendChild(nextButton);
|
|
1392
|
+
this.nextButton = $('button.button-link.navigation.next', {
|
|
1393
|
+
'aria-label': ( localize(12087, "Next")),
|
|
1394
|
+
}, ( localize(12085, "Next")), $('span.codicon.codicon-arrow-right'));
|
|
1395
|
+
navigationContainer.appendChild(this.nextButton);
|
|
1385
1396
|
this.detailsPageDisposables.add(addDisposableListener(prevButton, 'click', () => {
|
|
1386
1397
|
const currentIndex = this.getCurrentSlideIndex(allSlides);
|
|
1387
1398
|
if (currentIndex > 0) {
|
|
1388
1399
|
this.selectStepByIndex(currentIndex - 1, ( allSlides.map(s => s.steps[0])), -1);
|
|
1389
1400
|
}
|
|
1390
1401
|
}));
|
|
1391
|
-
this.detailsPageDisposables.add(addDisposableListener(nextButton, 'click', () => {
|
|
1402
|
+
this.detailsPageDisposables.add(addDisposableListener(this.nextButton, 'click', () => {
|
|
1392
1403
|
const currentIndex = this.getCurrentSlideIndex(allSlides);
|
|
1393
1404
|
if (currentIndex < allSlides.length - 1) {
|
|
1394
1405
|
this.selectStepByIndex(currentIndex + 1, ( allSlides.map(s => s.steps[0])), 1);
|
|
@@ -1596,8 +1607,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1596
1607
|
'role': 'checkbox',
|
|
1597
1608
|
'aria-checked': step.done ? 'true' : 'false',
|
|
1598
1609
|
'aria-label': step.done
|
|
1599
|
-
? ( localize(
|
|
1600
|
-
: ( localize(
|
|
1610
|
+
? ( localize(12058, "Checkbox for Step {0}: Completed", step.title))
|
|
1611
|
+
: ( localize(12059, "Checkbox for Step {0}: Not completed", step.title)),
|
|
1601
1612
|
});
|
|
1602
1613
|
const container = $('.step-description-container', { 'x-step-description-for': step.id });
|
|
1603
1614
|
this.buildMarkdownDescription(container, step.description);
|
|
@@ -1605,10 +1616,10 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1605
1616
|
reset(stepTitle, ...renderLabelWithIcons(step.title));
|
|
1606
1617
|
const stepDescription = $('.step-container', {}, stepTitle, container);
|
|
1607
1618
|
if (step.media.type === 'image') {
|
|
1608
|
-
stepDescription.appendChild($('.image-description', { 'aria-label': ( localize(
|
|
1619
|
+
stepDescription.appendChild($('.image-description', { 'aria-label': ( localize(12090, "Image showing {0}", step.media.altText)) }));
|
|
1609
1620
|
}
|
|
1610
1621
|
else if (step.media.type === 'video') {
|
|
1611
|
-
stepDescription.appendChild($('.video-description', { 'aria-label': ( localize(
|
|
1622
|
+
stepDescription.appendChild($('.video-description', { 'aria-label': ( localize(12091, "Video showing {0}", step.media.altText)) }));
|
|
1612
1623
|
}
|
|
1613
1624
|
return $('button.getting-started-step', {
|
|
1614
1625
|
'x-dispatch': 'selectTask:' + step.id,
|
|
@@ -1628,8 +1639,8 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1628
1639
|
}
|
|
1629
1640
|
}));
|
|
1630
1641
|
const showNextCategory = this.gettingStartedCategories.find(_category => _category.id === category.next);
|
|
1631
|
-
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(
|
|
1632
|
-
? [$('button.button-link.next', { 'x-dispatch': 'nextSection' }, ( localize(
|
|
1642
|
+
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(12092, "Mark Done"))), ...(showNextCategory
|
|
1643
|
+
? [$('button.button-link.next', { 'x-dispatch': 'nextSection' }, ( localize(12093, "Next Section")), $('span.codicon.codicon-arrow-right'))]
|
|
1633
1644
|
: [])));
|
|
1634
1645
|
this.detailsScrollbar = this._register(( new DomScrollableElement(stepsContainer, { className: 'steps-container' })));
|
|
1635
1646
|
const stepListComponent = this.detailsScrollbar.getDomNode();
|
|
@@ -1646,12 +1657,12 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1646
1657
|
}
|
|
1647
1658
|
buildTelemetryFooter(parent) {
|
|
1648
1659
|
const mdRenderer = this.instantiationService.createInstance(MarkdownRenderer, {});
|
|
1649
|
-
const privacyStatementCopy = ( localize(
|
|
1660
|
+
const privacyStatementCopy = ( localize(12094, "privacy statement"));
|
|
1650
1661
|
const privacyStatementButton = `[${privacyStatementCopy}](command:workbench.action.openPrivacyStatementUrl)`;
|
|
1651
|
-
const optOutCopy = ( localize(
|
|
1662
|
+
const optOutCopy = ( localize(12095, "opt out"));
|
|
1652
1663
|
const optOutButton = `[${optOutCopy}](command:settings.filterByTelemetry)`;
|
|
1653
1664
|
const text = ( localize(
|
|
1654
|
-
|
|
1665
|
+
12096,
|
|
1655
1666
|
"{0} collects usage data. Read our {1} and learn how to {2}.",
|
|
1656
1667
|
this.productService.nameShort,
|
|
1657
1668
|
privacyStatementButton,
|
|
@@ -1708,7 +1719,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1708
1719
|
}
|
|
1709
1720
|
}
|
|
1710
1721
|
setSlide(toEnable, firstLaunch = false) {
|
|
1711
|
-
const slideManager =
|
|
1722
|
+
const slideManager = assertReturnsDefined(this.container.querySelector('.gettingStarted'));
|
|
1712
1723
|
if (toEnable === 'categories') {
|
|
1713
1724
|
slideManager.classList.remove('showDetails');
|
|
1714
1725
|
slideManager.classList.add('showCategories');
|
|
@@ -1727,7 +1738,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
1727
1738
|
}
|
|
1728
1739
|
else {
|
|
1729
1740
|
const moreTextElement = prevButton.querySelector('.moreText');
|
|
1730
|
-
moreTextElement.textContent = firstLaunch ? ( localize(
|
|
1741
|
+
moreTextElement.textContent = firstLaunch ? ( localize(12097, "Welcome")) : ( localize(12064, "Go Back"));
|
|
1731
1742
|
}
|
|
1732
1743
|
this.container.querySelector('.gettingStartedSlideDetails').querySelectorAll('button').forEach(button => button.disabled = false);
|
|
1733
1744
|
this.container.querySelector('.gettingStartedSlideCategories').querySelectorAll('button').forEach(button => button.disabled = true);
|
|
@@ -1769,8 +1780,7 @@ GettingStartedPage = GettingStartedPage_1 = ( __decorate([
|
|
|
1769
1780
|
( __param(20, IHostService)),
|
|
1770
1781
|
( __param(21, IWebviewService)),
|
|
1771
1782
|
( __param(22, IWorkspaceContextService)),
|
|
1772
|
-
( __param(23, IAccessibilityService))
|
|
1773
|
-
( __param(24, IGettingStartedExperimentService))
|
|
1783
|
+
( __param(23, IAccessibilityService))
|
|
1774
1784
|
], GettingStartedPage));
|
|
1775
1785
|
class GettingStartedInputSerializer {
|
|
1776
1786
|
canSerialize(editorInput) {
|
|
@@ -116,11 +116,11 @@ class GettingStartedAccessibleProvider extends Disposable {
|
|
|
116
116
|
}
|
|
117
117
|
_getContent(waltkrough, step, includeTitle) {
|
|
118
118
|
const description = ( step.description.map(lt => lt.nodes.filter(node => typeof node === 'string'))).join('\n');
|
|
119
|
-
const stepsContent = ( localize(
|
|
119
|
+
const stepsContent = ( localize(12098, '{0}\n{1}', step.title, description));
|
|
120
120
|
if (includeTitle) {
|
|
121
121
|
return [
|
|
122
|
-
( localize(
|
|
123
|
-
( localize(
|
|
122
|
+
( localize(12099, 'Title: {0}', waltkrough.title)),
|
|
123
|
+
( localize(12100, 'Description: {0}', waltkrough.description)),
|
|
124
124
|
stepsContent
|
|
125
125
|
].join('\n');
|
|
126
126
|
}
|
package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors.js
CHANGED
|
@@ -12,10 +12,10 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quic
|
|
|
12
12
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
13
13
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
14
14
|
|
|
15
|
-
registerColor('welcomePage.background', null, ( localize(
|
|
16
|
-
registerColor('welcomePage.tileBackground', { dark: editorWidgetBackground, light: editorWidgetBackground, hcDark: '#000', hcLight: editorWidgetBackground }, ( localize(
|
|
17
|
-
registerColor('welcomePage.tileHoverBackground', { dark: ( lighten(editorWidgetBackground, .2)), light: ( darken(editorWidgetBackground, .1)), hcDark: null, hcLight: null }, ( localize(
|
|
18
|
-
registerColor('welcomePage.tileBorder', { dark: '#ffffff1a', light: '#0000001a', hcDark: contrastBorder, hcLight: contrastBorder }, ( localize(
|
|
19
|
-
registerColor('welcomePage.progress.background', inputBackground, ( localize(
|
|
20
|
-
registerColor('welcomePage.progress.foreground', textLinkForeground, ( localize(
|
|
21
|
-
registerColor('walkthrough.stepTitle.foreground', { light: '#000000', dark: '#ffffff', hcDark: null, hcLight: null }, ( localize(
|
|
15
|
+
registerColor('welcomePage.background', null, ( localize(12101, 'Background color for the Welcome page.')));
|
|
16
|
+
registerColor('welcomePage.tileBackground', { dark: editorWidgetBackground, light: editorWidgetBackground, hcDark: '#000', hcLight: editorWidgetBackground }, ( localize(12102, 'Background color for the tiles on the Welcome page.')));
|
|
17
|
+
registerColor('welcomePage.tileHoverBackground', { dark: ( lighten(editorWidgetBackground, .2)), light: ( darken(editorWidgetBackground, .1)), hcDark: null, hcLight: null }, ( localize(12103, 'Hover background color for the tiles on the Welcome.')));
|
|
18
|
+
registerColor('welcomePage.tileBorder', { dark: '#ffffff1a', light: '#0000001a', hcDark: contrastBorder, hcLight: contrastBorder }, ( localize(12104, 'Border color for the tiles on the Welcome page.')));
|
|
19
|
+
registerColor('welcomePage.progress.background', inputBackground, ( localize(12105, 'Foreground color for the Welcome page progress bars.')));
|
|
20
|
+
registerColor('welcomePage.progress.foreground', textLinkForeground, ( localize(12106, 'Background color for the Welcome page progress bars.')));
|
|
21
|
+
registerColor('walkthrough.stepTitle.foreground', { light: '#000000', dark: '#ffffff', hcDark: null, hcLight: null }, ( localize(12107, 'Foreground color of the heading of each walkthrough step')));
|
|
@@ -6,7 +6,7 @@ import { TokenizationRegistry } from '@codingame/monaco-vscode-api/vscode/vs/edi
|
|
|
6
6
|
import { DEFAULT_MARKDOWN_STYLES, renderMarkdownDocument } from '@codingame/monaco-vscode-cf77987b-b1b7-5359-aaf8-a259c63d9f03-common/vscode/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer';
|
|
7
7
|
import { language } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
8
8
|
import { joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
9
|
-
import {
|
|
9
|
+
import { assertReturnsDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
10
10
|
import { asWebviewUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/common/webview';
|
|
11
11
|
import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
12
12
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
@@ -216,7 +216,7 @@ let GettingStartedDetailsRenderer = class GettingStartedDetailsRenderer {
|
|
|
216
216
|
const contents = await this.readContentsOfPath(path, false);
|
|
217
217
|
this.svgCache.set(path, contents);
|
|
218
218
|
}
|
|
219
|
-
return
|
|
219
|
+
return assertReturnsDefined(this.svgCache.get(path));
|
|
220
220
|
}
|
|
221
221
|
async readAndCacheStepMarkdown(path, base) {
|
|
222
222
|
if (!( this.mdCache.has(path))) {
|
|
@@ -224,7 +224,7 @@ let GettingStartedDetailsRenderer = class GettingStartedDetailsRenderer {
|
|
|
224
224
|
const markdownContents = await renderMarkdownDocument(transformUris(contents, base), this.extensionService, this.languageService, { allowUnknownProtocols: true });
|
|
225
225
|
this.mdCache.set(path, markdownContents);
|
|
226
226
|
}
|
|
227
|
-
return
|
|
227
|
+
return assertReturnsDefined(this.mdCache.get(path));
|
|
228
228
|
}
|
|
229
229
|
async readContentsOfPath(path, useModuleId = true) {
|
|
230
230
|
try {
|