-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Closed
Labels
Milestone
Description
Items to keep track of:
- upgrade to MathJax 3 [with git history] jupyterlab/jupyterlab#13877
- Check requiring
ISessionContextDialogsby default: Run kernel on cell execution when no kernel jupyterlab/jupyterlab#12858 - Upgrade
jlpmto yarn 3.4.1 jupyterlab/jupyterlab#13875 - Display shortcuts jupyterlab/jupyterlab#14053 might replace this plugin:
notebook/packages/help-extension/src/index.tsx
Lines 159 to 228 in 0ccb878
| /** | |
| * A plugin to add a command to display Keyboard Shortcuts. | |
| */ | |
| const shortcuts: JupyterFrontEndPlugin<void> = { | |
| id: '@jupyter-notebook/help-extension:shortcuts', | |
| autoStart: true, | |
| requires: [ITranslator], | |
| optional: [ICommandPalette], | |
| activate: ( | |
| app: JupyterFrontEnd, | |
| translator: ITranslator, | |
| palette: ICommandPalette | null | |
| ): void => { | |
| const { commands } = app; | |
| const trans = translator.load('notebook'); | |
| const category = trans.__('Help'); | |
| commands.addCommand(CommandIDs.shortcuts, { | |
| label: trans.__('Keyboard Shortcuts'), | |
| execute: () => { | |
| const title = ( | |
| <span className="jp-AboutNotebook-about-header"> | |
| <div className="jp-AboutNotebook-about-header-info"> | |
| {trans.__('Keyboard Shortcuts')} | |
| </div> | |
| </span> | |
| ); | |
| const body = ( | |
| <table className="jp-AboutNotebook-shortcuts"> | |
| <thead> | |
| <tr> | |
| <th>{trans.__('Name')}</th> | |
| <th>{trans.__('Shortcut')}</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| {commands.keyBindings | |
| .filter(binding => commands.isEnabled(binding.command)) | |
| .map((binding, i) => ( | |
| <tr key={i}> | |
| <td>{commands.label(binding.command)}</td> | |
| <td> | |
| <pre>{binding.keys.join(', ')}</pre> | |
| </td> | |
| </tr> | |
| ))} | |
| </tbody> | |
| </table> | |
| ); | |
| return showDialog({ | |
| title, | |
| body, | |
| buttons: [ | |
| Dialog.createButton({ | |
| label: trans.__('Dismiss'), | |
| className: | |
| 'jp-AboutNotebook-about-button jp-mod-reject jp-mod-styled' | |
| }) | |
| ] | |
| }); | |
| } | |
| }); | |
| if (palette) { | |
| palette.addItem({ command: CommandIDs.shortcuts, category }); | |
| } | |
| } | |
| }; |