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

[EuiColorPicker] Add isClearable and placeholder options #3689

Merged
merged 10 commits into from
Jul 2, 2020

Conversation

thompsongl
Copy link
Contributor

@thompsongl thompsongl commented Jul 2, 2020

Summary

Closes #3683 by adding two additional props to:

  • Allow for clearing the input with the standard EUI clearable input button (isClearable)
  • Allow for providing custom placeholder text (placeholder)

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
  • Checked Code Sandbox works for the 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

@thompsongl thompsongl requested a review from cchaos July 2, 2020 17:40
@kibanamachine
Copy link

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

@chandlerprall chandlerprall self-requested a review July 2, 2020 18:03
Copy link
Contributor

@chandlerprall chandlerprall 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; pulled & tested locally

@cchaos any thoughts on the color swatch in the input being able to update to whatever a matching auto/placeholder value would be? (would need to be another value provided by the app)

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.

🎉 Thank you for getting this up so quickly!

Can/should we also allow the isClearable option to populate down to the input inside the popover?
Screen Shot 2020-07-02 at 14 28 15 PM

src-docs/src/views/color_picker/empty_state.js Outdated Show resolved Hide resolved
src/components/color_picker/color_picker.tsx Outdated Show resolved Hide resolved
@cchaos
Copy link
Contributor

cchaos commented Jul 2, 2020

any thoughts on the color swatch in the input being able to update to whatever a matching auto/placeholder value would be? (would need to be another value provided by the app)

I had thought about this too. For now, lets just get these new settings up and continue that convo afterward. There is a nice thing to being able to customize that icon, but would it be unexpected that the custom icon changes to the swatch color after one was chose?

@chandlerprall
Copy link
Contributor

Waiting on the placeholder swatch/icon conversation sounds good!

@thompsongl
Copy link
Contributor Author

Can/should we also allow the isClearable option to populate down to the input inside the popover?

Certainly can. I'll go ahead and add it.

@thompsongl thompsongl requested a review from cchaos July 2, 2020 19:37
@kibanamachine
Copy link

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

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.

Awesome!

@kibanamachine
Copy link

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

@kibanamachine
Copy link

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

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.

[EuiColorPicker] Need support for changing placeholder text and add isClearable option
4 participants