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: sidebar usability improvements #98772

Closed
wants to merge 5 commits into from

Commits on Jul 1, 2022

  1. Improve scroll locking in the rustdoc sidebars

    This commit ports the scroll locking behavior from the source sidebar to the
    regular sidebar, and also fixes some bad behavior where opening a "mobile"
    sidebar, and growing the viewport so that the "desktop" mode without scroll
    locking is activated, could potentially leave the page stuck.
    notriddle committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    9d78242 View commit details
    Browse the repository at this point in the history
  2. Improve click behavior of the source code mobile full-screen "sidebar"

    On desktop, if you open the source code sidebar, it stays open even when you
    move from page to page. It used to do the same thing on mobile, but I think
    that's stupid. Since the file list fills the entire screen on mobile, and you
    can't really do anything with the currently selected file other than dismiss
    the "sidebar" to look at it, it's safe to assume that anybody who clicks a
    file in that list probably wants the list to go away so they can see it.
    notriddle committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    f7c6061 View commit details
    Browse the repository at this point in the history
  3. rustdoc: use <details> tag for the source code sidebar

    This fixes the extremely poor accessibility of the old system, making it
    possible to navigate the sidebar by keyboard, and also implicitly gives the
    sidebar items the correct ARIA roles.
    notriddle committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    3073109 View commit details
    Browse the repository at this point in the history
  4. rustdoc: make source sidebar toggle a real button

    This fixes tab focus, so that you can open and close the sidebar
    from keyboard.
    notriddle committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    6ca314e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5594341 View commit details
    Browse the repository at this point in the history