WorldWideTelescope / pywwt

Python interface to WorldWide Telescope :milky_way:
https://pywwt.readthedocs.io
BSD 3-Clause "New" or "Revised" License
51 stars 15 forks source link

Jupyter lab interface freezes after launching WWT app #330

Open mwcraig opened 2 years ago

mwcraig commented 2 years ago

When I start the WWT app in jupyter lab everything in the interface freezes when I navigate away from the tab with the WWT app. At some point the interface indicates I've tried to drag another tab. Once I complete moving that tab the interface works again.

The GIF below hopefully is clear.

Platform: macOS 11.6.5, Intel core i7

conda/mamba versions:

$ mamba --version                                                                                                (pywwt-2)
mamba 0.24.0
conda 4.13.0

Steps to reproduce:

  1. Make a fresh environment: mamba create -c conda-forge -n pywwt-2 pywwt jupyterlab=3
  2. Activate the environment: conda activate pywwt-2
  3. Install nodejs because I forgot that: mamba install nodejs
  4. Install the jupyter lab extension: jupyter labextension install --no-build @wwtelescope/jupyterlab
  5. Build jupyter lab: jupyter lab build
  6. Check that lab extensions are all installed, enabled, etc (they are): jupyter labextension list
  7. Launch jupyter lab (remaining steps are also in video)
  8. Have a notebook already open (not 100% sure this matters)
  9. Shift-cmd-C for command palette then launch the WWT app
  10. Zoom/pan a bit to make sure app works
  11. Click back to notebook tab
  12. No typing, no clicking 😞
  13. Several seconds alter, jupyter lab interface indicates it thinks I'm dragging something (see video)
  14. Drop the tab I'm apparently moving
  15. Things work again 😁

Video:

wwt-bug-small

pkgw commented 2 years ago

Thank you for the detailed report! Sorry for taking a while to follow up with it.

Unfortunately I'm not able to reproduce the behavior, and based on your description I think this would be a phenomenon that I'd be familiar with if it was something that happened with any regularity on the setups I regularly use to test. If I'm reading your GIF correctly, this is macOS/Chrome, right?

Does this behavior happen if you don't make any mouse clicks in the WWT window, i.e. no panning/zooming? I do sometimes see some similar funky behavior relating to dragging tabs in JupyterLab when WWT is active, and I have a theory that it's somehow related to propagation of mouse events out of WWT into JupyterLab. And that's the kind of thing that I think would have some platform/browser-dependent aspects, which I think must be coming into play here.