executablebooks / sphinx-book-theme

A clean book theme for scientific explanations and documentation with Sphinx
https://sphinx-book-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
439 stars 201 forks source link

Latest pydata theme release seems to have breaking impact on sphinx data theme UI #836

Closed fervand1 closed 5 months ago

fervand1 commented 5 months ago

Describe the bug

Toggle Primary sidebar is not working anymore

Expected: Toggle button to work like before

Reproduce the bug

Steps:

  1. Setup a sphinx book theme docs
  2. Click toggle primary sidebar button
  3. Toggle won't work

Expected: Toggle sidebar button works

List your environment

No response

welcome[bot] commented 5 months ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

fervand1 commented 5 months ago

Note: If I downgrade to pydata theme to <0.15.3 the UI seems to works fine again

calebqcook commented 5 months ago

I've been wracking my brain over this for days until I thought to check if this was a bug... I have this same issue, also reproducible from a clean sphinx-book-theme project.

Note: If I downgrade to pydata theme to <0.30.0 the UI seems to works fine again

How can I do this in my setup?

fervand1 commented 5 months ago

@calebqcook I added a wrong version earlier. pip install pydata-sphinx-theme<0.15.3 that will fix the issue. The latest version that is 0.15.3 causes a break. Note this is a base theme over which sphinx book theme has been developed

bjlittle commented 5 months ago

@calebqcook You'll need to quote the package specification so that (I assume you're using a Linux distro) the < isn't interpreted as a file redirection operator by the shell.

So on the command line try:

pip install 'pydata-sphinx-theme<0.15.3'

HTH

tuncbkose commented 5 months ago

I don't know how exactly pydata-sphinx-theme affects this, but looking at the browser console when I have the same problem, I see an error that indicates jQuery not being present. This change happened in sphinx==6.0.0 (some note on it here) and at least at times whenever I can replicate this error, downgrading to sphinx<6 solved it for me. Presumably sphinxcontrib.jquery would also solve it, though a built-in fix would be nicer.

parmentelat commented 5 months ago

@tuncbkose imho and following the findings in pydata/pydata-sphinx-theme#1875, I would say the message related to jQuery is a red herring plus, the release date of sphinx 6.0.0 also seems too old to be linked to the issue

in any case I can confirm that in my setup too, pinning pydata-sphinx-theme to <0.15.3 fixes the problem