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

feat(timings): support dark color scheme in HTML output #14588

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

ahaoboy
Copy link
Contributor

@ahaoboy ahaoboy commented Sep 24, 2024

What does this PR try to resolve?

Use CSS variables to control colors in different modes

Fixes #14586

How should we test and review this PR?

Switch to dark mode to preview cargo-timing.html file

Additional information

I am not an expert in CSS. The color table is generated by gpt. Maybe there are other better color schemes.

Snipaste_2024-09-24_19-36-14 Snipaste_2024-09-24_19-36-50

@rustbot
Copy link
Collaborator

rustbot commented Sep 24, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @epage (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added A-timings Area: timings S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 24, 2024
@ahaoboy ahaoboy force-pushed the dark-mode branch 2 times, most recently from 3085ef7 to e7d305b Compare September 24, 2024 10:08
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

This is cool! Thank you for the contribution.

src/cargo/core/compiler/timings.rs Outdated Show resolved Hide resolved
src/cargo/core/compiler/timings.rs Outdated Show resolved Hide resolved
src/cargo/core/compiler/timings.rs Show resolved Hide resolved
src/cargo/core/compiler/timings.js Outdated Show resolved Hide resolved
@weihanglo weihanglo changed the title cargo-timing.html support dark mode (close: #14586) feat(timings): support dark color schme in HTML output Sep 25, 2024
@weihanglo weihanglo changed the title feat(timings): support dark color schme in HTML output feat(timings): support dark color scheme in HTML output Sep 25, 2024
@ahaoboy ahaoboy force-pushed the dark-mode branch 2 times, most recently from 365c852 to dc4e03e Compare September 26, 2024 06:20
@rustbot rustbot added the A-testing-cargo-itself Area: cargo's tests label Sep 26, 2024
@weihanglo
Copy link
Member

While this PR automatically toggles between themes without a way to switch back, @ahaoboy already has a work-in-process theme toggle support in b3f4f57. We could move on and add the toggle in a follow-up pull request.

Thanks 阿豪 for improving the HTML output

@bors r+

@bors
Copy link
Contributor

bors commented Sep 26, 2024

📌 Commit 3401cb8 has been approved by weihanglo

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 26, 2024
@bors
Copy link
Contributor

bors commented Sep 26, 2024

⌛ Testing commit 3401cb8 with merge 9d66d13...

@bors
Copy link
Contributor

bors commented Sep 26, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 9d66d13 to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Sep 26, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 9d66d13 to master...

@bors bors merged commit 9d66d13 into rust-lang:master Sep 26, 2024
22 checks passed
@bors
Copy link
Contributor

bors commented Sep 26, 2024

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 28, 2024
Update cargo

19 commits in eaee77dc1584be45949b75e4c4c9a841605e3a4b..80d82ca22abbee5fb7b51fa1abeb1ae34e99e88a
2024-09-19 21:10:23 +0000 to 2024-09-27 17:56:01 +0000
- Update cc to 1.1.22 (rust-lang/cargo#14607)
- feat: lockfile path implies --locked on cargo install (rust-lang/cargo#14556)
- feat(toml): Add `autolib` (rust-lang/cargo#14591)
- fix: correct error count for `cargo check --message-format json` (rust-lang/cargo#14598)
- test: relax panic output assertion (rust-lang/cargo#14602)
- feat(timings): support dark color scheme in HTML output (rust-lang/cargo#14588)
- feat: add CARGO_MANIFEST_PATH env variable (rust-lang/cargo#14404)
- fix(config): Don't double-warn about `$CARGO_HOME/config` (rust-lang/cargo#14579)
- fix(cargo-rustc): give trailing flags higher precedence on nightly (rust-lang/cargo#14587)
- feat: make lockfile v4 the default (rust-lang/cargo#14595)
- perf: Improve quality of completion performance traces (rust-lang/cargo#14592)
- test: Remove completion tests (rust-lang/cargo#14590)
- feat: Add support for completing `cargo update <TAB>` (rust-lang/cargo#14552)
- test: Migrate remaining with_stdout/with_stderr calls (rust-lang/cargo#14577)
- fix(resolve): Improve multi-MSRV workspaces (rust-lang/cargo#14569)
- chore: Bump MSRV to 1.81 (rust-lang/cargo#14585)
- Add a `--dry-run` flag to the `install` command (rust-lang/cargo#14280)
- fix(resolve): Don't list transitive, incompatible dependencies as available (rust-lang/cargo#14568)
- feat(complete): Upgrade clap_complete (rust-lang/cargo#14573)
@rustbot rustbot added this to the 1.83.0 milestone Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing-cargo-itself Area: cargo's tests A-timings Area: timings S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo-timing.html supports dark mode
5 participants