Open ManonMarchand opened 3 months ago
Hello :wave: and thank you for proposing this! Yes, I think this would make sense to allow outputs to mark themselves as "please do not detach me". I think we had discussions about doing that with outputs that contain iframes.
That'd be awesome!
Hi Jupyter's team,
Problem
In custom anywidgets, it would be nice if we could avoid detaching the widget when it's out of view.
The issue is quite concrete in
ipyaladin
an astrophysics widget, where the size of the canvas in the widget represents what a telescope can see, and some operations can be done on the field of view or on the pixels, even when the widget is out of the view.See this gif to see the issue:
when the widget is out of view, its size changes, and the pixels are not available anymore.
Proposed Solution
I noticed that there is no issue if the cell is selected. I think this is related to https://github.com/jupyterlab/jupyterlab/pull/16006 Would it be possible to add a mechanism to remove certain output types from the list of windowed things?