-
Notifications
You must be signed in to change notification settings - Fork 121
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
fix(tooltip): show true opaque colors in tooltips #629
Conversation
Codecov Report
@@ Coverage Diff @@
## master #629 +/- ##
==========================================
+ Coverage 67.78% 70.63% +2.84%
==========================================
Files 236 220 -16
Lines 6914 6439 -475
Branches 1312 1237 -75
==========================================
- Hits 4687 4548 -139
+ Misses 2208 1872 -336
Partials 19 19 Continue to review full report at Codecov.
|
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.
I opened the stories locally and it rendered correctly for the vast majority. I did notice in there might be some weirdness with treemap stories with the tooltip that I could use clarification on. For instance, Treemap - Percentage
story that the tooltips show the continents with a $euiColorGhost fill vs. no fill. I'm not sure if this is an intended change? The Treemap- Multi Color
shows something similar.
The Treemap - Two Layers Stress Test
shows the tooltip item color next to the tooltip text as a different size than the other layer in the tooltip. In master it looks like these are the same size. I'm including a giph to explain it better than I can hopefully:
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.
We should adapt the background color with the used theme background color
src/components/tooltip/_tooltip.scss
Outdated
position: relative; | ||
width: $euiSizeXS; | ||
margin-right: 3px; | ||
background-color: $euiColorGhost; |
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.
This color will be always #fff
independently of the background color. I think, for a first fix, we should use a EUI theme color dependant, like the $euiColorFullShade
that is white with the light theme and near black for the dark theme.
@rshen91 is working on adding a background prop to the chart to handle various background color, this will then needs to be connected with this component to pass the right color if specified
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.
Ok good idea. I'll wait on #608
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.
see 58cf176
Good eye @rshen91 I'll test that case when I merge with your changes. 👍 |
9586b0f
to
9cd8c89
Compare
Codecov Report
@@ Coverage Diff @@
## master #629 +/- ##
==========================================
+ Coverage 73.13% 73.27% +0.14%
==========================================
Files 271 271
Lines 8784 8786 +2
Branches 1747 1747
==========================================
+ Hits 6424 6438 +14
+ Misses 2309 2297 -12
Partials 51 51
Continue to review full report at Codecov.
|
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.
LGTM, tested on safari, chrome and firefox
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.
@markov00!!! thanks, good catch! The first issue I think is expected, what do you mean by The second one I will fix now. |
The review was mine :D |
Sorry Marco, I don't know why I thought that was Robert. Gotcha, thanks I'll update both bullets. |
- Add flex value to inner item container - Update screenshots per color changes
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.
LGTM
# [19.5.0](v19.4.1...v19.5.0) (2020-06-15) ### Bug Fixes * **tooltip:** show true opaque colors in tooltips ([#629](#629)) ([23290be](23290be)), closes [#628](#628) * path of stacked area series with missing values ([#703](#703)) ([2541180](2541180)) * remove double rendering ([#693](#693)) ([ebf2748](ebf2748)), closes [#690](#690) ### Features * **partition:** add 4.5 contrast for text in partition slices ([#608](#608)) ([eded2ac](eded2ac)), closes [#606](#606) * add screenshot functions to partition/goal ([#697](#697)) ([5581c3c](5581c3c))
🎉 This PR is included in version 19.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [19.5.0](elastic/elastic-charts@v19.4.1...v19.5.0) (2020-06-15) ### Bug Fixes * **tooltip:** show true opaque colors in tooltips ([opensearch-project#629](elastic/elastic-charts#629)) ([323b325](elastic/elastic-charts@323b325)), closes [opensearch-project#628](elastic/elastic-charts#628) * path of stacked area series with missing values ([opensearch-project#703](elastic/elastic-charts#703)) ([93f063f](elastic/elastic-charts@93f063f)) * remove double rendering ([#693](elastic/elastic-charts#693)) ([1a9bbb9](elastic/elastic-charts@1a9bbb9)), closes [#690](elastic/elastic-charts#690) ### Features * **partition:** add 4.5 contrast for text in partition slices ([opensearch-project#608](elastic/elastic-charts#608)) ([59d6d49](elastic/elastic-charts@59d6d49)), closes [opensearch-project#606](elastic/elastic-charts#606) * add screenshot functions to partition/goal ([opensearch-project#697](elastic/elastic-charts#697)) ([6d2ff64](elastic/elastic-charts@6d2ff64))
Summary
Add
backgroundColor
to tooltip colors to show true color. Uses background color fromtheme.background.color
per #608.fixes #628
Before
After