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

Add an example about replacing a core plugin #156

Open
jtpio opened this issue Apr 23, 2021 · 3 comments
Open

Add an example about replacing a core plugin #156

jtpio opened this issue Apr 23, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@jtpio
Copy link
Member

jtpio commented Apr 23, 2021

Problem

In some cases, extension authors want to replace some of the default JupyterLab components with their own.

There are already some details about this in the docs: https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html#disabledextensions

But it would be nice to have a concrete example here to illustrate that too.

Proposed Solution

Maybe that example could be about replacing the Jupyter logo in the top left corner by something else:

image

Since the logo is added as a plugin here:

https://github.com/jupyterlab/jupyterlab/blob/d6c3857ac6ff27811f49fd63fcd529b763024f1f/packages/application-extension/src/index.tsx#L956-L972

Additional context

Originally discussed in jupyterlab/jupyterlab#10137

@jtpio
Copy link
Member Author

jtpio commented May 19, 2021

An example with the jlab-enhanced-launcher third-party extension replacing @jupyterlab/launcher-extension:

https://github.com/jupyterlab-contrib/jlab-enhanced-launcher/blob/49eeb7e0e0458fabbaa6197b3e673bec6c0e20ac/package.json#L83-L85

@echarles
Copy link
Member

This would deactivate a complete extension, not a plugin within that extension, which is what we need. Is my understanding correct?

@fcollonval
Copy link
Member

This would deactivate a complete extension, not a plugin within that extension, which is what we need. Is my understanding correct?

Indeed to deactivate only one plugin the string to set as disabledextensions should be '@jupyterlab/launcher-extension:plugin'

In the specific case of the launcher, this does not make any difference as the extension package is only providing one plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants