You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make the sidebar in the documentation follow the section automatically #72231
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2018-08-08.02:50:23.561>created_at=<Date2016-09-09.12:22:07.781>labels= ['type-feature', 'docs']
title='Make the sidebar in the documentation follow the section automatically'updated_at=<Date2018-08-08.03:08:32.198>user='https://github.com/batiste'
It would also be good to clear up a patch a little bit: the first chunk in sidebar.js seems spurious, the '.headerlink .headerlink' selector also looks odd. The nested menu items (e.g. in os.html) seem to confuse your code and make navigation non-functional.
But thanks for the interest and writing the patch. Others may disagree with me and it may go in anyway :)
batiste commented on Sep 12, 2016
batistemannequin
MannequinAuthor
More actions
Here is a second patch which is improved in some ways:
removed the '.headerlink .headerlink'
when scrolling over the side bar the 'snappin' is disabled therefor it is rather easy to search and find the desired section or the search box
removed an error when collapsing the menu
Scrolling all the way down with a small viewport doesn't push the sidebar over the footer
batiste commented on Sep 12, 2016
batistemannequin
MannequinAuthor
More actions
Minor typo fix.
batiste commented on Sep 12, 2016
batistemannequin
MannequinAuthor
More actions
So answer to your comments SilentGhost:
I had a look at what Mozilla recommend. Their proposition of using position:sticky is interesting and probably possible for this use case but might require quite a bit of extra work. There is also the other suggestion to use something like https://lodash.com/docs/4.15.0#debounce but that would mean more jumpy animations but less computation. Also there is this http://caniuse.com/#feat=css-snappoints that would solve the issue created just before but it is not well supported yet.
All in all interesting points.
Off course I am willing to spend some time on optimization this if necessary. But before that I might want to have some kind of "approval" that my work as a chance to be used.
And I have a question for you R. David Murray. Look here for example:
What is the value of having an empty left sidebar here? Shoudn't we remove the sidebar completly if you have to scroll all the way up anyway? I don't really see the value for this sidebar in many of the long pages Python documentation offers.
I haven't looked at the patch, and don't know what R. David Murray doesn't like about how it works, but I find the Python sidebar extremely annoying because it scrolls off the top, and would rather it stayed around visible.
Uh, thanks, I guess, but it wasn't marked out of date or resolved or closed when I commented. I haven't used the GitHub issue tracker. Sigh. There should be a link here to the issue that was copied there, to make it easy and obvious?
Activity
batiste commentedon Sep 9, 2016
Hi,
Here is a small patch for the documentation that make the sidebar follow the headers while scrolling through a long page.
http://imgur.com/UsrFAti
Test on Chrome and Firefox. Seems to work like a charm.
SilentGhost commentedon Sep 9, 2016
I get the following warning in Firefox's Developer console:
This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://developer.mozilla.org/docs/Mozilla/Performance/ScrollLinkedEffects for further details and to join the discussion on related tools and features!
It would also be good to clear up a patch a little bit: the first chunk in sidebar.js seems spurious, the '.headerlink .headerlink' selector also looks odd. The nested menu items (e.g. in os.html) seem to confuse your code and make navigation non-functional.
bitdancer commentedon Sep 9, 2016
-1. I don't like sites that do this, and don't want ours to be one of them.
bitdancer commentedon Sep 9, 2016
But thanks for the interest and writing the patch. Others may disagree with me and it may go in anyway :)
batiste commentedon Sep 12, 2016
Here is a second patch which is improved in some ways:
batiste commentedon Sep 12, 2016
Minor typo fix.
batiste commentedon Sep 12, 2016
So answer to your comments SilentGhost:
I had a look at what Mozilla recommend. Their proposition of using position:sticky is interesting and probably possible for this use case but might require quite a bit of extra work. There is also the other suggestion to use something like https://lodash.com/docs/4.15.0#debounce but that would mean more jumpy animations but less computation. Also there is this http://caniuse.com/#feat=css-snappoints that would solve the issue created just before but it is not well supported yet.
All in all interesting points.
Off course I am willing to spend some time on optimization this if necessary. But before that I might want to have some kind of "approval" that my work as a chance to be used.
And I have a question for you R. David Murray. Look here for example:
https://docs.python.org/3/library/asyncio-protocol.html#udp-echo-server-protocol
What is the value of having an empty left sidebar here? Shoudn't we remove the sidebar completly if you have to scroll all the way up anyway? I don't really see the value for this sidebar in many of the long pages Python documentation offers.
vpython commentedon Aug 8, 2018
Nice implementation of sticky sidebar.
https://css-tricks.com/sticky-smooth-active-nav/#more-273952
I haven't looked at the patch, and don't know what R. David Murray doesn't like about how it works, but I find the Python sidebar extremely annoying because it scrolls off the top, and would rather it stayed around visible.
Mariatta commentedon Aug 8, 2018
Really sorry, but this issue is now out of date, and the patch no longer applies.
The Python documentation theme is now being tracked in https://github.com/python/python-docs-theme/
Perhaps bring up this issue there?
Thanks.
vpython commentedon Aug 8, 2018
Uh, thanks, I guess, but it wasn't marked out of date or resolved or closed when I commented. I haven't used the GitHub issue tracker. Sigh. There should be a link here to the issue that was copied there, to make it easy and obvious?
Mariatta commentedon Aug 8, 2018
You can file a new issue in https://github.com/python/python-docs-theme/ and just add a link to this issue from GitHub in the description.