-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Allow main app plugin to work without palette #7385
Conversation
Thanks for making a pull request to JupyterLab! To try out this branch on binder, follow this link: |
So 2.0? |
I wrote it that way because I wanted to have a discussion about this 😃 |
We don't need to block on this, but this PR does need a rebase. |
@declanvk, look, auto-labels! |
4a4827d
to
c888095
Compare
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.
Thank you!
The CI integrity check failure is legit. You just need to run diff --git a/packages/console-extension/src/index.ts b/packages/console-extension/src/index.ts
index 22c14004b..655f4f8a9 100644
--- a/packages/console-extension/src/index.ts
+++ b/packages/console-extension/src/index.ts
@@ -104,7 +104,13 @@ const tracker: JupyterFrontEndPlugin<IConsoleTracker> = {
IRenderMimeRegistry,
ISettingRegistry
],
- optional: [IMainMenu, ICommandPalette, ILauncher, ILabStatus, ISessionContextDialogs],
+ optional: [
+ IMainMenu,
+ ICommandPalette,
+ ILauncher,
+ ILabStatus,
+ ISessionContextDialogs
+ ],
activate: activateConsole,
autoStart: true
};
@@ -650,7 +656,7 @@ async function activateConsole(
// Add kernel information to the application help menu.
mainMenu.helpMenu.kernelUsers.add({
tracker,
- getKernel: current => current.sessionContext.session?.kernel
+ getKernel: current => current.sessionContext.session?.kernel
} as IHelpMenu.IKernelUser<ConsolePanel>);
}
diff --git a/packages/hub-extension/src/index.ts b/packages/hub-extension/src/index.ts
index 864071c73..5c01e9944 100644
--- a/packages/hub-extension/src/index.ts
+++ b/packages/hub-extension/src/index.ts
@@ -36,7 +36,7 @@ function activateHubExtension(
app: JupyterFrontEnd,
paths: JupyterFrontEnd.IPaths,
palette: ICommandPalette | null,
- mainMenu: IMainMenu | null,
+ mainMenu: IMainMenu | null
): void {
const hubHost = paths.urls.hubHost || '';
const hubPrefix = paths.urls.hubPrefix || ''; |
Er, I just pushed those changed, never mind 😄 |
Sounds reasonable since you stole my commit hook lints back ;) |
Code changes
Changes the dependency of various plugins on the Command palette from
required
tooptional
.User-facing changes
Users can now disable the command palette without causing other core plugins to fail to activate.
Backwards-incompatible changes
Some of the plugins'
activate
function changes signature. This should probably be considered backwards incompatible, but could be considered non-breaking as well if we insist on the signature being dynamically defined by the required/optional keys.