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

Allow disabling of extensions #3078

Merged
merged 12 commits into from Oct 12, 2017
Merged

Conversation

@afshin
Copy link
Member

@afshin afshin commented Oct 9, 2017

There are two fields in the page_config.json file that can allow control of which plugins load:

  1. disabledExtensions for extensions that should not load at all.
  2. deferredExtensions for extensions that do not load until they are required by something, irrespective of whether they set autostart to true.

The values for each are an array of strings.

  • If an identical string match occurs between a config value and a package name (e.g., "@jupyterlab/apputils-extension"), then the entire package is disabled (or deferred).
  • If the string value is compiled as a regular expression and tests positive against a package name (e.g., "disabledExtensions": ["@jupyterlab/apputils*$"]), then the entire package is disabled (or deferred).
  • If an identical string match occurs between a config value and an individual plugin ID within a larger package (e.g., "disabledExtensions": ["@jupyterlab/apputils-extension:settings"]), then that specific plugin is disabled (or deferred). CC: @ivanov @ellisonbg
  • If the string value is compiled as a regular expression and tests positive against an individual plugin ID within a larger package (e.g., "disabledExtensions": ["^@jupyterlab/apputils-extension:set.*$"]), then that specific plugin is disabled (or deferred).

Backward-incompatible API change

The MIME renderer extension interface no longer has a name field. Instead, it has an id field that follows the same semantic conventions as our other plugins. So for example, the name field of the Vega renderer has changed from name: 'vega' to id: '@jupyterlab/vega2-extension:factory'

@afshin afshin force-pushed the disabled-extensions branch from d1f7d3b to 10d6148 Oct 11, 2017
@blink1073 blink1073 added this to the 0.28 milestone Oct 11, 2017
@blink1073
Copy link
Member

@blink1073 blink1073 commented Oct 12, 2017

cc @gnestor, re: API change to mime extensions

@blink1073
Copy link
Member

@blink1073 blink1073 commented Oct 12, 2017

cc @lucbouchard1. In the next release you'd be able to replace extensions without manually removing them from the exports. Also, see #2936 which provides a script to validate and extract schemas and themes from extensions.

@blink1073
Copy link
Member

@blink1073 blink1073 commented Oct 12, 2017

cc @ivanov ^^

@blink1073
Copy link
Member

@blink1073 blink1073 commented Oct 12, 2017

Nice, thanks!

@blink1073 blink1073 merged commit a494821 into jupyterlab:master Oct 12, 2017
2 checks passed
@blink1073 blink1073 mentioned this pull request Oct 12, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants