sphinx-panels
sphinx-panels copied to clipboard
Warn users if certain themes are being used to load bootstrap
Right now we have documentation for how users can disable bootstrap CSS from sphinx-panels. However, I've noticed several issues that users have opened where they saw problems in their UI that were a result of issues with bootstrap being loaded twice, but the users didn't realize that this was the problem (usually they just assumed it was a bug in the theme).
I worry that we are going to keep getting more false bug reports about this until we come up with a better way of warning users about this "double bootstrap loading" behavior.
A couple ideas:
- Make this more prominent in the
sphinx-panelsdocs - Add a check for if
bootstrap.jsorbootstrap.cssis already in the sphinx builder's list of CSS/JS files and throw a warning if so - Add a check for a pre-defined set of themes that we know already load bootstrap, and disable this by default if they're active.
Yep makes sense, I think just check for sphinx-book-theme or pydata-sphinx-theme and then add it, i.e. (3).
Add a check for if bootstrap.js or bootstrap.css is already in the sphinx builder's
Both these themes supply it as index.73d71520a4ca3b99cfee5594769eaaae.css
though that hash is gonna change each time a new version is released no?
the point I was making is that searching for bootstrap.css is not going to work 😉
ah yeah - good point in that case :-) damned webpack bundlers!!
so searching for a subset of theme names is probably the best bet, seems like it will knock out like 98% of the "bug" reports anyway
yeh exactly I imagine they are mainly coming from sphinx-book-theme, via jupyter-book