New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ability to toggle status bar visibility #5990
Conversation
Thanks for making a pull request to JupyterLab! To try out this branch on binder, follow this link: |
"visible": { | ||
"type": "boolean", | ||
"title": "Status Bar Visibility", | ||
"description": "Whether to show status bar at launch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's any time, so I would delete "at launch"
@@ -46,8 +50,15 @@ export const STATUSBAR_PLUGIN_ID = '@jupyterlab/statusbar-extension:plugin'; | |||
const statusBar: JupyterFrontEndPlugin<IStatusBar> = { | |||
id: STATUSBAR_PLUGIN_ID, | |||
provides: IStatusBar, | |||
requires: [ISettingRegistry, IMainMenu, ICommandPalette], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make the menu optional, and maybe even the command palette? Like in the apputils-extension/src/index.ts
with the themesPaletteMenu extension? We're trying to make more things optional so plugins work in more contexts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mbektasbbg! This looks great, just a couple of minor comments.
activate: (app: JupyterFrontEnd, labShell: ILabShell | null) => { | ||
activate: ( | ||
app: JupyterFrontEnd, | ||
settingRegistry: ISettingRegistry, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ever since #5845 we have been trying to make the core plugins less interdependent by making a lot of these tokens optional. Can you move ISettingRegistry
, IMainMenu
, and ICommandPalette
to the optional list, and then check for them before using them in the activate
function?
@@ -59,6 +70,41 @@ const statusBar: JupyterFrontEndPlugin<IStatusBar> = { | |||
}); | |||
} | |||
|
|||
const category: string = 'Main Area'; | |||
const command: string = 'toggle-jp-main-statusbar'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our convention for command IDs has been to use something like 'plugin:action'
, so can we make this 'statusbar:toggle'
?
thanks @ian-r-rose @jasongrout . I made the changes you suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks @mbektasbbg.
Fixes #5982
settingRegistry