-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Make metric color fill the entire space #122091
Conversation
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Although I really like the option to fill the entire panel, this will mean that all the existing metrics with fill, will change. Wdyt @flash1293 @ghudgins ? |
But dynamic color for metric has been added in this same release: #116170, so no user is currently using it. |
You are correct!! I forgot it! Then yes I see no prob with that! I will review it asap :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghudgins @stratoula you think it makes sense to offer also the "reduced" version as for the other vis editor or is it ok to keep this version only? |
The previous implementation worked like that It doesn't look exactly the same with the viz editor as it colours only the value and not the label. Honestly I don't have a strong opinion, whatever @ghudgins prefers. My proposal is to merge this PR and if the users ask for this option, then add it. It is a new feature after all :) |
@stratoula agree with that logic. I don't feel strongly about including it in initial release now that we have the more desirable panel option. I pinged @gvnmagni as well just to make sure |
Agree! Since it doesn't add any value and it offers a worse version of the solution we are proposing I'd say that if we don't have anything holding us back we can go with the first option only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dej611: This looks to be a nice change over the previous behavior. Well done. The PR looks good in general, but I had a handful of questions before approving. CCing @ghudgins and @gvnmagni, in case they have an opinion.
- Would it be possible to remove or compensate for the container padding in Lens (top/right/bottom/left) and Dashboard (right/bottom/left) so that the background color is flush with the edge of the visualization's container? I think doing so would help avoid the box-in-a-box look and reduce visual tension.
-
Not super important, but I had a minor question/thought about the consistency of text colors within the metric visualization type with these changes. When no fill color is applied to a metric visualization (in light mode), the metric value color is the standard EUI text color (
$euiTextColor
), but the display name is black (#000
). However, when a fill is applied, both the metric value and display name receive the same color (either black or white depending on the chosen fill color). For the sake of consistency, should the metric value and display name be using the same color when no fill is applied? -
Similar to the above, unlike these recent changes to the fill behavior, the option to color text by value only applies those colors to the metric value text. For the sake of consistency, should the color be applied to both the metric value and display name? For the sake of accessibility, my first instinct is to say keep it as we currently have it (as not applying the user-selected color to the display name text allows us to ensure proper contrast), but thought I'd ask the group.
That is definitely possible. My idea was to not change the look and feel for the existing metrics.
My idea was to prevent readability issues if the user would set very light colors on the metric, hence keep the display name out of the coloring in this case. |
I've tried to look into that, but it seems that the padding is added in the Expression renderer where there's no knowledge of the metric configuration. |
Gotcha. Thanks for looking into it.
Assuming others feel the same or are indifferent to such a change, I'd say make them both
Yeah, sounds like your feel the same way I do (re: accessibility). In that case, let's keep it as you have it (with color-by-value on text only being applied to the metric value). That said, I'll approve now so I don't hold you up further. |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@MichaelMarcialis updated the PR using the I guess this could be extended in a follow up also to other visualizations (i.e. table & heatmap). |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works as expected, LGTM
Summary
Fixes #120387
Make the metric fill behaviour use the entire space of the visualization panel.
Note: the metric title will flip from pure black to pure white depending on the theme.
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers