rust-lang / rust-lang/docs.rs

Changing menu bar on mobile

Open
#1,120 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-frontend A-rustdoc-css C-enhancement
Dominant language
Rust
Stars
1.2k
Forks
232
Avg merge
11h 35m
Merged PRs (30d)
60

Description

Related to #1103, #1104, #1096.

We've been talking about ways to make menus behave nicely across both desktop and mobile, where the desktop version uses click-to-open, and the mobile version uses links that take you to a separate page with equivalent functionality to the menu. It's definitely doable, but I wanted to step back and see if we want to change the mobile menus more dramatically.

docsrs-mobile

As you can see above, we have a bit of a confusing two-menu system. There's the docs.rs top menu, and the rustdoc hamburger menu. I know it's hard to reach into the internals of rustdoc from docs.rs, but it would be great to combine them! Then we could put all of the extra options behind the hamburger menu, where there's enough room to give them labels so people know what they do.

On a similar note, I was thinking about "what are the most important and common things people want to do" and "what pieces of context are most important."

For "what context is important," I think the main thing that people need to know if they in the middle of a docs.rs page is

  • what is the name of this package
  • what struct/trait/function's page am I on
  • if this is not the current version, I'd like an alert icon

For "what actions that might be in a menu are important," I think it's:

  • See what methods / fields are available on this item (already covered in Rustdoc's hamburger menu)
  • Go to the documentation root for the crate (already covered, by the rust icon / project icon)
  • Go to the repository
  • Go to the crates.io page OR the equivalent on docs.rs.
  • Select a different version (though this could be done from the docs.rs crate page).
  • Go to the homepage of docs.rs.

Anyhow, lemme know if you find the idea appealing, and we can brainstorm ways to do it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reviewing the docs.rs top menu and rustdoc hamburger menu on mobile, then define a combined navigation design covering the listed context and actions; done means the mobile menus provide a clear, unified way to reach those functions.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend, mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.