classification
Title: Can doc index of html version be separately scrollable?
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.4, Python 3.3, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder: Wide literals in the table of contents overflow in documentation
View: 4711
Assigned To: ezio.melotti Nosy List: ezio.melotti, georg.brandl, orsenthil, terry.reedy
Priority: normal Keywords: easy, patch

Created on 2009-01-16 23:30 by terry.reedy, last changed 2013-05-01 12:02 by ezio.melotti.

Files
File name Uploaded Description Edit
issue4965.diff ezio.melotti, 2012-11-04 23:31
Messages (8)
msg79986 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2009-01-16 23:30
In the Windows help version of the docs that come with the Windows .msi
installer, the index pane to the left scrolls separately from the
content pane to the right.  Very nice for jumping around even to other docs.

In the html versions at docs.python.org, there is one scroll bar and the
index disappears when one moves very far down the page.  If sensibly
possible, decoupling index and context would be nice.  Please pardon my
ignorance if not.
msg80437 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2009-01-24 06:56
Terry, I think you mean the Sidebar content, right? 
Yes, I agree with you. It would be desirable to have the Sidebar
Fixed, while we scroll the document (Like this:
http://www.w3.org/Style/CSS/) 

This has to be worked out in the Sphnix CSS.
msg81302 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-02-06 21:53
I've experimented with a style variant that keeps the sidebar fixed on
the left side, however I did not manage to get it to show a separate
scrollbar.  Maybe I was just stupid though.
msg81306 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2009-02-06 22:08
Something like this maybe?

div.sphinxsidebar {
    float: left;
    width: 230px;
    height: 100%;
    font-size: 90%
    /* add these: */
    margin-top: 30px;
    height: 100%;
    overflow: auto;
    position: fixed;
}

...

div.related {
    background-color: #133f52;
    color: #fff;
    width: 100%;
    line-height: 30px;
    font-size: 90%;
    /* add this: */
    position: fixed;
}

I tested it only with Firefox3 and the Webdeveloper plugin and it looks
ok. "position: fixed" doesn't work on IE6 and there could be other
problems, but it may be a good starting point.
msg89966 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2009-07-01 09:03
See also #3143.
I'll try to do a proper patch to fix this issue.
msg89971 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2009-07-01 10:20
"overflow: auto" should fix #4711 too (adding an horizontal scroll bar
at the bottom of the sidebar).
msg174843 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-11-04 23:31
The attached patch makes the sidebar fixed and adds a scrollbar to scroll it separately when it's longer than the page.

To test the patch without rebuilding all the Docs you can do something like:
hg import --no-c <url-of-the-patch>
cp Doc/tools/sphinxext/static/basic.css Doc/build/html/_static/basic.css
firefox Doc/build/html/library/multiprocessing.html

Since the sidebar doesn't start at the top of the page because there's the header first, when the main page is scrolled down, some empty space is left over the sidebar.  I think this can't be fixed with css alone (unless some major changes are done to the layout), it could be fixed with js or the header could use position:fixed too.
msg175230 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-11-09 12:39
In the root of the clone, with the doc already built in Doc/build (no need to rebuild it), do:
hg import --no-c http://bugs.python.org/file27887/issue4965.diff
cp Doc/tools/sphinxext/static/basic.css Doc/build/html/_static/basic.css
firefox file://`pwd`/Doc/build/html/library/multiprocessing.html
History
Date User Action Args
2013-05-01 12:02:36ezio.melottisetversions: + Python 3.4, - Python 3.2
2013-01-22 12:44:49ezio.melottisetkeywords: + easy
stage: patch review
versions: - Python 3.1
2012-11-09 12:39:12ezio.melottisetmessages: + msg175230
2012-11-04 23:31:54ezio.melottisetfiles: + issue4965.diff
keywords: + patch
messages: + msg174843
2011-03-09 02:26:36terry.reedysetversions: + Python 3.3
2010-08-07 18:36:28terry.reedysetversions: - Python 2.6
2010-07-10 22:59:45terry.reedysetversions: + Python 3.2, - Python 3.0
2009-07-01 11:55:12ezio.melottisetpriority: normal
assignee: georg.brandl -> ezio.melotti
2009-07-01 10:20:12ezio.melottisetassignee: ezio.melotti -> georg.brandl
superseder: Wide literals in the table of contents overflow in documentation
messages: + msg89971
stage: needs patch -> (no value)
2009-07-01 09:03:39ezio.melottisetassignee: georg.brandl -> ezio.melotti
messages: + msg89966
stage: needs patch
2009-02-06 22:08:26ezio.melottisetnosy: + ezio.melotti
messages: + msg81306
2009-02-06 21:53:43georg.brandlsetmessages: + msg81302
2009-01-24 06:56:04orsenthilsetnosy: + orsenthil
messages: + msg80437
2009-01-16 23:30:32terry.reedycreate