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

[Eui(Dual)Range] Updated EuiRangeLevel color property to accept CSS color values #5171

Merged
merged 21 commits into from
Sep 27, 2021

Conversation

miukimiu
Copy link
Contributor

@miukimiu miukimiu commented Sep 13, 2021

Summary

Closes #4467.

This PR updates the EuiRangeLevel color property to accept hex values.

levels-custom-hex-colors@2x

Ignore the levels not being positioned correctly (#5172)

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • Props have proper autodocs and playground toggles
  • Added documentation
  • Checked Code Sandbox works for any docs 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

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5171/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5171/

@miukimiu miukimiu marked this pull request as ready for review September 13, 2021 15:11
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.

Thanks, @miukimiu!

src/components/form/range/range_levels.tsx Outdated Show resolved Hide resolved
src/components/form/range/range_levels.tsx Outdated Show resolved Hide resolved
miukimiu and others added 3 commits September 13, 2021 17:46
Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5171/

thompsongl
thompsongl previously approved these changes Sep 14, 2021
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

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this one!

src-docs/src/views/range/levels.js Outdated Show resolved Hide resolved
src/components/form/range/range_levels.tsx Outdated Show resolved Hide resolved
);

const levelClasses = classNames('euiRangeLevel', {
'euiRangeLevel--customColor': isHexColor,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just thinking out loud, and definitely not necessary, but we don't allow for consumers to pass custom classes or data-test-subj to the levels at the moment. Should we do that, or should we just url-ify the custom color ones and append that instead of just customColor?

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5171/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5171/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5171/

@miukimiu miukimiu changed the title [Eui(Dual)Range] Updated EuiRangeLevel color property to accept hex values [Eui(Dual)Range] Updated EuiRangeLevel color property to accept CSS color values Sep 21, 2021
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5171/

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

👍 Changes LGTM! Don't forget to rebase and update CL 😉

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5171/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5171/

@miukimiu miukimiu merged commit 7996049 into elastic:master Sep 27, 2021
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.

[EuiRange] Support custom color options
4 participants