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

/crate page design is confusing and inconsistent #1077

Open
jsha opened this issue Oct 7, 2020 · 6 comments
Open

/crate page design is confusing and inconsistent #1077

jsha opened this issue Oct 7, 2020 · 6 comments
Labels
A-frontend Area: Web frontend C-enhancement Category: This is a new feature

Comments

@jsha
Copy link
Contributor

jsha commented Oct 7, 2020

Steps to reproduce:

  1. Visit a crate page, like https://docs.rs/ureq/1.5.1/ureq/.
  2. Hover over the second item in the top bar, that has the crate name and version ("ureq-1.5.1").
  3. A menu pops up on hover.
  4. Click the second item in the top bar ("ureq-1.5.1").

Expected result:

Menu goes away.

Actual result:

Page navigates to a different page, https://docs.rs/crate/ureq/1.5.1.

Note that this problem is worse on touchscreen-based devices, since the user has to tap to open the menu in the first place, so they would reasonably expect that tapping in the same place would make the menu go away again.

@jyn514
Copy link
Member

jyn514 commented Oct 7, 2020

The menu taking you to a separate page is intended behavior - where else would you suggest to put the link? FWIW approximately the same information is available in the dropdown and on the new page.

It's strange that the menu opens for you on click, on my android it redirects me immediately without opening the dropdown.

@Nemo157
Copy link
Member

Nemo157 commented Oct 7, 2020

IIRC iOS Safari has special handling to support :hover elements on first click.

@jsha
Copy link
Contributor Author

jsha commented Oct 7, 2020

Yes, I should have said: The touchscreen device I tested was an iPad. On Android I see the behavior @jyn514 describes. Although actually, it flashes the menu for a moment first before navigating to the crate page.

As a user, this navigation was confusing for a few reasons. Probably the main one was that the design of the crate page is so different from the documentation page that I though I'd wound up on an older part of the site, possibly by accident.

image

image

For example, the big grey bar switches from vertical to horizontal orientation; the Rust logo goes away; The menu bar moves from left-anchored to centered; the items on the menu change; the logo on the "docs.rs" homepage link changes.

It was also confusing because the content on the crate page looked very similar to the content on the documentation page. In the case of the crate I was looking at, the top of the crate README replicates a lot of what's at the top of the documentation. I think that's probably a common pattern: crate authors want new visitors to see certain intro information whether they came to the crate page or the documentation page.

There's also a general UX problem of how menus should work on the web, which I think is in flux right now. I found this article pretty convincing that menus should generally be onclick: https://uxmovement.com/navigation/why-hover-menus-do-users-more-harm-than-good/. After reading that, I switched some sites I maintain from hover to onclick.

As far as where the link should go: Right now, the menu has a section "Links" that includes a link to the crate page on crates.io. I think it would make sense to put a link to docs.rs' crate page next to that, since they're mostly the same information from two different sources.

Thanks for looking at this! And thanks for all your work on docs.rs. It's an amazing tool, and the observations above are offered in the spirit of making it better, not criticizing.

@jyn514
Copy link
Member

jyn514 commented Oct 7, 2020

As far as where the link should go: Right now, the menu has a section "Links" that includes a link to the crate page on crates.io. I think it would make sense to put a link to docs.rs' crate page next to that, since they're mostly the same information from two different sources.

Oh hmm, that's not a bad idea. We could also make 'UREQ 1.5.0' clickable so the UI is mostly the same as before.

It was also confusing because the content on the crate page looked very similar to the content on the documentation page. In the case of the crate I was looking at, the top of the crate README replicates a lot of what's at the top of the documentation. I think that's probably a common pattern: crate authors want new visitors to see certain intro information whether they came to the crate page or the documentation page.

Right, I don't think there's much we can do about that. We've actually had feature requests to make them more similar by showing the README at the top of the rustdoc page if there are no top-level docs (probably not going to happen because it requires rustdoc support).

For example, the big grey bar switches from vertical to horizontal orientation; the Rust logo goes away; The menu bar moves from left-anchored to centered; the items on the menu change; the logo on the "docs.rs" homepage link changes.

Yeah, the design is not ideal ... this would be helped by #918 but the layout would still be different. I think a good start would be to make it left-aligned instead of centered, would you be interested in working on that? Switching the logo to be 'three boxes' on both pages would be a good change too I think. The other things need more design.

Thanks for looking at this! And thanks for all your work on docs.rs. It's an amazing tool, and the observations above are offered in the spirit of making it better, not criticizing.

❤️ ❤️ ❤️

@jyn514 jyn514 changed the title Clicking menu title changes pages /crate page design is confusing and inconsistent Oct 7, 2020
@jyn514
Copy link
Member

jyn514 commented Oct 8, 2020

The things left are

  • make 'UREQ 1.5.0' clickable
  • the big grey bar switches from vertical to horizontal orientation
  • the Rust logo goes away
  • The menu bar moves

the items on the menu change

I'm not sure what we can do about this ... the information on the pages is different. On the /crate page, it's about the crate, on the main page it's abaout the documentation. e.g. it doesn't make sense to have the platform links on /crate because those take you to documentation.

@Nemo157
Copy link
Member

Nemo157 commented Oct 8, 2020

Though, we could have the platform links on /crate in order to go directly from that page to the platform-specific documentation (currently you have to click "documentation" then choose the platform from the dropdown). I think it could be possible to have all the menu items shown on both the documentation and /crate pages (and make sure the locations of the docs.rs items stay still on the internal docs.rs pages vs documentation page).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Web frontend C-enhancement Category: This is a new feature
Projects
None yet
Development

No branches or pull requests

3 participants