lonboard icon indicating copy to clipboard operation
lonboard copied to clipboard

[BUG] `lonboard` conflicts with most sphinx themes

Open keewis opened this issue 1 year ago • 2 comments

Context

In xarray-contrib/xdggs#80 I've tried to build sphinx-based documentation that includes notebooks using lonboard maps using myst-nb (but nbsphinx has the same issue).

This turns out to mess up the text styles for most of the sphinx themes (the ones I tested were sphinx_book_theme, pydata_sphinx_theme and furo).

See the PR preview for how exactly this breaks.

I'm not sure if this is an issue with lonboard / its dependencies, or with the sphinx themes, though.

Environment

  • OS: ubuntu 24.04
  • Browser: firefox 131.0.3 and chromium 130.0.6723.69
  • Lonboard Version: 0.10.3

Steps to reproduce the bug

  1. Setup environment and install the dependencies
  2. Put conf.py, index.md, and the air-traffic-control notebook from the lonboard examples (might need to adjust the notebook kernel first, though) in a directory
  3. run python -m sphinx -M html -d _build/doctrees -W --keep-going -Ea -T -n . _build/html
  4. Compare _build/html/air-traffic-control.html with the one from the example in lonboard's documentation.
index.md
# Document Title

```{toctree}
air-traffic-control
```
conf.py
extensions = ["myst_nb"]
root_doc = "index"
html_theme = "sphinx_book_theme"
Dependencies
python                    3.12.7          hc5c86c4_0_cpython    conda-forge
sphinx                    8.1.3              pyhd8ed1ab_0    conda-forge
myst-nb                   1.1.2              pyhd8ed1ab_0    conda-forge
myst-parser               4.0.0              pyhd8ed1ab_0    conda-forge
lonboard                  0.10.3             pyh5bfe37b_0    conda-forge
sphinx-book-theme         1.1.3              pyhd8ed1ab_0    conda-forge
pydata-sphinx-theme       0.15.4             pyhd8ed1ab_0    conda-forge
furo                      2024.8.6           pyhd8ed1ab_1    conda-forge

keewis avatar Oct 31 '24 15:10 keewis

This is probably similar to https://github.com/developmentseed/lonboard/issues/696, but I don't quite understand the styling interactions enough to know the root cause.

kylebarron avatar Oct 31 '24 15:10 kylebarron

well, me neither, which is why I wasn't able to investigate any further than that.

keewis avatar Oct 31 '24 16:10 keewis

should this have been closed by #740? I'm not seeing this issue anymore.

keewis avatar Sep 05 '25 08:09 keewis

I don't use sphinx so I was unable to test it, but I'll happily consider this closed.

kylebarron avatar Sep 05 '25 11:09 kylebarron