Skip to content
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

Allowing euiPaletteColorBlind() function to have both light AND dark alternates #2822

Merged
merged 4 commits into from
Feb 4, 2020

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Feb 3, 2020

While trying to update the Visualizations in Kibana to use the new palette service. I realized that the alternates provided by euiPaletteColorBlind() only went one direction (lighter). We should also provide a way to make darker variations so that we can swap this legend color picker with our color palette.

Screen Shot 2020-02-03 at 14 27 30 PM

So now, euiPaletteColorBlind()' s third parameter direction accepts 'lighter' | 'darker' | 'both'. The docs example has been updated to:

Screen Shot 2020-02-03 at 17 39 26 PM

And I've added some props documentation for the function.

Screen Shot 2020-02-03 at 17 44 13 PM

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • [ ] Checked in mobile
  • Checked in IE11 and Firefox
  • Props have proper autodocs
  • Added documentation examples
  • [ ] Added or updated jest tests
  • [ ] Checked for breaking changes and labeled appropriately
  • [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes LGTM

Copy link
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and checked the code and LGTM! 🎉

Just a suggestion, maybe you could somewhere in the text specify what are the arguments that we can pass to the function.

@cchaos
Copy link
Contributor Author

cchaos commented Feb 4, 2020

@miukimiu I did manually add the function and it's props(parameters) to the Props tab of the sections.

@cchaos cchaos merged commit 93c34b2 into elastic:master Feb 4, 2020
@cchaos cchaos deleted the color_palette_direction branch February 4, 2020 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants