How do I hide the statusbar through an extension

If I use

app.commands.execute('statusbar:toggle');

it will prompt

 Command 'statusbar:toggle' not registered.

this command seems been registered in the @ jupyterlab/statusbar extension , is this because of the loading order of extensions?
Is there any other way to implement it,or how to remove an item from the statusbar

Likely. You should add a dependency on statusbar token in your plugin, this way your plugin will be only loaded after the statusbar plugin was loaded.

how to remove an item from the statusbar

Which item specifically?

1 Like

How exactly should this be done? I couldn’t find any relevant description in the JupyterLab documentation.

I see, I need to add it to the ‘requires’

1 Like

or optional in case if your extension does not strictly require statusbar (so that it can load when statusbar plugin is disabled).

2 Likes