File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/application-extension/src Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -481,12 +481,13 @@ const title: JupyterFrontEndPlugin<void> = {
481481const 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 ;
You can’t perform that action at this time.
0 commit comments