Skip to content
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

Warn users if certain themes are being used to load bootstrap #50

Open
choldgraf opened this issue Oct 22, 2020 · 5 comments
Open

Warn users if certain themes are being used to load bootstrap #50

choldgraf opened this issue Oct 22, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@choldgraf
Copy link
Member

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:

  1. Make this more prominent in the sphinx-panels docs
  2. Add a check for if bootstrap.js or bootstrap.css is already in the sphinx builder's list of CSS/JS files and throw a warning if so
  3. 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.
@choldgraf choldgraf added the enhancement New feature or request label Oct 22, 2020
@chrisjsewell
Copy link
Member

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

@choldgraf
Copy link
Member Author

though that hash is gonna change each time a new version is released no?

@chrisjsewell
Copy link
Member

chrisjsewell commented Oct 22, 2020

the point I was making is that searching for bootstrap.css is not going to work 😉

@choldgraf
Copy link
Member Author

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

@chrisjsewell
Copy link
Member

yeh exactly I imagine they are mainly coming from sphinx-book-theme, via jupyter-book

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants