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

Use more descriptive CSS variable names (#135) #147

Merged
merged 4 commits into from
Jan 17, 2018
Merged

Use more descriptive CSS variable names (#135) #147

merged 4 commits into from
Jan 17, 2018

Conversation

natemurthy
Copy link
Contributor

@natemurthy natemurthy commented Jan 12, 2018

@franziskagoltz For #135 is this what you were suggesting?

Signed-off-by: Nathan Murthy <drip.dr0p.dr0p@gmail.com>
@siggy siggy added this to the 0.1.2 milestone Jan 12, 2018
@rmars
Copy link

rmars commented Jan 13, 2018

Hey @natemurthy thanks for this PR 🎉

I think the intention of the ticket was to decouple the names of the colors from their use in various components. So for example, messageblue could be renamed royalblue, and then we'd use that in styles.css:

--royalblue: #2F80ED;
--pictonblue: #56CCF2;
--latency-p99: var(--royalblue);
--latency-p50: var(--pictonblue);

This would make things more readable, for example in line-graph.css, we currently have:

.flash {
   fill: var(--latency-p50);

This references a latency color, but this "flash" has nothing to do with latency. It would perhaps be less confusing if it were to use:

.flash {
   fill: var(--pictonblue);

@rmars rmars added the area/web label Jan 13, 2018
Signed-off-by: Nathan Murthy <drip.dr0p.dr0p@gmail.com>
@natemurthy
Copy link
Contributor Author

natemurthy commented Jan 13, 2018

@rmars Have a look at b072a55. Are there other var names you'd want to change? Also do you know of a good online table for mapping hex values to color names? (I saw you pointed out http://chir.ag/projects/name-that-color/)

@rmars
Copy link

rmars commented Jan 13, 2018

hey @natemurthy thanks for the speedy updates!

Ah yes! Forgot to mention in my comment above, I updated the ticket (#135) with a color tool we could use (http://chir.ag/projects/name-that-color/#56CCF2).

I think ideally all the color variables in the :root section could be standardized like this, for example --bad-red is not the best of names :)

taking a look at b072a55 now!

Signed-off-by: Nathan Murthy <drip.dr0p.dr0p@gmail.com>
@natemurthy
Copy link
Contributor Author

@rmars Here are the other var renamings 0151936

--warmgrey: #f6f6f6;
--coldgrey: #c9c9c9;
--latency-p99: var(--messageblue);
Copy link

Choose a reason for hiding this comment

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

I think we should leave the --latency-pXX vars defined since we have multiple places that will want to be referencing the same color (for example the latency p50 summary and the latency p50 chart line should be the same color, and I think it's fine for that to be named --latency-p50), but the base variables can reference the new named blues:

  --curiousblue: #2D9CDB;
  --royalblue: #2F80ED;
  --pictonblue: #56CCF2;
  --latency-p99: var(--royalblue);
  --latency-p95: var(--curiousblue);
  --latency-p50: var(--pictonblue);

Then in line-graph.css we can use fill: var(--pictonblue); in line 26 (as you've done!) but leave lines 13-22 to reference the original --latency-pXX variables.

Copy link

@rmars rmars left a comment

Choose a reason for hiding this comment

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

awesome, thanks for taking on this cleanup!
we should make sure all references to the renamed colors reflect the new name.

@@ -2,18 +2,17 @@

:root {
--white: #fff;
--buttonblue: #4076c4;
--messageblue: #2F80ED;
--indigoblue: #4076c4;
Copy link

Choose a reason for hiding this comment

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

it appears we no longer use this blue anywhere. I'd be in favor of removing it.

--buttonblue: #4076c4;
--messageblue: #2F80ED;
--indigoblue: #4076c4;
--royalblue: #2F80ED;
Copy link

Choose a reason for hiding this comment

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

there are some more references to messageblue in this file as well as service-mesh.css that should be updated to this new color

--latency-p99: var(--messageblue);
--latency-p95: #2D9CDB;
--latency-p50: #56CCF2;
--subheader-grey: #828282;
Copy link

Choose a reason for hiding this comment

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

there are some more references to --subheader-grey in the codebase that should also be updated

--latency-p95: #2D9CDB;
--latency-p50: #56CCF2;
--subheader-grey: #828282;
--status-gray: #BDBDBD;
Copy link

Choose a reason for hiding this comment

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

there are some more references to this var in the codebase that should also be updated

Signed-off-by: Nathan Murthy <drip.dr0p.dr0p@gmail.com>
@natemurthy
Copy link
Contributor Author

natemurthy commented Jan 13, 2018

@rmars I think this covers all those other references I missed 629c7e7 Tell me if you spot anything else :)

@wmorgan
Copy link
Member

wmorgan commented Jan 13, 2018

Just wanted to say it's nice to see you here, @natemurthy!

@rmars
Copy link

rmars commented Jan 16, 2018

hey @natemurthy thanks for the update! I think my comment in #147 (comment) got missed because it showed up in between your commits. if you address that, I think this branch is good to go!

@siggy siggy added the review/ready Issue has a reviewable PR label Jan 16, 2018
Copy link

@rmars rmars left a comment

Choose a reason for hiding this comment

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

✍️ 💥 shipit! thanks for the cleanup!

in the interest of making it into this release, I'll make a follow up branch to address the comment.

Copy link
Contributor

@franziskagoltz franziskagoltz left a comment

Choose a reason for hiding this comment

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

looks good to me 🎉 (with @rmars follow-up branch to come addressing the last outstanding comment)

Thank you for contributing to conduit @natemurthy!!

@rmars rmars merged commit 84d8fa6 into linkerd:master Jan 17, 2018
@rmars rmars removed the review/ready Issue has a reviewable PR label Jan 17, 2018
rmars pushed a commit that referenced this pull request Jan 17, 2018
rmars pushed a commit that referenced this pull request Jan 17, 2018
Signed-off-by: Risha Mars <mars@buoyant.io>
rmars pushed a commit that referenced this pull request Jan 17, 2018
Signed-off-by: Risha Mars <mars@buoyant.io>
khappucino pushed a commit to Nordstrom/linkerd2 that referenced this pull request Mar 5, 2019
Route labels are not queryable by tap, nor are they exposed to in tap
events.

This change uses the newly-added fields in linkerd/linkerd2-proxy-api#17
to make Tap route-aware.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants