Skip to content

Fix some category colors and add magenta#4347

Merged
julienw merged 8 commits into
firefox-devtools:mainfrom
julienw:fix-colors
Dec 1, 2022
Merged

Fix some category colors and add magenta#4347
julienw merged 8 commits into
firefox-devtools:mainfrom
julienw:fix-colors

Conversation

@julienw

@julienw julienw commented Nov 28, 2022

Copy link
Copy Markdown
Contributor

This makes the following changes (each in its own commit):

The order for these commits isn't the most logical, I think the reorder should have come earlier, but reording the commit would yield some conflicts and I admit I didn't want to resolve them. I think it's still OK.

Tell me what you think!

Production
deploy preview

As a reminder, the CSS colors are used in the tooltips and the call tree, while the colors from colors.js are used in the activity graph as well as the flame graph and the stack chart.

@codecov

codecov Bot commented Nov 28, 2022

Copy link
Copy Markdown

Codecov Report

Base: 88.38% // Head: 88.37% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (5746290) compared to base (f373214).
Patch coverage: 50.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4347      +/-   ##
==========================================
- Coverage   88.38%   88.37%   -0.02%     
==========================================
  Files         282      282              
  Lines       25310    25314       +4     
  Branches     6823     6826       +3     
==========================================
+ Hits        22370    22371       +1     
- Misses       2728     2731       +3     
  Partials      212      212              
Impacted Files Coverage Δ
src/utils/colors.js 81.52% <50.00%> (-2.57%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@julienw julienw requested a review from canova November 28, 2022 18:25
Comment thread res/css/categories.css Outdated
--category-color-brown: var(--orange-70);
--category-color-magenta: var(--magenta-60);

/* it is hard to create a lighter version of the following colors */

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this distinction was also implemented as part of #4193, for an initial version of the patch, but in the end it wasn't used. What do you think about removing the comment and merging them in the same list?

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.

Yeah, it sounds good to me.

@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 good to me, thanks for working on it.
It will take me some time to get used to the new shade of gray color of "other" category 😄

Comment thread src/utils/colors.js
selectedTextColor: '#fff',
gravity: 7,
};
case 'magenta':

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.

Yey, magenta! ✨

Comment thread src/utils/colors.js Outdated
selectedFillStyle: MAGENTA_60,
unselectedFillStyle: MAGENTA_60 + '60',
selectedTextColor: '#fff',
gravity: 7,

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.

Should we keep 7 for the gravity here? I think we can also put it to the further back, but don't have a strong opinion on it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So, I thought about this, and realized I have no idea :D I believe some of the existing gravities are quite bad but didn't want to change them all. That's where my thinking about moving away the gravity value into the category information in the profile metadata came from too... it seems a bad design decision that the gravity is tied to colors rather than categories... So I decided to... leave it.
I'm happy to put a bigger value if you think it's better!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I used 8 and increased all the ones below.

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.

Works for me!

Comment thread res/css/categories.css Outdated
--category-color-brown: var(--orange-70);
--category-color-magenta: var(--magenta-60);

/* it is hard to create a lighter version of the following colors */

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.

Yeah, it sounds good to me.

@julienw julienw merged commit 42bf5ff into firefox-devtools:main Dec 1, 2022
@julienw

julienw commented Dec 1, 2022

Copy link
Copy Markdown
Contributor Author

It will take me some time to get used to the new shade of gray color of "other" category smile

Let's pay attention to feedback too; in case it's too dark we can always adjust more in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants