-
Notifications
You must be signed in to change notification settings - Fork 947
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
Feature request: display ipywidgets in JupyterLab code console #2370
Comments
Great idea. It should be somewhat straightforward to do, since the jlab code console basically uses the notebook code, and we already have the display mechanism set up for notebooks. |
(I won't be able to do this right away. If anyone wants to work on it, comment here and we can get you started.) |
Great! I don't have a lot of JS experience so I might not work on it myself, but I appreciate it! (@bccho) |
I could really use it. I use ipywidget a lot, tend to not upload some things because they look weird. |
I am getting some traction selling skeptics of the notebook workflow on using the JLab console and/or a paired editor. But the missing interactive plots (Jupyter-matplotlib) are a deal-breaker. Your comments above, @jasongrout, make me optimistic that this might be within my grasp. I can justify some worktime hours on it. Can you aim me in the right direction? |
Hooray! I think basically following the steps for the notebook (and it may even be easier, since you don't have to render pre-existing widgets, you just need to set up a renderer for new widgets). It may be as easy as doing essentially this for the console tracker: ipywidgets/packages/jupyterlab-manager/src/plugin.ts Lines 223 to 248 in ac2032d
|
That third argument to registerWidgetManager is just what things may have already been rendered that need to be switched to the new widget manager. For a console, that could probably just be an empty list, or even better give it a default of an empty list in the registerWidgetManager function and just delete that third argument. |
You might have to fiddle with the typing for the first argument, the context, since it seems to be specific for a notebook right now, but may not need to be. |
Bumping this. As someone who recently started using Jupyter Lab and likes it a lot it would be nice to have this feature. I actually do not like Jupyter Notebook but have so far really liked Jupyter Lab. |
+1 for issue above. I generally think of JupyterLab as "all the things jupyter notebook does and more" but this issue rains on the jlab parade in a significant way. |
+1 to issue. All I really need is |
+1 for this, I was experimenting with pyvista in a console today (I usually use consoles when trying out new packages or for simple exploratory data analysis) and got the resulting “Loading widget...” message. |
Would it be possible to display ipywidgets in the JupyterLab code console? Currently, when an ipywidget is evaluated in the code console, it just prints the string representation.
The use case for this is to display interactive plotting widgets from libraries like Plotly during an iPython session (e.g. https://plot.ly/python/jupyter-lab-tools/). The widget versions of the plots are nice because they don't crash with lots of data.
(also at jupyterlab/jupyterlab/issues/6165)
Thank you for your time!
The text was updated successfully, but these errors were encountered: