Gathering design feedback, from a CPython documentation build with Lutra #31
Replies: 22 comments 15 replies
-
Please don't feel obliged to go through this with a fine-tooth comb, but I certainly won't complain if someone does! Just know that it's 4am where I am right now so... I'll respond after quite some time. :) |
Beta Was this translation helpful? Give feedback.
-
And, python/docs-community#1 is where I've posted asking for feedback on this build. |
Beta Was this translation helpful? Give feedback.
-
"Navigation design (how the sidebar changes" : to me, the loss of within-page navigation in the sidebar (Table of Contents) is a big loss. I've looked at several standard library modules. The longer ones with lots of complexity really benefit from this, IMO - it's far less important to be able to navigate to someplace completely different in the docs - it's a single click to go someplace that has that (e.g. using the breadcrumbs at the top), if I need it. Appearance-wise, dark themes always take a lot to get right (for which reason I generally hate them, but that's not feedback for here!). If you look at pathlib (https://pradyunsg-cpython-lutra-testing.readthedocs.io/en/latest/library/pathlib.html) the arrows in the diagram are gone, probably still black. |
Beta Was this translation helpful? Give feedback.
-
Do you have specific links? There's an "On this page" section on nearly every page, which will have the same content as the "Table of Contents" in docs.python.org today. For example, the left sidebar in https://docs.python.org/3/library/pathlib.html is the same as the right sidebar in https://pradyunsg-cpython-lutra-testing.readthedocs.io/en/latest/library/pathlib.html. I feel like I might be misunderstanding you, so if you could provide more context on what you mean by "loss of within-page navigation in the sidebar", I'd appreciate that. :)
Yea, certain pages/diagrams will need separate images for dark mode and light mode. That's a good catch -- I'll keep that in mind. Out of curiosity, did you notice that there's a button to toggle between the dark mode and light mode? (No is a valid answer -- that'll flag to me that it's not sufficiently accessible/visible). |
Beta Was this translation helpful? Give feedback.
-
No, you're right... the contents links are on the right side. I freely admit that i didn't look over there any more after seeing a prominent ad, figuring that sidebar was being taken up by whatever was being inserted there by the host of the temporary site you were posting on. Lazy me.
No - is that the moon symbol that's up in the corner now I look? And the answer seems to be yes, it is. |
Beta Was this translation helpful? Give feedback.
-
Ah! I don't see the Read the Docs ads due to pi-hole, so I didn't even realise it was getting injected there. Thanks for flagging that -- I'll look into changing where the ad gets injected and how to make it not-a-block-of-white in dark mode. :) |
Beta Was this translation helpful? Give feedback.
-
That reminds me, I need to rebuild my Pi, I had that wonderful tool running too; apparently the sd card has be worn out and it won't boot. (yes, now OT, sorry) |
Beta Was this translation helpful? Give feedback.
-
High-level comments/suggestions
Specific rendering issues
Responses
For funsies, you could tweak the text to read "This page intentionally left blank" :D
In the PEPs we handle with with adding a specific
Perhaps you could host on GH pages, which doesn't inject ads (and at least IMO, previews and deploys a lot faster than RTD, and is easily portable between any CI backend? |
Beta Was this translation helpful? Give feedback.
-
Yup, need to add that. I am looking for alternatives to gumshoe for scroll-spying, to see if I can use something else. |
Beta Was this translation helpful? Give feedback.
-
Indeed. I think it's reasonable to drop the
That's true, and a fair point! It's also simpler to implement it that way. :)
Duly noted! I borrowed that style of collapse buttons from docasuarus, which... now that I'm looking, actually removes the scrollbar entirely. I'll have to think about what to do here now.
I'm gonna say that we should remove those, if we switch to a theme with a three-column layout with the toc in the sidebar. It'll be redundant and does not add any value.
Well, I've been exploring them already. I've got 6 of them implemented -- I just don't want to distract with them, for now. :)
Smart. I'll gonna permanently borrow that.
Good to know. I was leaning similarly, but wasn't sure if that was a result of me having looked at this too long, or if this approach was actually suboptiomal. You've convinced me that it's suboptiomal -- thank you!
I could -- but then it'll be on pradyunsg.me, which I didn't want to put it on. I could put it in pradyun.github.io but it's significantly easier to change where the ad shows up on the page. Besides, there's a lot of deployed-on-RTD documentation sites, and this is an excuse for me to figure out how to get those rendering properly with their injections. :) |
Beta Was this translation helpful? Give feedback.
-
Not sure if its what you're looking for, but the PyData Sphinx Theme which ours is based off of uses Bootstrap's scrollspy.
In fact, IMO it should be dropped from both toctrees, since there isn't a clear purpose behind the ordered numbers (there isn't an inherent strict order of the sections)
That was my thinking as well; should be a matter of find and replace any
That's mostly oriented not toward you and more toward avoiding inevitable bikeshedding over this delaying the implementation of the theme for the Python docs site :)
See python/peps/2409 for the implementation, but its basically as simple as a custom CSS class added to the relevant images with
It might make sense if the search was "as you type", but its not (not sure how easy/performant that would even be to implement in Sphinx), though it would still be a tradeoff that would have to be considered. |
Beta Was this translation helpful? Give feedback.
-
There are only around 10 contents directives, mostly in howtos and FAQ documents. Other notes about the new TOC sidebar:
|
Beta Was this translation helpful? Give feedback.
-
There is mechanism to have the contents directive to be "exempted". The message on pages with that content states as much.
Yup, this isn't implemented yet. IIRC, I need to add the button to present the drawer that contains this -- the reason this stalled was because I wasn't sure if I want to make the left sidebar more aware (like mkdocs-material) or just add a right sidebar for this (like Furo).
Ooooh! Nice catch. I have overlay scrollbars, so it's unlikely I'd have seen this. I remember doing something hacky for this in Furo -- I'll have to go back and look. :) |
Beta Was this translation helpful? Give feedback.
-
I don’t think I understand what you’re saying. In case it wasn’t clear, what I was saying is: for pages with contents directive, don’t add the right sidebar. |
Beta Was this translation helpful? Give feedback.
-
Ah, I definitely misunderstood you. I think that's a bad idea, but I'm not going to be blocking people who'd want to do that though -- it's possible already via a per-file metadata attribute (:no-toc: at top of file) |
Beta Was this translation helpful? Give feedback.
-
I can't seem to repro this on FF 97 on Windows, where I have overlay scrollbars, but given they are an still somewhat unstandardized and unevenly implemented feature across browsers and platforms, I imagine they are handled differently on your browser/platform. After testing them on the PEPs repo on various users and platforms, I ended up reverting to standard scrollbars for now to ensure consistent, reliable behavior across browsers and OSes. It doesn't look nearly as good, but it avoided several issues we ran in to (I don't have the details OTTOMH).
Just to clarify, I didn't review responsiveness at smaller screen widths in the above set of comments, to avoid making my comment even longer and more nitpicky especially if that wasn't all ready yet, but I can do another pass when that's ready @pradyunsg
There's an argument to be made for including the ToC near the top in these cases (at least in the FAQs) for the reasons you mentioned, albeit at the cost of requiring more scrolling to get to the actual content (though for something like an FAQ, this isn't so much of an issue). However, I'm not sure there's a strong reason to hide the right sidebar completely; that would leave the user no way of easily knowing where they are in the document, and no way of quickly navigating through it, which would be a regression on the current docs which do still display the document contents in the sidebar in addition to the ToC at the top. |
Beta Was this translation helpful? Give feedback.
-
Small issue, the "navigations hide button", blocked by bread crumb section when scrolling; |
Beta Was this translation helpful? Give feedback.
-
OK, for folks who might be disoriented -- I've moved this to a discussion, under the discussions tab, because that's what this is! |
Beta Was this translation helpful? Give feedback.
-
https://pradyunsg-cpython-lutra-testing.readthedocs.io/en/latest/ has been updated to the current I should be able to manually trigger re-runs as well as rebase the project. To make things easier for future me:
|
Beta Was this translation helpful? Give feedback.
-
The navigation hiding button doesn't quite work for me, with an unusual browser window width: |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
There's discussion about pressing the forward slash So I tested Furo and Lutra. Furo looks fine (as used for the devguide). Lutra doesn't have a search box on normal pages, just a magnifying glass that links to a search page. For example, https://pradyunsg.me/lutra/ has: Pressing On the search page, if you click elsewhere, pressing Should it have some handling for normal pages? Perhaps pressing |
Beta Was this translation helpful? Give feedback.
-
I've deployed a build of CPython documentation built with Lutra. The index page is empty for now -- we can add back the content there later. The changes needed were not very invasive: python/cpython@main...pradyunsg:migrate-to-lutra
Based on a quick skim, it looks like Lutra has most of the things needed to build CPython's docs. To be clear, that does not mean it's complete -- there's quite a few more things needed here (version/language selectors, footer, mobile left sidebar contents etc). I might have also missed some piece of content, which might mean that it's stylised poorly.
I'd like to get feedback on mainly three fronts:
Lutra has additional navigation designs (i.e. tabs, different way of managing subsections), but I want to hear what folks think about the current navigation design. The other designs would require changes to CPython's
Doc/contents.rst
(if this design doesn't fly, we can try those!).General feedback is also welcome. Please poke sticks at this and let me know where it breaks!
Beta Was this translation helpful? Give feedback.
All reactions