-
-
Notifications
You must be signed in to change notification settings - Fork 130
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 JupyerLab extensions? #271
Comments
As noted in #309, ipywidgets is another important extension that we should consider. |
I started to look into this, specifically at adding Bokeh, but it is not yet obvious to me how to achieve this. So I am using this issue to brainstorm. Currently, if you open a notebook with a Bokeh plot in Spyder, it does not display the plot but a message that JavaScript is disabled in Jupyter lab. It may be possible to somehow enable JavaScript. However, the Jupyter people disabled JavaScript for security reasons and I assume their reasons are valid. It looks like enabling JavaScript means that just opening a notebook can execute arbitrary Python commands, which sounds scary. The way Bokeh works in Jupyter Lab is as an extension, which is installed with the One possibility here would be to locate the functions within the Bokeh extension that we need and call them without using Jupyter Lab's plugin framework. This should be possible but I think it will be fragile: upgrades in either Bokeh or Jupyter Lab may change the functions to use. It also needs to be repeated for every extension. Perhaps a better way is to use the whole application framework of Jupyter Lab including its plugin mechanism. Hopefully it's all flexible enough that we can still remove all the elements we don't want and only display the notebook. Users can then install the Bokeh extension (and any other extension) themselves. I think this is the option I want to explore further, but it is not a change for a minor release. |
I think extensions in JupyterLab 3.0+ can also be pure Python packages, not only npm ones that require recompiling the Lab's code. See here for some discussion about it: |
Yes, they now have what they call pre-built extension. As I understand it, installing them basically boils down to copying a prebuilt JavaScript file in the correct directory, which looks much easier. It still means that we have support Jupyter Lab's plugin mechanism, but it is another argument in favour of that approach. |
The project jupyterlab-classic looks interesting; they built an interface that looks like classic notebooks using the modern JupyterLab components, and it claims to support extensions. So it is possible. |
That looks really interesting indeed! |
We should consider to add some extra JupyterLab extensions. For instance, the ones necessary to display Bokeh or Plotly plots.
Originally posted by @ccordoba12 in #264 (comment)
The text was updated successfully, but these errors were encountered: