Skip to content

rustdoc: improve source navigation display on mobile #102824

Open
@jsha

Description

@jsha

Following up on #102815 (which I think was correct since we're not currently showing the topbar).

Here's what a source page looks like on my Pixel 6a:

The Rust logo really shouldn't wrap to the previous line, and the expander for the sidebar overlaps awkwardly.

One possible fix: we should actually use the mobile topbar on source pages, like so:

This provides three things:

  • the hamburger icon could open the source sidebar, and follows the scroll just like the current > icon
  • the Rust logo provides navigation back to the doc root
  • the "lib.rs" text provides context for where the reader is currently, and also provides navigation back to the top of the page (where the search bar is)

/cc @GuillaumeGomez @notriddle

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