Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try hybrid model for editor features menu #164493

Merged
merged 1 commit into from Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -28,7 +28,7 @@ export class ToggleStickyScroll extends Action2 {
},
menu: [
{ id: MenuId.CommandPalette },
{ id: MenuId.MenubarEditorFeaturesMenu, order: 6 },
{ id: MenuId.MenubarViewMenu, group: '5_editor', order: 2 },
{ id: MenuId.StickyScrollContext }
]
});
Expand Down
1 change: 0 additions & 1 deletion src/vs/platform/actions/common/actions.ts
Expand Up @@ -82,7 +82,6 @@ export class MenuId {
static readonly MenubarGoMenu = new MenuId('MenubarGoMenu');
static readonly MenubarHelpMenu = new MenuId('MenubarHelpMenu');
static readonly MenubarLayoutMenu = new MenuId('MenubarLayoutMenu');
static readonly MenubarEditorFeaturesMenu = new MenuId('MenubarEditorFeaturesMenu');
static readonly MenubarNewBreakpointMenu = new MenuId('MenubarNewBreakpointMenu');
static readonly MenubarPanelAlignmentMenu = new MenuId('MenubarPanelAlignmentMenu');
static readonly MenubarPanelPositionMenu = new MenuId('MenubarPanelPositionMenu');
Expand Down
Expand Up @@ -515,7 +515,7 @@ registerAction2(class ToggleBreadcrumb extends Action2 {
},
menu: [
{ id: MenuId.CommandPalette },
{ id: MenuId.MenubarEditorFeaturesMenu, order: 3 },
{ id: MenuId.MenubarAppearanceMenu, group: '4_editor', order: 2 },
{ id: MenuId.NotebookToolbar, group: 'notebookLayout', order: 2 },
{ id: MenuId.StickyScrollContext }
]
Expand Down
8 changes: 0 additions & 8 deletions src/vs/workbench/browser/parts/editor/editor.contribution.ts
Expand Up @@ -779,14 +779,6 @@ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
order: 9
});

// Features menu
MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
group: '2_appearance',
title: localize({ key: 'miEditorFeatures', comment: ['&& denotes a mnemonic'] }, "Editor &&Features"),
submenu: MenuId.MenubarEditorFeaturesMenu,
order: 3
});

// Main Menu Bar Contributions:

MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
Expand Down
5 changes: 3 additions & 2 deletions src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.ts
Expand Up @@ -26,8 +26,9 @@ export class ToggleMinimapAction extends Action2 {
f1: true,
toggled: ContextKeyExpr.equals('config.editor.minimap.enabled', true),
menu: {
id: MenuId.MenubarEditorFeaturesMenu,
order: 2
id: MenuId.MenubarAppearanceMenu,
group: '4_editor',
order: 1
}
});
}
Expand Down
Expand Up @@ -26,8 +26,9 @@ export class ToggleRenderControlCharacterAction extends Action2 {
f1: true,
toggled: ContextKeyExpr.equals('config.editor.renderControlCharacters', true),
menu: {
id: MenuId.MenubarEditorFeaturesMenu,
order: 5
id: MenuId.MenubarAppearanceMenu,
group: '4_editor',
order: 4
}
});
}
Expand Down
Expand Up @@ -26,8 +26,9 @@ class ToggleRenderWhitespaceAction extends Action2 {
f1: true,
toggled: ContextKeyExpr.notEquals('config.editor.renderWhitespace', 'none'),
menu: {
id: MenuId.MenubarEditorFeaturesMenu,
order: 4
id: MenuId.MenubarAppearanceMenu,
group: '4_editor',
order: 3
}
});
}
Expand Down
5 changes: 3 additions & 2 deletions src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.ts
Expand Up @@ -349,12 +349,13 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {


// View menu
MenuRegistry.appendMenuItem(MenuId.MenubarEditorFeaturesMenu, {
MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
command: {
id: TOGGLE_WORD_WRAP_ID,
title: nls.localize({ key: 'miToggleWordWrap', comment: ['&& denotes a mnemonic'] }, "&&Word Wrap"),
toggled: EDITOR_WORD_WRAP,
precondition: CAN_TOGGLE_WORD_WRAP
},
order: 1
order: 1,
group: '5_editor'
});
6 changes: 3 additions & 3 deletions src/vs/workbench/electron-sandbox/actions/windowActions.ts
Expand Up @@ -104,7 +104,7 @@ export class ZoomInAction extends BaseZoomAction {
},
menu: {
id: MenuId.MenubarAppearanceMenu,
group: '3_zoom',
group: '5_zoom',
order: 1
}
});
Expand Down Expand Up @@ -138,7 +138,7 @@ export class ZoomOutAction extends BaseZoomAction {
},
menu: {
id: MenuId.MenubarAppearanceMenu,
group: '3_zoom',
group: '5_zoom',
order: 2
}
});
Expand Down Expand Up @@ -167,7 +167,7 @@ export class ZoomResetAction extends BaseZoomAction {
},
menu: {
id: MenuId.MenubarAppearanceMenu,
group: '3_zoom',
group: '5_zoom',
order: 3
}
});
Expand Down