eui icon indicating copy to clipboard operation
eui copied to clipboard

[Feature Branch] Convert EuiRange sliders to Emotion and more enhancements

Open elizabetdev opened this issue 3 years ago • 3 comments

Summary

This PR converts EuiRange sliders to Emotion and fixes the following issues:

  • [ ] #5923
  • [ ] #5725
  • [ ] #5186
  • [ ] #5228
  • [ ] Can we reuse EuiColorStops?

PRs

  • #6084

Changelog

WIP

Checklist

  • [ ] Checked 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 and cypress tests
  • [ ] Checked for breaking changes and labeled appropriately
  • [ ] Checked for accessibility including keyboard-only and screenreader modes
  • [ ] Updated the Figma library counterpart
  • [ ] A changelog entry exists and is marked appropriately

elizabetdev avatar Jul 29 '22 14:07 elizabetdev

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

kibanamachine avatar Jul 29 '22 15:07 kibanamachine

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

kibanamachine avatar Sep 08 '22 13:09 kibanamachine

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

kibanamachine avatar Sep 12 '22 15:09 kibanamachine

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

kibanamachine avatar Sep 26 '22 15:09 kibanamachine

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

kibanamachine avatar Sep 26 '22 19:09 kibanamachine

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

kibanamachine avatar Sep 30 '22 16:09 kibanamachine

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

kibanamachine avatar Oct 27 '22 11:10 kibanamachine

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

kibanamachine avatar Oct 28 '22 11:10 kibanamachine

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

kibanamachine avatar Nov 01 '22 21:11 kibanamachine

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

kibanamachine avatar Nov 23 '22 13:11 kibanamachine

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

kibanamachine avatar Dec 02 '22 19:12 kibanamachine

@breehall I know this is blocking the release and your Kibana upgrade, so just wanted to give you a quick status update - I'm doing a final pass on the docs page before I merge this in. In particular I'm looking at the playground flyouts - I'm not super happy with their current usability; it feels annoyingly hard to get things in a easy to test state.

Once that's done on either Monday or Tuesday, I was hoping to get your and @1Copenut's eyes on this to QA various input states and help test mouse vs keyboard focus, etc. The more bugs we potentially catch pre-release, the fewer backports we have to do!

cee-chen avatar Dec 03 '22 03:12 cee-chen

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

kibanamachine avatar Dec 03 '22 03:12 kibanamachine

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

kibanamachine avatar Dec 06 '22 04:12 kibanamachine

👋🏾 Here are a few questions / comments I had after QA-ing:

  1. I'm noticing that the Playground is a little buggy. It's probably site wide and not just with this component, but a few things that stood out to me:
  • Should I be able to click and drag the range slider from the Playground? This can't be done in the current version either (just as a note).
  • Some prop combinations make the range slider disappear from the Playground all together. Some of these include:
    • Increasing step to 3 or above
    • Sometimes activating showTicks - I see that there was a commit to address this (5a10a0c). I think this one might just be funky?
  1. It looks like the input that appears when showInput may need to be extended. When isInvalid is true and compressed is false, the numeric value within the input is cut off and can't been seen. image

Other than those two things, this looks good. I tested the page with mouse and keyboard controls and keyboard controls successfully as well.

breehall avatar Dec 06 '22 16:12 breehall

Should I be able to click and drag the range slider from the Playground? This can't be done in the current version either (just as a note).

This is intentional as the onChange is a no-op and is not intended to change the value. This simulated onChange fn is a pattern across multiple playgrounds. Whether or not that's confusing UX is definitely worth discussing but it's definitely something that should be resolved across all playgrounds in a separate concern rather than just this one.

Some prop combinations make the range slider disappear from the Playground all together

Oh interesting. So if you do this on local, you get a very handy error pane that covers the entire screen:

But on staging/prod the message only shows in console logs:

Either way, these are a series of very intentionally thrown errors (that have unit tests written for them) so I'll write it off for now (working the same as production), but I think we should find some way of wrapping an EuiErrorBoundary around the playground or similar.

It looks like the input that appears when showInput may need to be extended. When isInvalid is true and compressed is false, the numeric value within the input is cut off and can't been seen.

Totally agreed! This is already an issue on production it looks like so my preference would be to file an issue + follow up in a separate PR (since changing the width of the input could have unintended effects on the range slider, and @miukimiu may have different ideas on how to resolve the problem).

Thanks for the super thorough QA Bree!!! These are all great items I'd love to see us tackle in the future.

cee-chen avatar Dec 06 '22 16:12 cee-chen

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

kibanamachine avatar Dec 06 '22 19:12 kibanamachine