-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: dropdowns in userguide #24493
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
DOC: dropdowns in userguide #24493
Conversation
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.
My 2 cents:
I think that this is a clever way of providing top-level information to help others quickly scan the page without being over-loaded. There's always a trade-off between "hiding things behind a click" and "showing so much that it's overwhelming", and this seems like a reasonable balance between the two. It also somehow feels a bit more polished to me because of the UI elements instead of lists of raw links. I think it's worth trying and seeing what kind of feedback readers give
I totally agree that the current index is way too much information. Towards that, this is a significant improvement. However, I'm not a fan of using dropdowns here, because you have to click a lot to know where you may want to be going. I'd rather shorten the list of targets. One may or may not still have visual grouping or panels or whatever to make the GUI look nicer. Shortening: For a number of the sections, we don't need to reference the subsections on the overview page. For example, linking Installation is enough. We don't need all the subsection links. They anyway go to the same page, which has the TOC in the sidebar. It's better to just click Fancy GUI: For example for the "Tutorials and examples" section, I suggest three clickable cards in a row (https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/web-components.html#cards). |
Tim your suggestions are great but at that point this page is then just recreating the docs landing page and then the question is does more of this stuff need to get pushed there and then this page can go away? Which like I wouldn't disagree with either...but while this page exists some of my reasoning for including the level 2 TOC is so folks can browse through them and see if the installation page is really what they want. |
I think the User Guide Page is a bit of a misnomer, but that aside, I prefer the information content unfolded as it currently is. I think it's unattractive, but it's pretty easy to skim for the correct information, whereas folding hides a lot of content. A multicolumn layout or some such would be fine, but I think the more fundamental issue is the awkward match between the rst docs and the tutorials/gallery; much of what is in the tutorials would more logically be called part of a Users Guide. |
I have the opposite problem - I find it really overwhelming and like being able to unfold as I go. But maybe grids + styling the cards so they look more like accordions? I'm trying that, might be a bit cause the icons are annoying. |
FWIW I think that moving the tutorials to use sphinx-gallery was a mistake -- s-g works well for short examples, but the "tutorials" are (should be?) first and foremost text, with some code interspersed, for which the plot directive works just fine (especially with download icons, per #24205 (comment)); moving back to plain rst should simplify better organization. |
Either way, I think this is too big to backport. I am sympathetic to both the pro and con to switching to the foldable things. Can we start all the folds open? That way if people just want to skim they can and there is an easy way to hide things that you have already looked to reduce the noise? |
Yes but I think this actually looks pretty good/less a lot than I thought it would be: ETA: I put this view in the second commit. I can't quite sort out the .css to remove all the styling though. |
So decided to shuffle a bit b/c I think it focuses things a bit and kinda ties into Anthony's point that our tutorials/narrative docs boundary isn't as clean as the divio structure: I am not at all sure about the section titles but these are more or less the ones currently there. I'd possibly even get rid of them since they don't show up in the sidebar since they're card titles. |
Mostly it just looks really odd in autogenerated table of contents (xref matplotlib#24493)/
Obviously a taste thing, but I usually resent drilling down webpages to find things. I think we can use styling or better bullets etc to make the page less overwhelming. |
On my computer there's almost no white space, but I'll tweak drop downs to be open by default and maybe styled plain and then I'll post that screenshot. |
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.
Semi off-topic: This page claims to be the user guide but is actually more a table of contents of the whole page. This is currently by design, but is a mismatch between claimed and actual content (see also #21251 (comment)).
I think the visual change here is an improvement, but I feel this is not the final solution.
########### | ||
Users guide | ||
########### | ||
.. grid-item-card:: Information |
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.
Can you leave the card out and replace it with a regular title? I feel the double nesting of cards and dropdowns is a bit much.
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.
Let me try regular grid instead of card?
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.
ok, so regular grid is worse cause the responsiveness of cards is better but it might be fixable w/ styling.
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.
ok so responsiveness has nothing to do w/ cards just w/ grid but I have a hacked together thing going here
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.
Yeah totally agree, and I think the real solution is some combination of information architecture and something in line w/ what @anntzer and @jklymak are saying about how our tutorial/guide boundaries are fuzzy and I think could be consolidated/unified, but I think that's maybe a good GSOD proposal if there are RFPs in February. I wouldn't mind this not being in the navigation bar or renaming the link to 8?th commit is cards + dropdowns, but styled so it's kind of invisible/looks like the toc-tree: I am very much not a fan of the user guide page title here but couldn't figure out how to get the html title working. Also, removing the title adds back the left sidebar |
The problem with the screenshot above is that the title of the subsection has a smaller font (though demi-bold) than topics below them. That makes it pretty hard to parse and looks like a mistake. |
I think there is plenty of room for the heading font size to be larger. But certainly you should not have the heading font size smaller than its content. |
Ok, so this is just everything is one size up Hmm, I think w/ an indent, size becomes good enough to not need the grid top: (which @timhoffm I can't figure out how to do) Edit: Also while not 100% accurate, "Information, Explanation, Reference" might be good enough? |
Ok so @timhoffm I did figure out the border but probably in the hackiest way and I'm cool w/ commits against this that tweak styles more. |
I can have a look, though I’m not a CSS expert either. But likely not before the weekend. This is not necessarily a blocker. We can always fine-tune in a follow-up PR. |
doc/_static/mpl.css
Outdated
padding: 0; | ||
} | ||
|
||
:root { |
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.
The rest of the file seems to have been duplicated from above.
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.
🤦♀️ yeah I uh accidentally edited the build/html and hastly c&pd it here. Thanks! Also do these changes even go in this file or somewhere else? I also feel like I should learn IDs 'cause this is gonna globally style drop downs, or cross that bridge in a follow up?
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.
If you expect to use dropdowns elsewhere (or we already have some), then it would be best to add another class on these ones (an ID must be unique, so you'd have to add a bunch here.)
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.
I think that the only other places we currently have drop downs is the nav-toc which is not flagged as a drop down/classed separately, and the version switcher which is also its own thing.
But I guess a list of IDs #id1, ... #id2 isn't that bad - would I still need the exact class? So like would I be stuck doing #id1.li>toc or does it broadcast?
Sorry- how do I turn this into a class? I'm happy to bundle all the css info one thing that could then pass back to sphinx - I tried using the drop-down container class option and couldn't get it working.
Eta: I also opened an issue on pydata-sphinx about making it it's own directive and I wonder if that's the best way to do it?
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.
It seems simpler to me to just add a single class to every dropdown here and to the CSS selector rather than come up with unique IDs to use for every dropdown and repeat the CSS selector for each one.
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.
That definitely sounds more reasonable, I just don't know enough css to know how & I couldn't get the class-container option on drop-downs to work - I think i should have been able to remove shadows that way.
Since this has kind of run away, @melissawm and @noatamir what suggestions do you have about organizing this information? Particularly do these categories make sense, a different taxonomy? Also please help me name things if you have suggestions. |
Explanations | ||
------------ | ||
|
||
API Documentation |
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.
I think this is a confusing change as the difference between "API Reference" and "API Documentation" is very small in my reading.
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.
Is there something more narrow/specific than explanations but less specific than API documentation?
What is the current state of this PR? |
Oops sorry I had lost this ping! Let me respond below. |
@tacaswell not sure which of the 6 options (if any) folks are leaning towards & if this is enough of a UX improvement to be worth going in, and I probably should pull the styling into its own class. |
The concrete question is do we try to get this in for 3.7 or push this out to 3.8? |
@tacaswell let's put it on the call? I'm fine w/ pushing this out to 3.8/scrapping it in favor of a better UX suggestion, but if it doesn't seem like that's gonna happen in the next couple of release cycles than I can try and wrap this one up this weekend if we've decided on styles and names. |
So talked w/ @melissawm offline and thinking an alternative proposal is to use the cards/grid to make a holistic TOC of sorts and keep the level two trees underneath so that folks can skim for holistic or all the things. |
Mostly it just looks really odd in autogenerated table of contents (xref matplotlib#24493)/
At this point, would make more sense to open a new PR with some of the distilled ideas. |
PR Summary
wrapped most of the 2nd level menus in the user guide in dropdowns:

My reasoning was that this page kind of didn't seem to have enough content to be a site map but had too much to be easily scannable as an index, so I think the drop downs may provide a way to scan for the content folks might want. I mostly kept the titles from each page, except
Explanations->Guide to Matplotlib
'cause those docs seem like the closest to a narrative user guide.ETA: also did not touch the ordering except to add a link to the third-party-page 'cause I can never find it and that's honestly why I touched this page in the first place.
ETA2: Circle Link