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

Simplify source pages sidebar handling #119016

Closed

Conversation

GuillaumeGomez
Copy link
Member

Since the text isn't really important in itself, instead of updating it manually in the JS, we can let the CSS do it instead.

r? @notriddle

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 16, 2023
@rustbot
Copy link
Collaborator

rustbot commented Dec 16, 2023

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 16, 2023
@@ -1557,20 +1577,6 @@ a.tooltip:hover::after {
#src-sidebar div.files > a.selected {
background-color: var(--src-sidebar-background-selected);
}
#src-sidebar-toggle > button {
Copy link
Member Author

Choose a reason for hiding this comment

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

I moved the block just under #src-sidebar-toggle rule as it made more sense like this.

@rust-log-analyzer

This comment has been minimized.

content: ">";
}
.src-sidebar-expanded #src-sidebar-toggle > button::before {
content: "<";
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn’t we reduce using generated content for accessibility reasons?

aa73e29

Copy link
Member Author

Choose a reason for hiding this comment

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

We absolutely did. The other possibility is to have two buttons. I'll go with this option then.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could it be switched to <details>?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes but I thought for accessibility reasons we didn't want to do that haha.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense I guess.

@GuillaumeGomez
Copy link
Member Author

Updated the JS by having two buttons instead of just one.

@bors
Copy link
Contributor

bors commented Dec 31, 2023

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

@GuillaumeGomez GuillaumeGomez deleted the simplify-src-sidebar-js branch January 22, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants