浏览代码

Reorganize shortcuts documentation for clarity.

Ryan Grout 5 年之前
父节点
当前提交
af97ff08b0
共有 2 个文件被更改,包括 5 次插入8 次删除
  1. 0 1
      packages/shortcuts-extension/schema/shortcuts.json
  2. 5 7
      packages/shortcuts-extension/src/index.ts

+ 0 - 1
packages/shortcuts-extension/schema/shortcuts.json

@@ -8,7 +8,6 @@
   "additionalProperties": false,
   "properties": {
     "shortcuts": {
-      "title": "Keyboard Shortcuts",
       "description": "The list of keyboard shortcuts.",
       "items": { "$ref": "#/definitions/shortcut" },
       "type": "array",

+ 5 - 7
packages/shortcuts-extension/src/index.ts

@@ -162,10 +162,8 @@ const shortcuts: JupyterFrontEndPlugin<void> = {
         })
         .reduce((acc, val) => acc.concat(val), [])
         .sort((a, b) => a.command.localeCompare(b.command));
-      schema.properties.shortcuts.title =
-        'List of Commands (followed by shortcuts)';
 
-      const disableShortcutInstructions = `Note: To disable a system default shortcut,
+      schema.properties.shortcuts.description = `Note: To disable a system default shortcut,
 copy it to User Preferences and add the
 "disabled" key, for example:
 {
@@ -175,12 +173,12 @@ copy it to User Preferences and add the
     ],
     "selector": "body",
     "disabled": true
-}`;
-      schema.properties.shortcuts.description = `${commands}
+}
 
-${disableShortcutInstructions}
+List of commands followed by keyboard shortcuts:
+${commands}
 
-List of Keyboard Shortcuts`;
+List of keyboard shortcuts:`;
     }
 
     registry.pluginChanged.connect(async (sender, plugin) => {