-
Notifications
You must be signed in to change notification settings - Fork 329
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
Make the whole left sidebar scrollable #502
Conversation
Looking at the preview, the vertical scrollbar does appear when expanding all the subsections in the demo site for example but a horizontal one appears now in all pages which should not be the case. This did not happen in the couple local tests I did which I am not realizing all have the searchbar on the navbar, not on the sidebar, so it probably has to do with some bad interactions/clashes between the searchbar template and the nav scrollable section added here to englobe it. |
good catch - I think you could delete: pydata-sphinx-theme/src/scss/index.scss Lines 199 to 202 in 540c9eb
along with #500 (comment) and then this would remove that second sidebar...does that work? |
14cafa0
to
8f65432
Compare
Working like a charm locally, thanks for the help! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM - thanks for this improvement!
I think this change might have broken the "center/remember scrolling position in the sidebar" feature (not fully sure to be clear, I didn't actually bisect exactly, but this seems the only related commit since the last release). To see the issue, you can compare https://pydata-sphinx-theme.readthedocs.io/en/latest/demo/subpages/subsubpages/subsubpage18.html (latest docs of master) vs https://pydata-sphinx-theme.readthedocs.io/en/stable/demo/subpages/subsubpages/subsubpage18.html (docs of last release). In the second case, it puts the active item in the navigation "in sight", while on master it falls off the page. |
FYI that feature was added in #363, so this is done by some javascript code: pydata-sphinx-theme/src/js/index.js Lines 40 to 73 in 71bd290
It might be a matter of updating the div id that is used to determine the scrolling position (as it is now the parent div that scrolls) |
Ah i bet you are right! Because the thing that is scrolling is no longer just the toc div, but the whole sidebar div. I bet the selector for the"remember position" stuff is selecting for the toc div |
Tried to fix #500. It seems to be working based on a couple local tests,
but all I know about html and css I have learned from looking at sphinx/jekyll
templates and themes, so I am wildly unaware of extra unintended consequences
that might come with the change.
I have also tried to read the contributing section but haven't been able to
figure out if I have to write tests nor in case I do how should I go about
that. Guidance will be very appreciated.