jupyter-sphinx
jupyter-sphinx copied to clipboard
Widget renders intermittently
The ipyleaflet map embedded in https://stackstac.readthedocs.io/en/stable/examples/gif.html (it's right above the "Search for STAC items" heading) usually shows up the first time you open the page in a new browser, but subsequent times, usually nothing renders. If you switch to a different version (say, https://stackstac.readthedocs.io/en/v0.2.1/examples/gif.html), you might get it again once.
Maybe related to https://github.com/jupyter/jupyter-sphinx/issues/163#issuecomment-705108142?
Here's what I saw on a successful load:

And unsuccessful:

On the successful load, you can see it at least tries to load jupyter-leaflet.js from https://stackstac.readthedocs.io/en/v0.2.1/examples/jupyter-leaflet.js, which 404s (because it's not there):

But it then falls back to unpkg and succeeds:

Whereas when nothing shows up, it doesn't even try to load jupyter-leaflet.js.
Could there be some sort of race condition, maybe related to the other failures loading thebelab (or Gumshoe, or the mismatched anonymous define error), where a browser cache miss is giving a script enough time to kick off the JupyterLab load before it fails with one of these other errors? Just a wild guess.
If it helps at all, this is the notebook being rendered (uses a raw restructuredtext cell). And versions are:
jupyter-sphinx = {version = "^0.3.2", optional = true}
Sphinx = {version = "^3.5.4", optional = true}
furo = {version = "^2021.4.11-beta.34", optional = true}
ipywidgets = {version = "^7.6.3", optional = true}
Hi @gjoseph92, I am myself using jupyter-sphinx a lot with geospatial data and I never experienced what you are describing. I'm always using the pydata-sphinx-theme or the sphinx-book-theme, could you switch your documentation to the latter and let me know if the bug persists ?