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
I have a few small proposals to reduce the visual clutter of rustdoc pages:
Move all toggle buttons to the right. Benefits: consistency (sometimes they are already on the right), and moves element clutter to a part of the page that doesn't have the reader's initial focus.
Similarly, move the ⓘ link to the right.
On the following doc bits remove toggles completely and show docs unconditionally:
Item description
Enum variant
Struct and trait method descriptions (methods directly on the item, not foreign)
"Smart" disclosure of short declarations. If a declaration is at most a few lines long, show it unconditionally with no toggle. Ditto attributes in declarations. Long declarations like Iterator retain their current undisclosed behavior.
... alternately: always show ~4 lines and truncate beyond that with ...
On mobile: be a bit more extreme in clutter reduction and remove completely any toggles that default to open.
On mobile: for blocks that do have a closed toggle, do not wrap the exposed heading, instead truncate with "..." before the toggle. I think declarations tend to have enough information leftward to make this work well, but I haven't tried it yet. It might be a horrible idea in practice.
Quick 'n Dirty mockups just to give the gist:
The size and indentation of the toggles as they are implemented today do give some ambient hints about the hierarchy of the page, so I'd also want to tweak spacing & sizing a bit to better emphasize hierarchy. You can see in the mock (where I haven't tweaked spacing yet) that the pub fn line looks very similar in priority to the impl Vec line, which is probably not desirable.
Bonus Objectives:
A better icon for ⓘ that more closely indicates what it is.
Remove or tweak ⓘ where it doesn't seem to add value. e.g. nearly every method on Vec: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.new . I'm pretty ignorant about this feature. Maybe I'll come around on it once I understand it better.
If this gets positive reception, I can build a demo of these changes.
The text was updated successfully, but these errors were encountered:
One more tweak proposal: Change the text "fields omitted" to either "private fields omitted" or nothing at all in order to distinguish between the "These are private" case and the "We're hiding these for decluttering" case. Until just now I thought that text was for decluttering.
Centril
added
the
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
label
Dec 28, 2018
I have a few small proposals to reduce the visual clutter of rustdoc pages:
...
Quick 'n Dirty mockups just to give the gist:
The size and indentation of the toggles as they are implemented today do give some ambient hints about the hierarchy of the page, so I'd also want to tweak spacing & sizing a bit to better emphasize hierarchy. You can see in the mock (where I haven't tweaked spacing yet) that the
pub fn
line looks very similar in priority to theimpl Vec
line, which is probably not desirable.Bonus Objectives:
If this gets positive reception, I can build a demo of these changes.
The text was updated successfully, but these errors were encountered: