@codingame/monaco-vscode-walkthrough-service-override 4.5.2 → 5.0.1
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 +22 -50
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.js +9 -5
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService._contribution.js +44 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js +8 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-walkthrough-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@5.0.1"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.js
CHANGED
|
@@ -11,7 +11,6 @@ import { SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/ed
|
|
|
11
11
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
12
12
|
import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
|
|
13
13
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
14
|
-
import { hiddenEntriesConfigurationKey, walkthroughMetadataConfigurationKey } from './gettingStartedService.js';
|
|
15
14
|
import { IWalkthroughsService } from 'vscode/vscode/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.service';
|
|
16
15
|
import { GettingStartedInput } from './gettingStartedInput.js';
|
|
17
16
|
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
@@ -28,8 +27,7 @@ import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extension
|
|
|
28
27
|
import { StartupPageEditorResolverContribution, StartupPageRunnerContribution } from './startupPage.js';
|
|
29
28
|
import { ExtensionsInput } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensionsInput';
|
|
30
29
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
31
|
-
import
|
|
32
|
-
import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
|
|
30
|
+
import './gettingStartedService._contribution.js';
|
|
33
31
|
import './gettingStartedIcons.js';
|
|
34
32
|
|
|
35
33
|
const _moduleId = "vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution";
|
|
@@ -44,6 +42,9 @@ registerAction2(class extends Action2 {
|
|
|
44
42
|
id: MenuId.MenubarHelpMenu,
|
|
45
43
|
group: '1_welcome',
|
|
46
44
|
order: 1,
|
|
45
|
+
},
|
|
46
|
+
metadata: {
|
|
47
|
+
description: ( localize2WithPath(_moduleId, 1, 'Opens a Walkthrough to help you get started in VS Code.'))
|
|
47
48
|
}
|
|
48
49
|
});
|
|
49
50
|
}
|
|
@@ -110,15 +111,15 @@ registerAction2(class extends Action2 {
|
|
|
110
111
|
}
|
|
111
112
|
});
|
|
112
113
|
( (Registry.as(EditorExtensions.EditorFactory))).registerEditorSerializer(GettingStartedInput.ID, GettingStartedInputSerializer);
|
|
113
|
-
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(GettingStartedPage, GettingStartedPage.ID, ( localizeWithPath(_moduleId,
|
|
114
|
+
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(GettingStartedPage, GettingStartedPage.ID, ( localizeWithPath(_moduleId, 2, "Welcome"))), [
|
|
114
115
|
( (new SyncDescriptor(GettingStartedInput)))
|
|
115
116
|
]);
|
|
116
|
-
const category = ( localize2WithPath(_moduleId,
|
|
117
|
+
const category = ( localize2WithPath(_moduleId, 2, "Welcome"));
|
|
117
118
|
registerAction2(class extends Action2 {
|
|
118
119
|
constructor() {
|
|
119
120
|
super({
|
|
120
121
|
id: 'welcome.goBack',
|
|
121
|
-
title: ( localize2WithPath(_moduleId,
|
|
122
|
+
title: ( localize2WithPath(_moduleId, 3, 'Go Back')),
|
|
122
123
|
category,
|
|
123
124
|
keybinding: {
|
|
124
125
|
weight: 100 ,
|
|
@@ -154,7 +155,7 @@ registerAction2(class extends Action2 {
|
|
|
154
155
|
constructor() {
|
|
155
156
|
super({
|
|
156
157
|
id: 'welcome.markStepComplete',
|
|
157
|
-
title: ( localizeWithPath(_moduleId,
|
|
158
|
+
title: ( localizeWithPath(_moduleId, 4, "Mark Step Complete")),
|
|
158
159
|
category,
|
|
159
160
|
});
|
|
160
161
|
}
|
|
@@ -170,7 +171,7 @@ registerAction2(class extends Action2 {
|
|
|
170
171
|
constructor() {
|
|
171
172
|
super({
|
|
172
173
|
id: 'welcome.markStepIncomplete',
|
|
173
|
-
title: ( localizeWithPath(_moduleId,
|
|
174
|
+
title: ( localizeWithPath(_moduleId, 5, "Mark Step Incomplete")),
|
|
174
175
|
category,
|
|
175
176
|
});
|
|
176
177
|
}
|
|
@@ -186,7 +187,7 @@ registerAction2(class extends Action2 {
|
|
|
186
187
|
constructor() {
|
|
187
188
|
super({
|
|
188
189
|
id: 'welcome.showAllWalkthroughs',
|
|
189
|
-
title: ( localize2WithPath(_moduleId,
|
|
190
|
+
title: ( localize2WithPath(_moduleId, 6, 'Open Walkthrough...')),
|
|
190
191
|
category,
|
|
191
192
|
f1: true,
|
|
192
193
|
});
|
|
@@ -214,7 +215,7 @@ registerAction2(class extends Action2 {
|
|
|
214
215
|
quickPick.canSelectMany = false;
|
|
215
216
|
quickPick.matchOnDescription = true;
|
|
216
217
|
quickPick.matchOnDetail = true;
|
|
217
|
-
quickPick.placeholder = ( localizeWithPath(_moduleId,
|
|
218
|
+
quickPick.placeholder = ( localizeWithPath(_moduleId, 7, 'Select a walkthrough to open'));
|
|
218
219
|
quickPick.items = await this.getQuickPickItems(contextService, gettingStartedService);
|
|
219
220
|
quickPick.busy = true;
|
|
220
221
|
quickPick.onDidAccept(() => {
|
|
@@ -235,7 +236,7 @@ registerAction2(class extends Action2 {
|
|
|
235
236
|
});
|
|
236
237
|
const WorkspacePlatform = ( (new RawContextKey('workspacePlatform', undefined, ( localizeWithPath(
|
|
237
238
|
_moduleId,
|
|
238
|
-
|
|
239
|
+
8,
|
|
239
240
|
"The platform of the current workspace, which in remote or serverless contexts may be different from the platform of the UI"
|
|
240
241
|
)))));
|
|
241
242
|
let WorkspacePlatformContribution = class WorkspacePlatformContribution {
|
|
@@ -288,7 +289,7 @@ configurationRegistry.registerConfiguration({
|
|
|
288
289
|
default: true,
|
|
289
290
|
description: ( localizeWithPath(
|
|
290
291
|
_moduleId,
|
|
291
|
-
|
|
292
|
+
9,
|
|
292
293
|
"When enabled, an extension's walkthrough will open upon install of the extension."
|
|
293
294
|
))
|
|
294
295
|
},
|
|
@@ -297,29 +298,29 @@ configurationRegistry.registerConfiguration({
|
|
|
297
298
|
'type': 'string',
|
|
298
299
|
'enum': ['none', 'welcomePage', 'readme', 'newUntitledFile', 'welcomePageInEmptyWorkbench', 'terminal'],
|
|
299
300
|
'enumDescriptions': [
|
|
300
|
-
( localizeWithPath(_moduleId,
|
|
301
|
+
( localizeWithPath(_moduleId, 10, "Start without an editor.")),
|
|
301
302
|
( localizeWithPath(
|
|
302
303
|
_moduleId,
|
|
303
|
-
|
|
304
|
+
11,
|
|
304
305
|
"Open the Welcome page, with content to aid in getting started with VS Code and extensions."
|
|
305
306
|
)),
|
|
306
307
|
( localizeWithPath(
|
|
307
308
|
_moduleId,
|
|
308
|
-
|
|
309
|
+
12,
|
|
309
310
|
"Open the README when opening a folder that contains one, fallback to 'welcomePage' otherwise. Note: This is only observed as a global configuration, it will be ignored if set in a workspace or folder configuration."
|
|
310
311
|
)),
|
|
311
312
|
( localizeWithPath(
|
|
312
313
|
_moduleId,
|
|
313
|
-
|
|
314
|
+
13,
|
|
314
315
|
"Open a new untitled text file (only applies when opening an empty window)."
|
|
315
316
|
)),
|
|
316
|
-
( localizeWithPath(_moduleId,
|
|
317
|
-
( localizeWithPath(_moduleId,
|
|
317
|
+
( localizeWithPath(_moduleId, 14, "Open the Welcome page when opening an empty workbench.")),
|
|
318
|
+
( localizeWithPath(_moduleId, 15, "Open a new terminal in the editor area.")),
|
|
318
319
|
],
|
|
319
320
|
'default': 'welcomePage',
|
|
320
321
|
'description': ( localizeWithPath(
|
|
321
322
|
_moduleId,
|
|
322
|
-
|
|
323
|
+
16,
|
|
323
324
|
"Controls which editor is shown at startup, if none are restored from the previous session."
|
|
324
325
|
))
|
|
325
326
|
},
|
|
@@ -327,42 +328,13 @@ configurationRegistry.registerConfiguration({
|
|
|
327
328
|
scope: 1 ,
|
|
328
329
|
type: 'boolean',
|
|
329
330
|
default: false,
|
|
330
|
-
deprecationMessage: ( localizeWithPath(_moduleId,
|
|
331
|
-
description: ( localizeWithPath(_moduleId,
|
|
331
|
+
deprecationMessage: ( localizeWithPath(_moduleId, 17, "Deprecated, use the global `workbench.reduceMotion`.")),
|
|
332
|
+
description: ( localizeWithPath(_moduleId, 18, "When enabled, reduce motion in welcome page."))
|
|
332
333
|
}
|
|
333
334
|
}
|
|
334
335
|
});
|
|
335
336
|
registerWorkbenchContribution2(WorkspacePlatformContribution.ID, WorkspacePlatformContribution, 3 );
|
|
336
337
|
registerWorkbenchContribution2(StartupPageEditorResolverContribution.ID, StartupPageEditorResolverContribution, 2 );
|
|
337
338
|
registerWorkbenchContribution2(StartupPageRunnerContribution.ID, StartupPageRunnerContribution, 3 );
|
|
338
|
-
registerAction2(class extends Action2 {
|
|
339
|
-
constructor() {
|
|
340
|
-
super({
|
|
341
|
-
id: 'resetGettingStartedProgress',
|
|
342
|
-
category: ( localize2WithPath(_moduleId, 18, "Developer")),
|
|
343
|
-
title: ( localize2WithPath(_moduleId, 19, "Reset Welcome Page Walkthrough Progress")),
|
|
344
|
-
f1: true
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
run(accessor) {
|
|
348
|
-
const gettingStartedService = accessor.get(IWalkthroughsService);
|
|
349
|
-
const storageService = accessor.get(IStorageService);
|
|
350
|
-
storageService.store(hiddenEntriesConfigurationKey, JSON.stringify([]), 0 , 0 );
|
|
351
|
-
storageService.store(walkthroughMetadataConfigurationKey, JSON.stringify([]), 0 , 0 );
|
|
352
|
-
const memento = ( (new Memento('gettingStartedService', accessor.get(IStorageService))));
|
|
353
|
-
const record = memento.getMemento(0 , 0 );
|
|
354
|
-
for (const key in record) {
|
|
355
|
-
if (Object.prototype.hasOwnProperty.call(record, key)) {
|
|
356
|
-
try {
|
|
357
|
-
gettingStartedService.deprogressStep(key);
|
|
358
|
-
}
|
|
359
|
-
catch (e) {
|
|
360
|
-
console.error(e);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
memento.saveMemento();
|
|
365
|
-
}
|
|
366
|
-
});
|
|
367
339
|
|
|
368
340
|
export { WorkspacePlatform };
|
|
@@ -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,7 +63,7 @@ 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
|
|
|
@@ -97,6 +96,7 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
97
96
|
this.languageService = languageService;
|
|
98
97
|
this.fileService = fileService;
|
|
99
98
|
this.openerService = openerService;
|
|
99
|
+
this.themeService = themeService;
|
|
100
100
|
this.storageService = storageService;
|
|
101
101
|
this.extensionService = extensionService;
|
|
102
102
|
this.instantiationService = instantiationService;
|
|
@@ -565,13 +565,17 @@ let GettingStartedPage = class GettingStartedPage extends EditorPane {
|
|
|
565
565
|
this.stepDisposables.add(layoutDelayer);
|
|
566
566
|
this.stepDisposables.add({ dispose: () => this.layoutMarkdown = undefined });
|
|
567
567
|
postTrueKeysMessage();
|
|
568
|
-
this.stepDisposables.add(this.webview.onMessage(e => {
|
|
568
|
+
this.stepDisposables.add(this.webview.onMessage(async (e) => {
|
|
569
569
|
const message = e.message;
|
|
570
570
|
if (message.startsWith('command:')) {
|
|
571
571
|
this.openerService.open(message, { allowCommands: true });
|
|
572
572
|
}
|
|
573
573
|
else if (message.startsWith('setTheme:')) {
|
|
574
|
-
|
|
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
|
+
}
|
|
575
579
|
}
|
|
576
580
|
else {
|
|
577
581
|
console.error('Unexpected message', message);
|
|
@@ -1383,7 +1387,7 @@ GettingStartedPage = GettingStartedPage_1 = ( (__decorate([
|
|
|
1383
1387
|
( (__param(7, ILanguageService))),
|
|
1384
1388
|
( (__param(8, IFileService))),
|
|
1385
1389
|
( (__param(9, IOpenerService))),
|
|
1386
|
-
( (__param(10,
|
|
1390
|
+
( (__param(10, IWorkbenchThemeService))),
|
|
1387
1391
|
( (__param(11, IStorageService))),
|
|
1388
1392
|
( (__param(12, IExtensionService))),
|
|
1389
1393
|
( (__param(13, IInstantiationService))),
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
2
|
+
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
3
|
+
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
4
|
+
import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
|
|
5
|
+
import { hiddenEntriesConfigurationKey, walkthroughMetadataConfigurationKey } from './gettingStartedService.js';
|
|
6
|
+
import { IWalkthroughsService } from 'vscode/vscode/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.service';
|
|
7
|
+
|
|
8
|
+
const _moduleId = "vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService";
|
|
9
|
+
registerAction2(class extends Action2 {
|
|
10
|
+
constructor() {
|
|
11
|
+
super({
|
|
12
|
+
id: 'resetGettingStartedProgress',
|
|
13
|
+
category: ( localize2WithPath(_moduleId, 1, "Developer")),
|
|
14
|
+
title: ( localize2WithPath(_moduleId, 2, "Reset Welcome Page Walkthrough Progress")),
|
|
15
|
+
f1: true,
|
|
16
|
+
metadata: {
|
|
17
|
+
description: ( localize2WithPath(
|
|
18
|
+
_moduleId,
|
|
19
|
+
3,
|
|
20
|
+
'Reset the progress of all Walkthrough steps on the Welcome Page to make them appear as if they are being viewed for the first time, providing a fresh start to the getting started experience.'
|
|
21
|
+
)),
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
run(accessor) {
|
|
26
|
+
const gettingStartedService = accessor.get(IWalkthroughsService);
|
|
27
|
+
const storageService = accessor.get(IStorageService);
|
|
28
|
+
storageService.store(hiddenEntriesConfigurationKey, JSON.stringify([]), 0 , 0 );
|
|
29
|
+
storageService.store(walkthroughMetadataConfigurationKey, JSON.stringify([]), 0 , 0 );
|
|
30
|
+
const memento = ( (new Memento('gettingStartedService', accessor.get(IStorageService))));
|
|
31
|
+
const record = memento.getMemento(0 , 0 );
|
|
32
|
+
for (const key in record) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(record, key)) {
|
|
34
|
+
try {
|
|
35
|
+
gettingStartedService.deprogressStep(key);
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
console.error(e);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
memento.saveMemento();
|
|
43
|
+
}
|
|
44
|
+
});
|
package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js
CHANGED
|
@@ -416,7 +416,7 @@ const walkthroughs = [
|
|
|
416
416
|
_moduleId,
|
|
417
417
|
59,
|
|
418
418
|
"Extensions are VS Code's power-ups. They range from handy productivity hacks, expanding out-of-the-box features, to adding completely new capabilities.\n{0}",
|
|
419
|
-
Button(( localizeWithPath(_moduleId, 60, "Browse
|
|
419
|
+
Button(( localizeWithPath(_moduleId, 60, "Browse Popular Extensions")), 'command:workbench.extensions.action.showPopularExtensions')
|
|
420
420
|
)),
|
|
421
421
|
when: 'workspacePlatform != \'webworker\'',
|
|
422
422
|
media: {
|
package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js
CHANGED
|
@@ -29,7 +29,14 @@ class EditorWalkThroughAction extends Action2 {
|
|
|
29
29
|
id: EditorWalkThroughAction.ID,
|
|
30
30
|
title: EditorWalkThroughAction.LABEL,
|
|
31
31
|
category: Categories.Help,
|
|
32
|
-
f1: true
|
|
32
|
+
f1: true,
|
|
33
|
+
metadata: {
|
|
34
|
+
description: ( localize2WithPath(
|
|
35
|
+
_moduleId,
|
|
36
|
+
2,
|
|
37
|
+
"Opens an interactive playground for learning about the editor."
|
|
38
|
+
))
|
|
39
|
+
}
|
|
33
40
|
});
|
|
34
41
|
}
|
|
35
42
|
run(serviceAccessor) {
|