-
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(legend): action sizing ui and focus states #1102
Conversation
1259f80
to
b75b753
Compare
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.
Visually checked all the screenshots!
LGTM
if (items.length === 0 || items.every(({ isItemHidden }) => isItemHidden)) { | ||
return null; | ||
} | ||
|
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 does not free-up space for the chart when there is no legend rendered. We need to find a better way to set the size to zero in the get_legend_size
selector without creating an infinite loop.
Codecov Report
@@ Coverage Diff @@
## master #1102 +/- ##
==========================================
+ Coverage 71.72% 72.14% +0.42%
==========================================
Files 381 397 +16
Lines 11917 12230 +313
Branches 2600 2629 +29
==========================================
+ Hits 8547 8823 +276
- Misses 3339 3368 +29
- Partials 31 39 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
# [28.0.0](v27.0.0...v28.0.0) (2021-04-02) ### Bug Fixes * **annotations:** provide fallback for line annotation markers ([#1091](#1091)) ([0bd61f1](0bd61f1)) * **legend:** action sizing ui and focus states ([#1102](#1102)) ([3a76a2c](3a76a2c)) * **legend:** stop legend color picker dot twitching ([#1101](#1101)) ([c89b767](c89b767)) ### Code Refactoring * rename enum types to singular ([#1064](#1064)) ([396b3d1](396b3d1)), closes [#767](#767) ### BREAKING CHANGES * `AnnotationDomainTypes`, `AnnotationTypes`, `SeriesTypes`, `ChartTypes`, and `SpecTypes` are renamed to `AnnotationDomainType`, `AnnotationType`, `SeriesType`, `ChartType`, and `SpecType`
🎉 This PR is included in version 28.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [28.0.0](elastic/elastic-charts@v27.0.0...v28.0.0) (2021-04-02) ### Bug Fixes * **annotations:** provide fallback for line annotation markers ([opensearch-project#1091](elastic/elastic-charts#1091)) ([d907c81](elastic/elastic-charts@d907c81)) * **legend:** action sizing ui and focus states ([opensearch-project#1102](elastic/elastic-charts#1102)) ([a58cc0a](elastic/elastic-charts@a58cc0a)) * **legend:** stop legend color picker dot twitching ([opensearch-project#1101](elastic/elastic-charts#1101)) ([f63bb3b](elastic/elastic-charts@f63bb3b)) ### Code Refactoring * rename enum types to singular ([opensearch-project#1064](elastic/elastic-charts#1064)) ([6e900e2](elastic/elastic-charts@6e900e2)), closes [opensearch-project#767](elastic/elastic-charts#767) ### BREAKING CHANGES * `AnnotationDomainTypes`, `AnnotationTypes`, `SeriesTypes`, `ChartTypes`, and `SpecTypes` are renamed to `AnnotationDomainType`, `AnnotationType`, `SeriesType`, `ChartType`, and `SpecType`
Summary
Overall fixes for action UI to match rest of legend
Screen.Recording.2021-03-31.at.12.58.46.PM.mp4
Notible changes/fixes include:
shared margins to create a more narrow footprint
Forced size of action popovers. This assumes that user will use the
EuiPopover
for the actions and forces the size to be full height and width to have uniform focus state across the color dot (w/ or w/o a color picker), the series name (w/ or w/o extra value) and the actions.Before
After
Checklist
:focus
is problematic in safari https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus