Skip to content

Allow to click on setting text #97317

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
May 26, 2022

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented May 23, 2022

You can test it here.

This PR allows to click on the text alongside the toggle to change it.

r? @jsha

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 23, 2022
@rust-highfive
Copy link
Contributor

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez,@Folyd,@jsha

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 23, 2022
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the gui-settings-text-click branch from ecb38c8 to 61d8176 Compare May 23, 2022 15:11
@GuillaumeGomez
Copy link
Member Author

Fixed the eslint error.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the gui-settings-text-click branch from 61d8176 to 39bdb04 Compare May 23, 2022 20:05
@jsha
Copy link
Contributor

jsha commented May 23, 2022

The correct way to do this is not with an onclick handler, it's by putting the text inside a <label> element: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the gui-settings-text-click branch from 39bdb04 to c8075f5 Compare May 23, 2022 22:07
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the gui-settings-text-click branch from c8075f5 to f4f14f6 Compare May 24, 2022 13:42
@GuillaumeGomez GuillaumeGomez added A-rustdoc-ui Area: Rustdoc UI (generated HTML) A-rustdoc-js Area: Rustdoc's JS front-end labels May 24, 2022
@GuillaumeGomez
Copy link
Member Author

I was able to fix the bug and to simplify the code thanks to @jsha's comment. :)

The demo is available here.

@jsha
Copy link
Contributor

jsha commented May 25, 2022

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 25, 2022

📌 Commit f4f14f6 has been approved by jsha

@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 May 25, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request May 25, 2022
…laumeGomez

Rollup of 4 pull requests

Successful merges:

 - rust-lang#97317 (Allow to click on setting text)
 - rust-lang#97375 (Simplify implementation of `-Z gcc-ld`)
 - rust-lang#97394 (Add more eslint rules)
 - rust-lang#97407 (Update books)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 02b630f into rust-lang:master May 26, 2022
@rustbot rustbot added this to the 1.63.0 milestone May 26, 2022
@GuillaumeGomez GuillaumeGomez deleted the gui-settings-text-click branch May 26, 2022 10:50
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 26, 2022
…te, r=notriddle

Updates to browser-ui-test

I took the commits from rust-lang#97317. Since the ubuntu 22.04 version, you either need to use `--no-sandbox` or use another binary to run the GUI tests. I couldn't find out why the chromium used by `browser-ui-test` isn't working anymore on this ubuntu version.

r? `@notriddle`
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-ui Area: Rustdoc UI (generated HTML) 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