Skip to content

rustdoc: improve the summary icon #137584

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

liigo
Copy link
Contributor

@liigo liigo commented Feb 25, 2025

I changed the summary icon, from double-down-arrows to double-up-arrows, and the new icon also has a grey part that can be used to hint users 'part of docs will be hidden', or 'less docs will be shown', when clicked two arrows pointing at each other. The old icon with double-down-arrow maybe has the meaning 'show more docs' which always confused me.

old:
image

new:
image

new new:

image

@rustbot
Copy link
Collaborator

rustbot commented Feb 25, 2025

r? @GuillaumeGomez

rustbot has assigned @GuillaumeGomez.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Feb 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 25, 2025

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member

cc @notriddle

@notriddle
Copy link
Contributor

notriddle commented Feb 25, 2025

I guess this icon should be changed to have two arrows pointing at each other?

If I try to take a survey of similar applications, there's not a very strong consensus here:

  • IntelliJ and Notepad++ have expand/collapse all buttons in their directory sidebars that look like this:

    This is the only icon design I found that's used by more than one app.

  • VSCode has a collapse button in its sidebar that looks like this:

  • The sidebars in Sublime Text, GitHub's file viewer, ExDoc, MDN, MSDN, and Windows Explorer don't seem to have an options to collapse everything at once at all.

  • The "List" view in macOS Finder, the tree comments on Reddit, HN, and Lobsters, and the GitHub Actions log viewer don't have any ways to collapse/expand everything at once, either.

  • As for code folding, none of them have a toolbar button. This is the one that truly surprises me, because the option to collapse everything seems most useful if everything is expanded by default (which code viewers do).

    When I customize the toolbar in intellij to add folding buttons to it, they're meaningless placeholders (which still provides no hint for an icon that users might already be familiar with).

    Most of them have an option to fold/unfold everything in the command pallet or the menu bar. But Rustdoc doesn't have or want one of those.


Also, a tidy nit

This definitely needs fixed

tidy error: /checkout/src/librustdoc/html/static/css/rustdoc.css:2069: line longer than 100 chars

@liigo
Copy link
Contributor Author

liigo commented Feb 27, 2025

r? @notriddle

the new summary icon:

image

@rustbot rustbot assigned notriddle and unassigned GuillaumeGomez Feb 27, 2025
@rust-lang rust-lang deleted a comment from rfcbot Feb 27, 2025
@notriddle notriddle removed the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Feb 27, 2025
@notriddle
Copy link
Contributor

@rfcbot poll change the summary icon to two arrows pointing at each other

@rfcbot
Copy link
Collaborator

rfcbot commented Feb 27, 2025

Team member @notriddle has asked teams: T-rustdoc-frontend, for consensus on:

change the summary icon to two arrows pointing at each other

@notriddle
Copy link
Contributor

notriddle commented Feb 27, 2025

sorry about messing up the rfcbot

@camelid
Copy link
Member

camelid commented Feb 27, 2025

I feel like this new icon isn't really any clearer. Granted, the old one isn't so obvious either. But I'd rather not change the UI unless the new one is markedly better, since then it feels like churn.

@GuillaumeGomez
Copy link
Member

I agree with @camelid, I don't see any benefit with the new icon.

@notriddle
Copy link
Contributor

Do you think either new, proposed icon is better?

@GuillaumeGomez
Copy link
Member

For some reason I completely skipped that it was using:

image

This one I think is an improvement. Sorry about that, checking my box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants