Browse Source

Contextual help in its own menu group

Paul Ivanov 5 năm trước cách đây
mục cha
commit
4e135cb922
1 tập tin đã thay đổi với 10 bổ sung5 xóa
  1. 10 5
      packages/help-extension/src/index.tsx

+ 10 - 5
packages/help-extension/src/index.tsx

@@ -156,12 +156,17 @@ function activate(
 
   // Populate the Help menu.
   const helpMenu = mainMenu.helpMenu;
-  const labGroup = [
-    CommandIDs.about,
-    inspector ? 'inspector:open' : null,
-    CommandIDs.launchClassic
-  ].map(command => ({ command }));
+  const labGroup = [CommandIDs.about, CommandIDs.launchClassic].map(
+    command => ({ command })
+  );
   helpMenu.addGroup(labGroup, 0);
+
+  // Contextual help in its own group
+  const contextualHelpGroup = [inspector ? 'inspector:open' : null].map(
+    command => ({ command })
+  );
+  helpMenu.addGroup(contextualHelpGroup, 0);
+
   const resourcesGroup = RESOURCES.map(args => ({
     args,
     command: CommandIDs.open