Skip to content
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

Collapsible sidebar items #112367

Open
allan2 opened this issue Jun 6, 2023 · 3 comments
Open

Collapsible sidebar items #112367

allan2 opened this issue Jun 6, 2023 · 3 comments
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@allan2
Copy link

allan2 commented Jun 6, 2023

The sidebar can make it hard to find information if there are many enum variants or methods.

For example, a user interested in finding trait implementations for isocountry::CountryCode may look for this info in the sidebar. To do so, the user would have to tediously scroll through all of the variants and methods first.

Current
current

Proposed
proposed

Proposed changelog:

  • .sidebar-title heading moved from center to left, with left padding of 10px
  • .sidebar-links > a padding changed from 10px to 15px
  • collapsible link added to right side of .sidebar-title
  • collapsible link uses the styling of .collapse-toggle (colour of #999, typographic styling on the plus/minus character)
  • adjusted margins and vertical border (no double border) for adjacent collapsed items

\\

The collapsing UX can also be improved for the main content section, but I will put that in a separate issue.

If you like this idea for the sidebar, I'd be happy to submit a PR.

@Nemo157 Nemo157 transferred this issue from rust-lang/docs.rs Jun 6, 2023
@Nemo157 Nemo157 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: Rustdoc UI (generated HTML) labels Jun 6, 2023
@GuillaumeGomez
Copy link
Member

The bars are a step back and something we voluntarily removed a while back. I think being able to collapse sidebar sections is a good idea tough.

@allan2
Copy link
Author

allan2 commented Jun 7, 2023

What are you referring to when you say bars?

@GuillaumeGomez
Copy link
Member

"borders" around Variants, Methods, Trait Implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants