diff --git a/packages/application-extension/src/index.ts b/packages/application-extension/src/index.ts index fcdb11ad0..244faf44f 100644 --- a/packages/application-extension/src/index.ts +++ b/packages/application-extension/src/index.ts @@ -481,12 +481,13 @@ const title: JupyterFrontEndPlugin = { const topVisibility: JupyterFrontEndPlugin = { id: '@jupyter-notebook/application-extension:top', requires: [INotebookShell, ITranslator], - optional: [ISettingRegistry], + optional: [ISettingRegistry, ICommandPalette], activate: ( app: JupyterFrontEnd, notebookShell: INotebookShell, translator: ITranslator, - settingRegistry: ISettingRegistry | null + settingRegistry: ISettingRegistry | null, + palette: ICommandPalette | null ) => { const trans = translator.load('notebook'); const top = notebookShell.top; @@ -527,6 +528,10 @@ const topVisibility: JupyterFrontEndPlugin = { }); } + if (palette) { + palette.addItem({ command: CommandIDs.toggleTop, category: 'View' }); + } + const onChanged = (): void => { if (settingsOverride) { return;