-
Notifications
You must be signed in to change notification settings - Fork 339
Can't find bootstrap or popper in the HTML #176
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
Comments
As far as I understand it, they are loaded in the main |
Correct. This is the webpack way of telling what to include in the final bundle. This could also be done for other type of assets, e.g. css. |
Thanks for that explanation - makes sense to me. However, it doesn't explain why we have some bootstrap functions in an earlier version of the theme, but we do not have them in a new version of the theme. Try running
Tooltips should be a bootstrap feature that relies on popper, but I believe both are in our webpack bundle, right? |
I indeed see the same difference. Running that in the browser console gives (you are running into this while writing an extension that uses javascript?) |
well specifically I use tooltips in the sphinx-book-theme, and they don't work anymore :-) |
With https://pydata-sphinx-theme.readthedocs.io/en/v0.2.1/ it still works (I enabled some older versions on readthedocs for easier comparison), so it's probably due to #167 @choldgraf would it be possible to include something small here in the demo docs that uses a tooltip? Or does it need a custom layout? |
nah it'd be easy - I think it's literally just calling |
I am able to fix this (PR coming up), but I now the following error:
After Googling, this issue seems related: sphinx-doc/sphinx#1676. |
ah so the issue there is double-loading of jQuery? |
And then they say Python packaging is a mess .. ;) |
Haha, I'm afraid this is due to a Python package ;). JQuery is loaded via Sphinx, the same way doctools.js and other Sphinx related scripts are loaded. Somehow this conflicts with the popper.js initialisation not being able to hook into this jQuery instance. It is harder then I thought to solve. Will look into this further... |
But it's still the javascript inside the python package that is the problem, not the python code! 😃
I am wondering, does the order matter here? We could ensure our js (which included popper) is loaded first, before the sphinx js? (now it is the other way around) |
I am unsure if the order is the solution. I look into this somewhat further to figure out maybe loading a different kind of module might solve this instance problem. |
This should be closed by #179 |
Maybe I am just being silly, but in the latest version of the theme I can't figure out where popperjs or bootstrapjs is actually loaded. They are there in the pandas docs, but they aren't in the pydata-sphinx-theme. Is there something clever going on that loads these in another fashion?
I realized this because I was trying to add a
tooltip
to one of my pages, but the function is not defined in the currentpydata-sphinx-theme
, while it is defined in the pandas docs.The text was updated successfully, but these errors were encountered: