-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Notebooks - HTML elements (widgets) in output overflow & get displayed under the editor #108947
Comments
We can't fix this issue completely as long as the outputs and cell input (editors) are rendered in different frames, an output renderer can use For example, on Google Colab, we can use native calendar widget without any issue (the output is rendered in an iframe, and the calendar is not being covered by anything) The way it works is
We can probably do the same thing, if an output doesn't need to access outputs' DOM elements directly. Every output can be rendered in its own iframe, and everyone of them talks to the kernel to sync widget states. Short summary:
|
Did more investigation into widget rendering in multiple different jupyter frontends, including Jupyter Lab, Notebook and Google Colab, I found that rendering floating properly is a non-trivial problem for renderers. You can easily find bugs with third party renderers in Jupyter Notebook To position a custom floating widget, there are three approaches (from easy to complex):
Approach 2 is mostly good enough but it requires us (VS Code notebook) to render output in dedicated iframe (meaning the visual viewport === output container). Approach 3 is the best but also requires more smartness in renderers. |
Closing as we have come to conclusion that there aren't any we can do to support floating DOMs if they are not native floating elements (input), we would need to contribute to the community to help polish the experience. |
In the Python extension when enabling IPyWidgets:
@rebornix /cc
The text was updated successfully, but these errors were encountered: