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

[APM] Use same colors for HTTP status everywhere #47915

Merged
merged 4 commits into from
Oct 15, 2019

Conversation

smith
Copy link
Contributor

@smith smith commented Oct 10, 2019

Use the same colors on the RPM/TPM graphs as in the status code badge.

Fixes #47817.

@smith smith requested a review from a team as a code owner October 10, 2019 23:52
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@smith smith added v7.5.0 release_note:skip Skip the PR/issue when compiling release notes labels Oct 11, 2019

const httpStatusCodeColors: StringMap<string> = {
1: euiColorDarkShade,
2: euiColorSecondary,
Copy link
Member

@sorenlouv sorenlouv Oct 14, 2019

Choose a reason for hiding this comment

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

For "2xx" what do you think about using this instead of euiColorSecondary ?

import { darken } from "polished";
import { palettes } from "@elastic/eui/lib/services";
const color2xx = darken(0.2, palettes.euiPaletteForStatus.colors[0]);

Demo: https://codesandbox.io/s/http-status-colors-oxcpi

I think it works better as a "success" indicator, both in light and dark theme.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we're keen to have custom colors for HTTP status, wouldn't it be better to specifically declare them in their own variable instead of passing in the EUI colors, which might change over time. We can grab the hex colors and just create our own set, and set the 2xx to the custom color you grabbed ^

Copy link
Member

Choose a reason for hiding this comment

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

I'm good with that too. It just felt a bit more okay to extend the palette like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why are we creating our own success color? Primary is fine I guess but if you want something more consistent with the rest of the UI why aren't we using euiColorSuccess (#017d73 #017d73)?

Copy link
Member

Choose a reason for hiding this comment

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

euiColorSuccess and euiColorSecondary are more blue-teal than green. Especially in dark mode they look very alien compared to the yellow warning and red error colors we have ("successColor" is the custom color I'm suggesting)

Light:
image

Dark:
Screen Shot 2019-10-14 at 17 02 09

Copy link
Member

Choose a reason for hiding this comment

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

If we are worried about the custom color, using the default will also work:

const color2xx = palettes.euiPaletteForStatus.colors[0];

@smith
Copy link
Contributor Author

smith commented Oct 14, 2019

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

smith added 3 commits October 14, 2019 11:43
Use the same colors on the RPM/TPM graphs as in the status code badge.

Fixes elastic#47817.
@smith smith force-pushed the nls/47817/http-colors branch from 9613d58 to ed36dc3 Compare October 14, 2019 20:49
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@smith smith merged commit d8f0ed5 into elastic:master Oct 15, 2019
@smith smith deleted the nls/47817/http-colors branch October 15, 2019 02:40
smith added a commit to smith/kibana that referenced this pull request Oct 15, 2019
* [APM] Use same colors for HTTP status everywhere

Use the same colors on the RPM/TPM graphs as in the status code badge.

Fixes elastic#47817.

* don't export that const

* Change colors

* Remove unused import
smith added a commit that referenced this pull request Oct 15, 2019
* [APM] Use same colors for HTTP status everywhere

Use the same colors on the RPM/TPM graphs as in the status code badge.

Fixes #47817.

* don't export that const

* Change colors

* Remove unused import
@sorenlouv sorenlouv self-assigned this Oct 21, 2019
@sorenlouv
Copy link
Member

sorenlouv commented Oct 21, 2019

Test plan: verified ✅

image

image

image

image

@sorenlouv sorenlouv added the apm:test-plan-done Pull request that was successfully tested during the test plan label Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:test-plan-done Pull request that was successfully tested during the test plan release_note:skip Skip the PR/issue when compiling release notes v7.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Align http colors on requests per minute graph with trace summary
4 participants