Skip to content

rustdoc: Make expand all / collapse all ephemeral #84318

Closed
@jsha

Description

@jsha

Each rustdoc page has a [+] icon in the top right, which can be used to expand all / collapse all docs:

It also has a series of toggles along the left edge, to expand and collapse specific sections:

And a settings page to set which types of things are collapsed and expanded by default:

image

The left-hand toggles are ephemeral - they aren't remembered across page loads. The settings page settings are durable - they are remembered across page loads. Right now the [+] in the upper right is durable. That's surprising, since it looks the same as the non-durable left hand toggles, and isn't visible in the settings page. Also, it can be used via the + / - keyboard shortcuts, where it might not be as clear that someone is triggering a settings change.

I think we should change the [+] in the upper right to be ephemeral. If someone wants to durably hide all docs (or durably show all docs), the settings page settings should accomplish that.

/cc @GuillaumeGomez @jyn514

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions