pydata / pydata-sphinx-theme

A clean, three-column Sphinx theme with Bootstrap for the PyData community
https://pydata-sphinx-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
557 stars 300 forks source link

primary toggle sidebar no longer working in 0.15.3 #1875

Closed parmentelat closed 2 weeks ago

parmentelat commented 2 weeks ago

as mentioned here https://github.com/executablebooks/jupyter-book/issues/2160 and then here https://github.com/executablebooks/sphinx-book-theme/issues/836

there is a regression in 0.15.3 about the hamburger-button known as "primary sidebar toggle", that no longer works as expected; clicking the button does not slide the left-hand-side toc pane away, as it used to do

I have spent some time trying to investigate the root cause of this problem, here are some findings that I hope might turn out helpful

in 0.15.2

as I understand it, the logic is that the button (.primary-toggle) has a for="__primary" attribute,

image

which binds the button to a hidden input field here

image

in 0.15.3

however in the broken release, the for attribute is still present

image

but the linked input seems to have been renamed into pst-primary-sidebar-checkbox

image

which breaks the link between both elements


given the apparent size of the differences between both versions, I am not comfortable with pursuing this investigation further without insights, but hopefully this can trigger ideas on how best to fix it ?

agoose77 commented 2 weeks ago

This is a breakage caused by pydata-sphinx-theme, but we (sphinx-book-theme) will need to make the changes to fix it :) I've opened a PR there (executablebooks/sphinx-book-theme#841)

parmentelat commented 2 weeks ago

oh, I see; I'd better close this one then :)