-
Notifications
You must be signed in to change notification settings - Fork 122
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(legend): fix color anchor, add action context, fix action padding #774
Conversation
- change color picker anchor to the color dot icon - fix eui popover styles pollution with EuiWrappingPopover - add resolved label and color to legend action component to avoid recomputing - add action padding to legend width when action is provided
Codecov Report
@@ Coverage Diff @@
## master #774 +/- ##
==========================================
+ Coverage 74.14% 74.54% +0.39%
==========================================
Files 270 285 +15
Lines 9286 9577 +291
Branches 1994 2020 +26
==========================================
+ Hits 6885 7139 +254
- Misses 2395 2427 +32
- Partials 6 11 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
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.
Looks good to me, tested locally
src/components/legend/color.tsx
Outdated
@@ -33,28 +33,32 @@ interface ColorProps { | |||
* Color component used by the legend item | |||
* @internal | |||
*/ | |||
export function Color({ color, isSeriesHidden = false, hasColorPicker, onClick }: ColorProps) { | |||
if (isSeriesHidden) { | |||
export const Color = forwardRef<HTMLDivElement, ColorProps>( |
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.
can we memoize also this function?
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.
# [21.0.0](v20.0.2...v21.0.0) (2020-08-10) ### Bug Fixes * update dep vulnerabilities, minimist and kind-of ([#763](#763)) ([4455281](4455281)) * **legend:** fix color anchor, add action context, fix action padding ([#774](#774)) ([4590a22](4590a22)) * **tooltip:** placement with left/top legends and single bars ([#771](#771)) ([e576b26](e576b26)), closes [#769](#769) [#770](#770) ### Features * streamgraph and fit functions on stacked charts ([#751](#751)) ([268fcc0](268fcc0)), closes [#766](#766) [#715](#715) [#450](#450) ### BREAKING CHANGES * the first parameter of `PointStyleAccessor` and `BarStyleAccessor` callbacks is changed from `RawDataSeriesDatum` to `DataSeriesDatum`. `stackAsPercentage` prop is replaced by `stackMode` that accept one `StackMode`.
🎉 This PR is included in version 21.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [21.0.0](elastic/elastic-charts@v20.0.2...v21.0.0) (2020-08-10) ### Bug Fixes * update dep vulnerabilities, minimist and kind-of ([opensearch-project#763](elastic/elastic-charts#763)) ([843554f](elastic/elastic-charts@843554f)) * **legend:** fix color anchor, add action context, fix action padding ([opensearch-project#774](elastic/elastic-charts#774)) ([262f8d2](elastic/elastic-charts@262f8d2)) * **tooltip:** placement with left/top legends and single bars ([opensearch-project#771](elastic/elastic-charts#771)) ([75533b1](elastic/elastic-charts@75533b1)), closes [opensearch-project#769](elastic/elastic-charts#769) [opensearch-project#770](elastic/elastic-charts#770) ### Features * streamgraph and fit functions on stacked charts ([opensearch-project#751](elastic/elastic-charts#751)) ([6f6a8cb](elastic/elastic-charts@6f6a8cb)), closes [opensearch-project#766](elastic/elastic-charts#766) [opensearch-project#715](elastic/elastic-charts#715) [opensearch-project#450](elastic/elastic-charts#450) ### BREAKING CHANGES * the first parameter of `PointStyleAccessor` and `BarStyleAccessor` callbacks is changed from `RawDataSeriesDatum` to `DataSeriesDatum`. `stackAsPercentage` prop is replaced by `stackMode` that accept one `StackMode`.
Summary
Prevents this 👇
and this ⬇️
Now no movement
Checklist
src/index.ts
(and stories only import from../src
except for test data & storybook)