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: make source sidebar toggle a real button #98774

Merged

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Jul 1, 2022

This fixes tab focus, so that you can open and close the sidebar from keyboard.

This should cause no visible change in appearance at all. The only way you'd know anything different is if you tried to use keyboard controls to open the source code file navigation sidebar.

Separated out from #98772

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jul 1, 2022
@rustbot
Copy link
Collaborator

rustbot commented Jul 1, 2022

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

Some changes occurred in HTML/CSS themes.

cc @GuillaumeGomez

A change occurred in the Ayu theme.

cc @Cldfire

@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 Jul 1, 2022
@notriddle
Copy link
Contributor Author

r? @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

Since you added the possibility to focus on the button, can you add a GUI test for it please?

@notriddle notriddle force-pushed the notriddle/source-code-sidebar-button branch from 7afc6db to 0d8974b Compare July 1, 2022 21:57
@notriddle
Copy link
Contributor Author

@GuillaumeGomez

Since you added the possibility to focus on the button, can you add a GUI test for it please?

Okay, test case added.

@bors
Copy link
Contributor

bors commented Jul 2, 2022

☔ The latest upstream changes (presumably #98781) made this pull request unmergeable. Please resolve the merge conflicts.

@GuillaumeGomez
Copy link
Member

Looks good to me, thanks! Please fix the merge conflict then I'll make a final review before approving it.

@notriddle notriddle force-pushed the notriddle/source-code-sidebar-button branch from cbdf33a to 26dccbf Compare July 2, 2022 15:45
@notriddle
Copy link
Contributor Author

@GuillaumeGomez Okay, I've rebased it.

@@ -418,7 +418,7 @@ nav.sub {
background-color: var(--sidebar-background-color);
}

#sidebar-toggle:hover {
#sidebar-toggle > button:hover:hover, #sidebar-toggle > button:focus {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:hover:hover? 😉

Copy link
Contributor Author

@notriddle notriddle Jul 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

Pushed commit to fix that.

@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 3, 2022

📌 Commit 9938d56 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 Jul 3, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 4, 2022
…askrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#98501 (rustc_passes/src/entry.rs: De-duplicate more code with `fn throw_attr_err()`)
 - rust-lang#98774 (rustdoc: make source sidebar toggle a real button)
 - rust-lang#98806 (Fix long declaration trailing whitespace)
 - rust-lang#98823 (Fix rust-call ICE in mir-inliner)
 - rust-lang#98870 (Add regression test for rust-lang#86784)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 47456ad into rust-lang:master Jul 4, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 4, 2022
@notriddle notriddle deleted the notriddle/source-code-sidebar-button branch September 21, 2023 19:27
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.

5 participants