-
Notifications
You must be signed in to change notification settings - Fork 839
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
Add EuiColorPaletteDisplay #3865
Add EuiColorPaletteDisplay #3865
Conversation
src/components/color_picker/color_palette_display/color_palette_display.tsx
Outdated
Show resolved
Hide resolved
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
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 is great! A couple TS changes and a couple questions below.
src/components/color_picker/color_palette_display/color_palette_display_fixed.tsx
Outdated
Show resolved
Hide resolved
src/components/color_picker/color_palette_display/color_palette_display_fixed.tsx
Outdated
Show resolved
Hide resolved
…e_display_fixed.tsx Co-authored-by: Greg Thompson <[email protected]>
…e_display_fixed.tsx Co-authored-by: Greg Thompson <[email protected]>
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
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 really like that the select box in the customize popover also accounts for the settings. 👍
Just a couple quick last comments.
src/components/color_picker/color_palette_display/color_palette_display_gradient.tsx
Outdated
Show resolved
Hide resolved
src/components/color_picker/color_palette_display/color_palette_display_fixed.tsx
Outdated
Show resolved
Hide resolved
src/components/color_picker/color_palette_display/color_palette_display.tsx
Show resolved
Hide resolved
src/components/color_picker/color_palette_display/_color_palette_display.scss
Outdated
Show resolved
Hide resolved
PR4U: elizabetdev#6 |
EuiColorPaletteDisplay TypeScript assist
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
Thanks @thompsongl and @cchaos, I already merged the PR with the typescript assist and went through the last comments. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
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.
🍰 Nice!
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!
Preview documentation changes for this PR: https://eui.elastic.co/pr_3865/ |
Summary
Closes #3575
This PR adds a new component called EuiColorPaletteDisplay. This component used to be part of the EuiColorPalettePicker but it was decided to decouple the code from it. So it can be used on its own.
Issues that this component fix
When this component was part of the EuiColorPalettePicker I found a few issues that are now fixed:
Decisions
While developing this component I found a few issues that lead me to take a few decisions. Initially I was generating a css linear gradient to create fixed color palettes. But on Google chrome, the stops were getting blurred.
For this reason, I tried to generate the linear gradient with an SVG
<linearGradient />
but once again the stops were getting blurred.The solution was to generate color stops with a flex container and spans. There was an issue to use the inset shadow with a flex container. For this reason, I used the mixin
@include innerBorder('dark', $euiBorderRadius, .2);
to generate the borders.Final Solution
Checklist
[ ] Checked Code Sandbox works for the any docs examples