Skip to content

Commit 9cde2b6

Browse files
authored
Merge pull request #6415 from jeewonkoo/develop
add the show header command to the command palette
2 parents 203af66 + 5701f9f commit 9cde2b6

File tree

1 file changed

+7
-2
lines changed
  • packages/application-extension/src

1 file changed

+7
-2
lines changed

packages/application-extension/src/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,13 @@ const title: JupyterFrontEndPlugin<void> = {
481481
const topVisibility: JupyterFrontEndPlugin<void> = {
482482
id: '@jupyter-notebook/application-extension:top',
483483
requires: [INotebookShell, ITranslator],
484-
optional: [ISettingRegistry],
484+
optional: [ISettingRegistry, ICommandPalette],
485485
activate: (
486486
app: JupyterFrontEnd<JupyterFrontEnd.IShell>,
487487
notebookShell: INotebookShell,
488488
translator: ITranslator,
489-
settingRegistry: ISettingRegistry | null
489+
settingRegistry: ISettingRegistry | null,
490+
palette: ICommandPalette | null
490491
) => {
491492
const trans = translator.load('notebook');
492493
const top = notebookShell.top;
@@ -527,6 +528,10 @@ const topVisibility: JupyterFrontEndPlugin<void> = {
527528
});
528529
}
529530

531+
if (palette) {
532+
palette.addItem({ command: CommandIDs.toggleTop, category: 'View' });
533+
}
534+
530535
const onChanged = (): void => {
531536
if (settingsOverride) {
532537
return;

0 commit comments

Comments
 (0)