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

Controls and search in Rustdoc header are visually distracting #59840

Open
5 of 8 tasks
lambda opened this issue Apr 10, 2019 · 2 comments
Open
5 of 8 tasks

Controls and search in Rustdoc header are visually distracting #59840

lambda opened this issue Apr 10, 2019 · 2 comments
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@lambda
Copy link
Contributor

lambda commented Apr 10, 2019

This is being broken out of #59829 to provide smaller, actionable items that can be independently discussed and worked on.

A visual inspection of the Rustdoc design reveals that there are a lot of distracting design elements, which can be especially problematic for people with dyslexia or attention disorders.

One of the first encountered is the header containing the search bar and controls. It is visually larger than the main heading of the page, it contains several high contrast icons and controls which also have additional bounding boxes, the whole thing presents a non-rectangular shape making it stand out more, and the search box contains a fairly verbose set of instructions.

Screenshot of Rustdoc search header with issues listed in previous paragraph highlighted

I have a few suggestions to improve the situation; some seem like obvious improvements, some are more debatable and I'm open to other suggestions:

  • Drop the horizontal rule, or make it span the full width and low contrast like the mdBook style after scrolling down Remove horizontal lines at top of page #92797
  • Drop the boxes around the icons
  • Make the icons and "All Crates" control lower contrast
  • Increase the size of the main heading of the page to be larger than the search and controls heading
  • Consider removing the "All Crates" dropdown; I am not sure it is pulling its weight. If it is useful, it could instead be an option that appears after doing a search, rather than appearing on every page. Move crate drop-down to search results page #92490
  • Consider moving theme and settings into a single menu Pick themes on settings page, not every page #92629
  • Consider simplifying text to simply say "Search" and providing help elsewhere, such as in the above single menu
  • Consider making the header span the whole width of the page, rather than appearing to be nested within the content by being inside the area delimited by the sidebar. This would be a significant change to the overall Rust docs style, but seems more consistent with the way many other sites are laid out.
@jonas-schievink jonas-schievink added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 10, 2019
@ghost
Copy link

ghost commented May 3, 2019

Why are the buttons for theme selection and doc settings part of the search box in the first place? I think they should be removed.

I'd suggest that the search box appears like this:

image

Until it is focused, in which case it should look like this:

image

The changes:

  • Removed the horizontal rule and the two buttons
  • Hidden the 'All crates' dropdown by default and placed it second to the search box
  • Reduced the font size to be less prominent but still readable
  • Used the same font and font size in the input box and the dropdown
  • Given the box more contrast when it is focused

@camelid camelid added the A-rustdoc-ui Area: Rustdoc UI (generated HTML) label Oct 24, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 5, 2022
…Gomez

Move crate drop-down to search results page

This reduces clutter on doc pages.

Part of rust-lang#59840

r? `@GuillaumeGomez`

Demo: https://rustdoc.crud.net/jsha/crates-in-results/std/index.html?search=str
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 6, 2022
…Gomez

Move crate drop-down to search results page

This reduces clutter on doc pages.

Part of rust-lang#59840

r? ``@GuillaumeGomez``

Demo: https://rustdoc.crud.net/jsha/crates-in-results/std/index.html?search=str
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 9, 2022
…Gomez

Move crate drop-down to search results page

This reduces clutter on doc pages.

Part of rust-lang#59840

r? ```@GuillaumeGomez```

Demo: https://rustdoc.crud.net/jsha/crates-in-results/std/index.html?search=str
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 18, 2022
…uillaumeGomez

Pick themes on settings page, not every page

This hides the paintbrush icon on most pages by default, in preference for the settings on the settings page.  When loading from a local file, and not in mobile view, continue to show the theme picker. That's because some browsers limit access to localStorage from file:/// URLs, so choosing a theme from settings.html doesn't take effect.

Fixes rust-lang#84539
Part of rust-lang#59840

r? `@GuillaumeGomez`

Demo: https://rustdoc.crud.net/jsha/theme-picker-local-only-2/std/io/trait.Read.html
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 19, 2022
Remove horizontal lines at top of page

They are not needed to separate the search bar and the title, which are visually distinct on their own.

Part of rust-lang#59840

Demo: https://rustdoc.crud.net/jsha/fewer-lines/std/string/struct.String.html

r? `@GuillaumeGomez`
@lolbinarycat
Copy link
Contributor

triage: some progress has been made, edited the checklist accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants