Make Help menu entries more useful for exploration (#133651)

This commit is contained in:
Harald Kirschner
2021-09-24 10:35:49 -07:00
committed by GitHub
parent b4f67dd91a
commit 999f172e9c
9 changed files with 27 additions and 18 deletions
@@ -57,16 +57,16 @@ class KeybindingsReferenceAction extends Action2 {
class OpenIntroductoryVideosUrlAction extends Action2 {
static readonly ID = 'workbench.action.openIntroductoryVideosUrl';
static readonly ID = 'workbench.action.openVideoTutorialsUrl';
static readonly AVAILABLE = !!product.introductoryVideosUrl;
constructor() {
super({
id: OpenIntroductoryVideosUrlAction.ID,
title: {
value: localize('openIntroductoryVideosUrl', "Introductory Videos"),
mnemonicTitle: localize({ key: 'miIntroductoryVideos', comment: ['&& denotes a mnemonic'] }, "Introductory &&Videos"),
original: 'Introductory Videos'
value: localize('openVideoTutorialsUrl', "Video Tutorials"),
mnemonicTitle: localize({ key: 'miVideoTutorials', comment: ['&& denotes a mnemonic'] }, "&&Video Tutorials"),
original: 'Video Tutorials'
},
category: CATEGORIES.Help,
f1: true,
@@ -57,6 +57,15 @@ MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarHelpMenu, {
group: '1_welcome',
command: {
id: ShowAllCommandsAction.ID,
title: localize({ key: 'miShowAllCommands', comment: ['&& denotes a mnemonic'] }, "Show All Commands")
},
order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
group: '1_open',
command: {
@@ -37,6 +37,6 @@ if (ShowCurrentReleaseNotesAction.AVAILABE) {
id: ShowCurrentReleaseNotesAction.ID,
title: localize({ key: 'miReleaseNotes', comment: ['&& denotes a mnemonic'] }, "&&Release Notes")
},
order: 4
order: 5
});
}
@@ -38,7 +38,7 @@ registerAction2(class extends Action2 {
constructor() {
super({
id: 'workbench.action.openWalkthrough',
title: localize('Welcome', "Welcome"),
title: localize({ key: 'miGetStarted', comment: ['&& denotes a mnemonic'] }, "&&Get Started"),
category: localize('help', "Help"),
f1: true,
menu: {
@@ -93,14 +93,14 @@ Registry.as<IEditorPaneRegistry>(EditorExtensions.EditorPane).registerEditorPane
EditorPaneDescriptor.create(
GettingStartedPage,
GettingStartedPage.ID,
localize('welcome', "Welcome")
localize('getStarted', "Get Started")
),
[
new SyncDescriptor(GettingStartedInput)
]
);
const category = localize('welcome', "Welcome");
const category = localize('getStarted', "Get Started");
registerAction2(class extends Action2 {
constructor() {
@@ -821,7 +821,7 @@ export class GettingStartedPage extends EditorPane {
this.categoriesSlide = $('.gettingStartedSlideCategories.gettingStartedSlide');
const prevButton = $('button.prev-button.button-link', { 'x-dispatch': 'scrollPrev' }, $('span.scroll-button.codicon.codicon-chevron-left'), $('span.moreText', {}, localize('welcome', "Welcome")));
const prevButton = $('button.prev-button.button-link', { 'x-dispatch': 'scrollPrev' }, $('span.scroll-button.codicon.codicon-chevron-left'), $('span.moreText', {}, localize('getStarted', "Get Started")));
this.stepsSlide = $('.gettingStartedSlideDetails.gettingStartedSlide', {}, prevButton);
this.stepsContent = $('.gettingStartedDetailsContent', {});
@@ -46,7 +46,7 @@ export class GettingStartedInput extends EditorInput {
}
override getName() {
return localize('welcome', "Welcome");
return localize('getStarted', "Get Started");
}
selectedCategory: string | undefined;
@@ -261,9 +261,9 @@ export const walkthroughs: GettingStartedWalkthroughContent = [
{
id: 'playground',
title: localize('gettingStarted.playground.title', "Redefine your editing skills"),
description: localize('gettingStarted.playground.description.interpolated', "Want to code faster and smarter? Practice powerful code editing features in the interactive playground.\n{0}", Button(localize('openInteractivePlayground', "Open Interactive Playground"), 'command:toSide:workbench.action.showInteractivePlayground')),
description: localize('gettingStarted.playground.description.interpolated', "Want to code faster and smarter? Practice powerful code editing features in the interactive playground.\n{0}", Button(localize('openEditorPlayground', "Open Editor Playground"), 'command:toSide:workbench.action.showInteractivePlayground')),
media: {
type: 'svg', altText: 'Interactive Playground.', path: 'interactivePlayground.svg'
type: 'svg', altText: 'Editor Playground.', path: 'interactivePlayground.svg'
},
},
{
@@ -17,7 +17,7 @@ import { EditorResolution } from 'vs/platform/editor/common/editor';
const typeId = 'workbench.editors.walkThroughInput';
const inputOptions: WalkThroughInputOptions = {
typeId,
name: localize('editorWalkThrough.title', "Interactive Playground"),
name: localize('editorWalkThrough.title', "Editor Playground"),
resource: FileAccess.asBrowserUri('./vs_code_editor_walkthrough.md', require)
.with({
scheme: Schemas.walkThrough,
@@ -29,7 +29,7 @@ const inputOptions: WalkThroughInputOptions = {
export class EditorWalkThroughAction extends Action {
public static readonly ID = 'workbench.action.showInteractivePlayground';
public static readonly LABEL = localize('editorWalkThrough', "Interactive Playground");
public static readonly LABEL = localize('editorWalkThrough', "Interactive Editor Playground");
constructor(
id: string,
@@ -23,14 +23,14 @@ Registry.as<IEditorPaneRegistry>(EditorExtensions.EditorPane)
.registerEditorPane(EditorPaneDescriptor.create(
WalkThroughPart,
WalkThroughPart.ID,
localize('walkThrough.editor.label', "Interactive Playground"),
localize('walkThrough.editor.label', "Playground"),
),
[new SyncDescriptor(WalkThroughInput)]);
Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions)
.registerWorkbenchAction(
SyncActionDescriptor.from(EditorWalkThroughAction),
'Help: Interactive Playground', CATEGORIES.Help.value);
'Help: Interactive Editor Playground', CATEGORIES.Help.value);
Registry.as<IEditorFactoryRegistry>(EditorExtensions.EditorFactory).registerEditorSerializer(EditorWalkThroughInputSerializer.ID, EditorWalkThroughInputSerializer);
@@ -49,7 +49,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarHelpMenu, {
group: '1_welcome',
command: {
id: 'workbench.action.showInteractivePlayground',
title: localize({ key: 'miInteractivePlayground', comment: ['&& denotes a mnemonic'] }, "I&&nteractive Playground")
title: localize({ key: 'miPlayground', comment: ['&& denotes a mnemonic'] }, "Editor Playgrou&&nd")
},
order: 2
order: 3
});