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

Add keyboard handling to the theme picker menu #78584

Merged
merged 5 commits into from
Nov 5, 2020
Merged

Conversation

notriddle
Copy link
Contributor

This PR is mostly designed to bring the theme picker closer to feature parity with the menu bar from docs.rs. Though the rustdoc theme picker is technically already usable from the keyboard, it's really weird that arrow keys work on some of the menus, but not all of them, in the exact same page.

This is mostly motivated by docs.rs. It's really weird
when arrow keys work in the top dropdown menu, but don't work
in other dropdown menus on the same page.
@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

r? @GuillaumeGomez

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 30, 2020
Most of the code in mod.rs should be code that really needs to have
the list of available themes inlined into it.
@GuillaumeGomez
Copy link
Member

Tested locally and it's really great! Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Nov 4, 2020

📌 Commit 17b8ca9 has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 4, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Nov 5, 2020
Add keyboard handling to the theme picker menu

This PR is mostly designed to bring the theme picker closer to feature parity with the menu bar from docs.rs. Though the rustdoc theme picker is technically already usable from the keyboard, it's really weird that arrow keys work on some of the menus, but not all of them, in the exact same page.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Nov 5, 2020
Add keyboard handling to the theme picker menu

This PR is mostly designed to bring the theme picker closer to feature parity with the menu bar from docs.rs. Though the rustdoc theme picker is technically already usable from the keyboard, it's really weird that arrow keys work on some of the menus, but not all of them, in the exact same page.
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Nov 5, 2020
Add keyboard handling to the theme picker menu

This PR is mostly designed to bring the theme picker closer to feature parity with the menu bar from docs.rs. Though the rustdoc theme picker is technically already usable from the keyboard, it's really weird that arrow keys work on some of the menus, but not all of them, in the exact same page.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 5, 2020
Rollup of 15 pull requests

Successful merges:

 - rust-lang#76718 (Move Vec UI tests to unit tests when possible)
 - rust-lang#78093 (Clean up docs for 'as' keyword)
 - rust-lang#78425 (Move f64::NAN ui tests into `library`)
 - rust-lang#78465 (Change as_str → to_string in proc_macro::Ident::span() docs)
 - rust-lang#78584 (Add keyboard handling to the theme picker menu)
 - rust-lang#78716 (Array trait impl comment/doc fixes)
 - rust-lang#78727 ((rustdoc) fix test for trait impl display)
 - rust-lang#78733 (fix a couple of clippy warnings:)
 - rust-lang#78735 (Simplify the implementation of `get_mut` (no unsafe))
 - rust-lang#78738 (Move range in ui test to ops test in library/core)
 - rust-lang#78739 (Fix ICE on type error in async function)
 - rust-lang#78742 (make intern_const_alloc_recursive return error)
 - rust-lang#78756 (Update cargo)
 - rust-lang#78757 (Improve and clean up some intra-doc links)
 - rust-lang#78758 (Fixed typo in comment)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cbf74bc into rust-lang:master Nov 5, 2020
@rustbot rustbot added this to the 1.49.0 milestone Nov 5, 2020
@jyn514 jyn514 added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 5, 2020
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 12, 2020
…t, r=jyn514

Add shortcut for theme picker menu

Follow-up of rust-lang#78584

Just like you can focus the search input by pressing "S", you can now access the theme picker menu by pressing "T" and navigate through the options only using the keyboard.

cc `@notriddle`

r? `@jyn514`
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 12, 2020
… r=jyn514

Add shortcut for theme picker menu

Follow-up of rust-lang#78584

Just like you can focus the search input by pressing "S", you can now access the theme picker menu by pressing "T" and navigate through the options only using the keyboard.

cc `@notriddle`

r? `@jyn514`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants