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

Check if the current application is JupyterLite #5

Open
brichet opened this issue Sep 1, 2023 · 5 comments
Open

Check if the current application is JupyterLite #5

brichet opened this issue Sep 1, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@brichet
Copy link
Collaborator

brichet commented Sep 1, 2023

The plugin should run only on Jupyterlite , to avoid conflicts with nbgitpuller if installed alongside this extension on Jupyterlab.

Problem

Check if the current application is Jupyterlite and not Jupyterlab.

Additional context

See comment #4 (comment)

@brichet brichet added the enhancement New feature or request label Sep 1, 2023
@jtpio
Copy link
Member

jtpio commented Sep 4, 2023

Or as an alternative to checking for JupyterLab or JupyterLite, maybe checking whether the nbgitpuller extension is available?

@brichet
Copy link
Collaborator Author

brichet commented Sep 4, 2023

Right.
According to you, is there a way to test a server extension from the frontend ?
The only way I can think of is to use the Rest API ?

@jtpio
Copy link
Member

jtpio commented Sep 4, 2023

Maybe making a request to one of the nbgitpuller endpoints would work?

@bollwyvl
Copy link

bollwyvl commented Sep 4, 2023

Yep, we've tried really hard to to make it hard to tell if an extension is running in lite to avoid making things that would work in Lab only work in lite.

Perhaps lite core needs a marker token in the "client" side of the app, similar to optional: [ILabShell] (useful for distinguishing between lab and notebook). As the switch to @jupyterlite/* 0.2.0 is imminent, perhaps this could be something very small, e.g. an ILiteInfo extension, which consolidated some common access patterns and contained the cooked-in version (e.g from package.json, not PageConfig strings, which can be changed, by design).

@brichet
Copy link
Collaborator Author

brichet commented Sep 4, 2023

Yep, we've tried really hard to to make it hard to tell if an extension is running in lite to avoid making things that would work in Lab only work in lite.

This is exactly what I'm trying to do 😄

In that specific case @jtpio is right, it should not run only if nbgitpuller is installed, otherwise it can run in lab.

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