Skip to content

Support colored power tracks#4760

Merged
fqueze merged 1 commit into
firefox-devtools:mainfrom
fqueze:power-track-colors
Oct 5, 2023
Merged

Support colored power tracks#4760
fqueze merged 1 commit into
firefox-devtools:mainfrom
fqueze:power-track-colors

Conversation

@fqueze

@fqueze fqueze commented Sep 27, 2023

Copy link
Copy Markdown
Contributor

Profiles with many power tracks could benefit from coloring some of them.
Example profile with colored power tracks: https://share.firefox.dev/3tcfZ5t
Deploy preview.

@fqueze fqueze requested a review from canova September 27, 2023 18:25
@codecov

codecov Bot commented Sep 27, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 35 lines in your changes are missing coverage. Please review.

Comparison is base (aa8089f) 88.32% compared to head (8da2e0a) 88.34%.
Report is 23 commits behind head on main.

❗ Current head 8da2e0a differs from pull request most recent head 7acc5c1. Consider uploading reports for the commit 7acc5c1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4760      +/-   ##
==========================================
+ Coverage   88.32%   88.34%   +0.01%     
==========================================
  Files         300      301       +1     
  Lines       26808    26811       +3     
  Branches     7241     7244       +3     
==========================================
+ Hits        23679    23687       +8     
+ Misses       2917     2911       -6     
- Partials      212      213       +1     
Files Coverage Δ
src/app-logic/constants.js 100.00% <100.00%> (ø)
src/components/timeline/TrackMemoryGraph.js 92.35% <100.00%> (ø)
src/components/timeline/TrackPowerGraph.js 89.44% <100.00%> (+0.11%) ⬆️
src/components/timeline/TrackCustomMarkerGraph.js 85.65% <66.66%> (+11.56%) ⬆️
src/components/shared/GraphColor.js 32.00% <32.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@canova canova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great, the colors really do make a difference. Also sorry for the delay on the review.

r+ with the GraphColor.js file moved to a better place, see my comment below.
I don't think it needs a re-review as it's a simple git mv with some imports changed, but let me know if you still want another look.

Comment on lines +146 to +147
ctx.strokeStyle = getStrokeColor(TRACK_MEMORY_COLOR);
ctx.fillStyle = getFillColor(TRACK_MEMORY_COLOR);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like the idea of extracting this to a shared place. But we usually put the React components to src/components/ directory. It looks like this file is a better fit for src/profile-logic directory. Could you move it there? Also we use snake case for non-component files. We can make it graph-color.

@fqueze fqueze force-pushed the power-track-colors branch from 8da2e0a to 7acc5c1 Compare October 5, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants