AaronWatters / jp_proxy_widget

Generic Jupyter/IPython widget implementation that will support many types of javascript libraries and interactions.
BSD 2-Clause "Simplified" License
61 stars 13 forks source link

Opening a jp_proxy_widget in a separate JupyterLab window #12

Open psychemedia opened 3 years ago

psychemedia commented 3 years ago

It would be really useful to be able to open a jp_proxy_widget in a new JupyterLab output window. This would provide a simple mechanism for then creating JupyterLab apps running in their own window as simple jp_proxy_widget wrapped Javascript applications.

Related issue: https://github.com/jupyterlab/jupyterlab/issues/3692

I had wondered in the past if `jupyterlab-sidecar' might offer an alternative route (or suggest some plumbing that would allow a widget to be opened directly in a new output window) but it appears to be a stale project?

AaronWatters commented 3 years ago

Yes, I think this would be nice for any complex widget. Maybe suggest or ask about it with the ipywidgets implementors? I actually was under the impression that this was possible already (but I haven't actually seen it).

psychemedia commented 3 years ago

Just revisiting JupyterLab again again (I can't really keep up with its version changes), and jp_proxy_widget seems not to work in any of the MyBinder environment's I've tried, raising a "model can't be found" message if I try to load run even the code in simple hello-word demo notebook.

Just me or has JupyterLab updates broken things in JupyterLab context again?

AaronWatters commented 3 years ago

sorry. This was my fault. I merged a pull request too quickly without checking all the test cases.

https://github.com/AaronWatters/jp_proxy_widget/commit/65159b870a62e01009e0fa14dc8bf8029e089168

That should fix the problem. Please let me know if it doesn't or if you see other issues. Thanks!

psychemedia commented 3 years ago

I just ran the repo in MyBinder and still get the issue?

image

AaronWatters commented 3 years ago

&^%$

I think I fixed it.

I had to bump a version number in package.json.

I wish they'd stop doing this.... it happens about once every 6 months....

Please verify that it fixes it for you too. I will leave the pull request commented for now (even though it is probably innocent).

https://github.com/AaronWatters/jp_proxy_widget/commit/e93b2644d5b8ea8e8319cea46ecc67a4106265a4

psychemedia commented 3 years ago

Seems to work fine now from a Binderised version of your repo, but not from sidecar Binder? And sidecar which I did have working in some Binderised environment somewhere today is now not working...

I have wasted so much time going nowhere trying to do anything ever in JupyterLab ;-)

I am going to park trying to get my widgets working in JupyterLab for another 3 months again, I think! JupyterLab seems to continue to be a really brittle dependency hell environment. And the install JupyterLab rebuilds still take forever.... I hate it, hate it, hate it!;-)

psychemedia commented 3 years ago

I need to start revisiting this idea again (running a jp_proxy_widget js app in a "torn off" or separate window or sidecar widget. Do you have or know of any widgets that demo this working?

psychemedia commented 2 years ago

Just as a placeholder, I note that at some point in the past, sidecar and jp_proxy_widget did play nice for a period and you could display a jp_proxy_widget wrapped widget in a sidecar panel: https://blog.ouseful.info/2021/09/22/getting-nbev3devsim-running-in-jupyterlab/

I'm not sure what happened if you tried to open sidecar panels in separate notebooks in the same JupyterLab view, each rendering a jp_proxy_widget? I guess there may have been an id conflict?