-
Notifications
You must be signed in to change notification settings - Fork 338
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
Use myst-nb to demo ipywidgets double render bug #1765
Conversation
You can see the bug at the following preview URL: https://pydata-sphinx-theme--1765.org.readthedocs.build/en/1765/examples/pydata.html#ipywidget |
Just noticed on that preview URL that ipyleaflet is also rendered twice |
I wonder if it's because those libraries are calling a display function directly, and then we are doubling that output by calling display ourselves in the cell's code? |
I guess it is but the question is how Jupyter notebook itself prevent this behaviour ? |
Also, why is there no doubling with nbsphinx? |
Is it also the case if you drop our theme and use the good old alabaster ? If it's the case then the issue is on myst-nb side. |
Tested this hypothesis today by replacing the call to display() like so: - "display(widgets.VBox([title, tab]))"
+ "widgets.VBox([title, tab])" The result was the same. The widget rendered twice. |
Tested this today. If we use alabaster, we do NOT see the outputs double. So it seems the issue may be with our theme and not myst-nb. |
Closing this PR because the description is out of date, plus some of the contents of the PR have already been merged to main (the ipywigets example). |
This PR creates a demo of a bug (#1766). It is not meant to be merged in.