Skip to content
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

A new package.json stanza for replacing plugins (jupyterlab.replacePlugins?) #15651

Open
krassowski opened this issue Jan 17, 2024 · 0 comments

Comments

@krassowski
Copy link
Member

krassowski commented Jan 17, 2024

Problem

Native JupyterLab plugins can be disabled by extensions using jupyterlab.disabledExtensions key in package.json . However, if an extension is composed of multiple plugins and a plugin X (which replaces the native plugin Y) gets disabled there is not easy way to re-enable the native plugin Y (an extension author must then create another plugin Z which checks if X is disabled and if it is then replicate the behaviour of native Y).

Proposed Solution

We could have allow objects within disabledExtensions:

{
  "jupyterlab": {
     "disabledExtensions": [
        // short form
        "@org/core-extension:plugin-a",
        // proposed long form
        {"disable": "@org/core-extension:plugin-b", "ifEnabled": "@org/external-extension:plugin-a"}
    ]
  }
}

or we could add a new dedicated stanza:

{
  "jupyterlab": {
     "replacesPlugins": {
        "@org/core-extension:plugin-b": "@org/external-extension:plugin-a"
      }
  }
}

Additional context

This affected jupyterlab-lsp as reported in #15649

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants