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

EuiColorStops #2360

Merged
merged 33 commits into from
Oct 2, 2019
Merged

EuiColorStops #2360

merged 33 commits into from
Oct 2, 2019

Conversation

thompsongl
Copy link
Contributor

@thompsongl thompsongl commented Sep 23, 2019

Summary

Closes #2344 (see full description & background in the issue)

Checklist

  • Checked in dark mode
  • 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

@ryankeairns
Copy link
Contributor

Thanks for changing the arrow keys, this feels much better!

@ryankeairns
Copy link
Contributor

ryankeairns commented Sep 25, 2019

@thompsongl Here is a design PR with minor changes to cursors and new stop styles.

👉 PR => thompsongl#8


stopgrab

I also found a couple of issues:

  • When typing in the hex input, the delete/backspace key closes the popover, but users will need that for removing and typing new hex values.
  • Prior to my cursor changes, I notice some flickering that occurs while dragging a stop. It seems as though the cursor gets outside of the stop as you drag. Dragging right, it move outside to the right and vice-versa when dragging left.

@ryankeairns
Copy link
Contributor

Just checked out latest...

tenor-142388435

@thompsongl thompsongl marked this pull request as ready for review September 26, 2019 21:00
Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

Some small functionality comments. I didn't dig too far into the JS. Functionality seems pretty awesome. ⭐️

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.

Didn't find any big issues, very nice work everyone!

src/components/form/range/range_highlight.tsx Outdated Show resolved Hide resolved
src/components/form/range/range_thumb.tsx Outdated Show resolved Hide resolved
src/components/color_picker/color_stops/index.ts Outdated Show resolved Hide resolved
src/components/color_picker/color_stops/color_stops.tsx Outdated Show resolved Hide resolved
src/components/color_picker/color_stops/color_stops.tsx Outdated Show resolved Hide resolved
src/components/color_picker/color_stops/color_stops.tsx Outdated Show resolved Hide resolved
src/components/color_picker/color_stops/color_stops.tsx Outdated Show resolved Hide resolved
src/components/color_picker/color_stops/utils.ts Outdated Show resolved Hide resolved
@thompsongl
Copy link
Contributor Author

Thoughts on moving a stop to the top of the z-index stack on hover?

I'll give this a shot

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

Tested new additions. They work how I'd expect. From a functional / design / accessibility standpoint this LGTM.

Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

Looks and works great. Just a couple of docs feedback items (one may be a repeat of Chandler's feedback):


  1. What is the intent of the 'Prop Change' button up top? It wasn't clear to me, but it seems to reset the colors/defaults? If that stays, the wording could be clearer and it may also benefit from looking like a button with a spacer below it.

Screenshot 2019-10-01 12 24 58


  1. The last example would benefit from a label - something like 'Custom example'. Going a step further maybe these should be its own stand along section on this page? ( cc:/ @snide )

Screenshot 2019-10-01 12 25 13

@chandlerprall
Copy link
Contributor

That z-index hover change is, IMO, much better, thank you!

@thompsongl
Copy link
Contributor Author

What is the intent of the 'Prop Change' button up top?

Removing this. It was just there for me to ensure prop changes would propagate.

The last example would benefit from a label

I'm going to rearrange the whole thing, but I did find that the "Display toggles" component doesn't work with form rows

@ryankeairns ryankeairns self-requested a review October 1, 2019 19:39
Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

Yasssss. Great work on the docs cleanup!

@nreese
Copy link
Contributor

nreese commented Oct 2, 2019

Is there a way to make min and max optional? In the Kibana Maps use case, we do not know what the range will be.

@thompsongl
Copy link
Contributor Author

Is there a way to make min and max optional?

Currently, no, but we can work out a way where users would be able to define the bounds. Basically, there would always be two stops (one at each end) that will accept any number.

@snide @ryankeairns Is this something we want to add to this PR or do a follow-up?

@snide
Copy link
Contributor

snide commented Oct 2, 2019

@thompsongl since maps is the only known consumer for this one, i think we'd need to add that functionality in before we delivered it. You could always merge now if you just want to make the review smaller for the new functionality.

@thompsongl
Copy link
Contributor Author

I think a smaller, focused review on the new functionality would be better. I can merge this and follow up.

@chandlerprall
Copy link
Contributor

Adding a stop at the beginning of the track and then using the keyboard focus + enter creates new stops off the track

off track betting

@thompsongl
Copy link
Contributor Author

Adding a stop at the beginning of the track and then using the keyboard focus + enter creates new stops off the track

😄 I know why that is. I'll fix it before merging this

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.

Changes LGTM; pulled and tested locally, only issue found is an edge case in using keyboard navigation to create a new color stop

@nreese
Copy link
Contributor

nreese commented Oct 2, 2019

i think we'd need to add that functionality in before we delivered it. You could always merge now if you just want to make the review smaller for the new functionality.

Sounds great to merge as-is and then add a follow up PR to allow setting min and max.

@thompsongl thompsongl merged commit 5b83afb into elastic:master Oct 2, 2019
snide pushed a commit to snide/eui that referenced this pull request Oct 10, 2019
* WIP

* WIP: scaling clean up

* reverse up/down keys

* add left/right movement

* update test

* doubleClick addStop; clean up; tests removal

* use more range components directly

* Firefox cleanup

* i18n; refactor

* WIP: add new stop via click

* clean up

* better keyboard interaction

* add stop styles

* empty set; backspace fix; drag handle fix

* readOnly and disabled

* screen reader

* more i18n

* cleanup of thumbs

* Update src/components/color_picker/color_stops/color_stop_thumb.tsx

Co-Authored-By: [email protected] <[email protected]>

* thumb title

* required label

* misc feeback

* update zIndex for active thumb

* docs refactor

* util; basic snapshot tests

* color stops tests

* thumb snapshot tests

* CL

* use sorted array for add via keyboard location
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.

Color Stops Component
5 participants