fix(tooltip): show true opaque colors in tooltips#629
fix(tooltip): show true opaque colors in tooltips#629nickofthyme merged 3 commits intoelastic:masterfrom
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.
|
rshen91
left a comment
There was a problem hiding this comment.
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:

markov00
left a comment
There was a problem hiding this comment.
We should adapt the background color with the used theme background color
src/components/tooltip/_tooltip.scss
Outdated
There was a problem hiding this comment.
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
|
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.
|
markov00
left a comment
There was a problem hiding this comment.
LGTM, tested on safari, chrome and firefox
|
@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
# [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
backgroundColorto tooltip colors to show true color. Uses background color fromtheme.background.colorper #608.fixes #628
Before
After