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

Migrate sidebar links color to CSS variables and unify themes with ayu #102237

Merged
merged 2 commits into from
Oct 1, 2022

Conversation

GuillaumeGomez
Copy link
Member

Part of #98460.

This PR does two things:

  1. Migrate more theme CSS rules toward CSS variables.
  2. Remove a.current specific colors depending on the kind of the item behind the link. The ayu theme was already doing it this way and I think it makes much more sense like this.

You can test it here by hovering other module's items in the sidebar (or check the selector a.current).

cc @jsha
r? @notriddle

@GuillaumeGomez GuillaumeGomez added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: Rustdoc UI (generated HTML) labels Sep 24, 2022
@rustbot
Copy link
Collaborator

rustbot commented Sep 24, 2022

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

A change occurred in the Ayu theme.

cc @Cldfire

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 24, 2022
Copy link
Contributor

@notriddle notriddle left a comment

Choose a reason for hiding this comment

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

The code changes look fine to me, but I’d like confirmation from @jsha before going ahead with the appearance changes.

@bors
Copy link
Contributor

bors commented Sep 27, 2022

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

@jsha
Copy link
Contributor

jsha commented Sep 30, 2022

The appearance change sounds good / looks good to me. 👍🏻

@notriddle
Copy link
Contributor

Awesome!

Fix the merge conflict, then r=me

@notriddle
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 30, 2022

📌 Commit 461c316 has been approved by notriddle

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 Sep 30, 2022
@bors
Copy link
Contributor

bors commented Oct 1, 2022

⌛ Testing commit 461c316 with merge 277bb66...

@bors
Copy link
Contributor

bors commented Oct 1, 2022

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 277bb66 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 1, 2022
@bors bors merged commit 277bb66 into rust-lang:master Oct 1, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 1, 2022
@GuillaumeGomez GuillaumeGomez deleted the sidebar-links-color branch October 1, 2022 10:53
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (277bb66): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.4% [1.2%, 1.6%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
2.7% [2.7%, 2.7%] 1
Regressions ❌
(secondary)
3.9% [1.3%, 6.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.7% [2.7%, 2.7%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
2.8% [2.0%, 3.6%] 2
Regressions ❌
(secondary)
3.7% [3.2%, 4.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.8% [2.0%, 3.6%] 2

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 4, 2022
…earch-result, r=notriddle,jsha

Migrate CSS theme for search results

Part of rust-lang#98460.

Just like rust-lang#102237, I unified theme to how the `ayu` handles this one: only one color for the background when search results are focused or hovered.

You can test it [here](https://rustdoc.crud.net/imperio/migrate-css-theme-search-result/lib2/index.html?search=coo).

cc `@jsha`
r? `@notriddle`

PS: The repetition in GUI tests is getting out of hand so I opened GuillaumeGomez/browser-UI-test#363 to think about adding possibility to declare functions so we can greatly improve this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-cleanup Category: PRs that clean code up or issues documenting cleanup. merged-by-bors This PR was explicitly merged by bors. 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.

7 participants