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: use checkbox instead of switch for settings toggles #104267

Merged
merged 2 commits into from
Nov 12, 2022

Conversation

notriddle
Copy link
Contributor

Preview: http://notriddle.com/notriddle-rustdoc-demos/checkbox/test_dingus/index.html

Before

image

After

image

Description

The switch ("slider") is designed to give the application a "physical" feel, but nothing else in here really followed through. They didn't support the "flick" gesture that real iOS switches support, and the radio buttons that were also used in Rustdoc Settings were a more "classic" form element anyway.

Also, while switches are the exclusive toggle design on iOS (since Apple HIG reserves checkboxes for Mac only), the Google Material guidelines say that lists of switches are bad, and you should just use check boxes.

The switch is designed to give the application a "physical" feel, but
nothing else in here really followed through. They didn't support the
"flick" gesture that real iOS switches support, and the radio
buttons that were also used in Rustdoc Settings were a more "classic"
form element anyway.

Also, while "switches" are the exclusive toggle design on iOS (since
[Apple HIG] reserves checkboxes for Mac only), the [Google Material]
guidelines say that lists of switches are bad, and you should just use
check boxes.

[Apple HIG]: https://developer.apple.com/design/human-interface-guidelines/components/selection-and-input/toggles
[Google Material]: https://m3.material.io/components/checkbox/guidelines#6902f23d-ceba-4b19-ae3b-b78b9b01d185
@rustbot
Copy link
Collaborator

rustbot commented Nov 11, 2022

r? @GuillaumeGomez

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 11, 2022
@rustbot
Copy link
Collaborator

rustbot commented Nov 11, 2022

Some changes occurred in HTML/CSS themes.

cc @GuillaumeGomez

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

A change occurred in the Ayu theme.

cc @Cldfire

@GuillaumeGomez
Copy link
Member

Thanks for this! Can you add a GUI test to check the color of the border (hover, no hover) and the color of the background (selected, not selected) please?

@notriddle
Copy link
Contributor Author

@GuillaumeGomez Okay, that's done.

@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 11, 2022

📌 Commit 269dad2 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 11, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 12, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#102049 (Add the `#[derive_const]` attribute)
 - rust-lang#103970 (Unhide unknown spans)
 - rust-lang#104206 (Remove `save_and_restore_in_snapshot_flag`, use `ObligationCtxt` more)
 - rust-lang#104214 (Emit error in `collecting_trait_impl_trait_tys` on mismatched signatures)
 - rust-lang#104267 (rustdoc: use checkbox instead of switch for settings toggles)
 - rust-lang#104302 (Update cargo)
 - rust-lang#104303 (UI tests can be assigned to T-compiler)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 28af6ca into rust-lang:master Nov 12, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 12, 2022
@notriddle notriddle deleted the notriddle/checkbox branch November 12, 2022 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants