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

rustdoc: make [-] invisible in most cases #85372

Open
jsha opened this issue May 16, 2021 · 1 comment
Open

rustdoc: make [-] invisible in most cases #85372

jsha opened this issue May 16, 2021 · 1 comment
Labels
A-rustdoc-js Area: Rustdoc's front-end A-rustdoc-ui Area: rustdoc UI (generated HTML) C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jsha
Copy link
Contributor

jsha commented May 16, 2021

The toggles ([-] / [+]) on rustdoc pages are needed for a couple of reasons:

  • Some sections are closed by default and need a [+] to open them.
  • Some sections are open by default, but can be default-closed by a setting. Those need a [+] to open them.
  • The user might close all sections with the "collapse all docs" button. Those need a [+] to open them.

Note that these all involve the [+], not the [-]. But we show lots of [-] all over the page, which is visually distracting. In theory these allow users to collapse a single section at a time, but I don't think that's very useful.

I propose that we make [-] invisible. With one exception: If someone has opened a section with [+], it would be confusing and frustrating to not be able to close that section again. So, when someone clicks a [+], we would added a "perma-visible" class to that <summary> tag, which would cause the [-] to be visible.

cc @GuillaumeGomez

@jsha jsha added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. A-rustdoc-ui Area: rustdoc UI (generated HTML) A-rustdoc-js Area: Rustdoc's front-end labels May 16, 2021
@GuillaumeGomez
Copy link
Member

I'm a bit lost from the explanation. I'll wait for a demo to fully understand what you're suggestion. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-js Area: Rustdoc's front-end A-rustdoc-ui Area: rustdoc UI (generated HTML) C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants