pydata / pydata-sphinx-theme

A clean, three-column Sphinx theme with Bootstrap for the PyData community
https://pydata-sphinx-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
561 stars 304 forks source link

Use myst-nb to demo ipywidgets double render bug #1765

Open gabalafou opened 2 months ago

gabalafou commented 2 months ago

This PR creates a demo of a bug (#1766). It is not meant to be merged in.

gabalafou commented 2 months ago

You can see the bug at the following preview URL: https://pydata-sphinx-theme--1765.org.readthedocs.build/en/1765/examples/pydata.html#ipywidget

gabalafou commented 2 months ago

Just noticed on that preview URL that ipyleaflet is also rendered twice

choldgraf commented 2 months ago

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?

12rambau commented 2 months ago

I guess it is but the question is how Jupyter notebook itself prevent this behaviour ?

gabalafou commented 2 months ago

Also, why is there no doubling with nbsphinx?

12rambau commented 2 months ago

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.