-
Notifications
You must be signed in to change notification settings - Fork 842
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 #1914
EuiColorPicker #1914
Conversation
@thompsongl Here's a design PR thompsongl#3 Changes
|
This makes sense. If you're turning off the auto open, then you'll need something that opens it up. I'm torn between thinking that the caret should be a button or whether it should be purely visual and you hit something like "downarrow" for trigger the popover. Either way I think these are fairly minor issues. Let's remember this thing closes a bunch of tickets and is overall a major improvement. It might make sense to make an issue, live with it for a week and get feedback, then circle back. Having to hit tab -> ESC right now is not the end of the world. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm watching this PR already for a while, that's a great work, Greg!
I tested the last version (right before leaving this comment),
I've discovered one issue:
This is input. Tab to this.
Color picker is auto popup (expanded).
Hit the TAB key, => that moves the focus to literally color picker small rounded point.
Ok, I've chosen the right color, I'm ready to go next.
I'm done with that popover, [1] hit ESC :) => that moves the focus back to the input.
Ok, I have my color in the input, the popover is open, but that's ok, I'm not going to use it (I don't care because it's auto-expanded, so I'm thinking if I don't go inside, it will auto self-close).
So, yes, I have my color in the input, I'm ready to go next,
hit TAB key, => I'm focusing on rounded small color picker, again!
No, hit ESC => focus on the input, hit TAB => I'm on the rounded small point, hit ESC.... and so forth.
[1] yes, it may seem obvious that to confirm your choice you need to hit ENTER, however, when you know that the input value is already changed, you can decide to close popover.
And it sounds natural that ESC key is the right key to close something.
@rockfield Thanks for the testing! This seems to be specifically an issue with VO focus and keyboard focus being on different elements. I think making ESC and ENTER behave the same will fix it, so I'll try that. |
Hmm there must be something else going on in @rockfield's description, because ESC doesn't have that behavior for me. Almost certainly a macOS vs Windows thing? |
@thompsongl It's definitely windows / IE. You need to double escape to get out. http://snid.es/a3d96445ca76 Works fine on mac / chrome. |
Ah yeah ok. This is an IE bug that I fixed and must have reintroduced. |
hm... I didn't know anything about IE, => I tested that on windows indeed, however on Firefox.
|
Alright.
If we go this ^ route, then I think this is ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified IE from latest commit and functionally I'm OK with where this is at currently. HUGE PR.
Looking great, fantastic work! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with fixing the tab+focus thing as a separate issue
Summary
🎨 Replaces EUI's third-party color picker component with a custom, swatch-friendly, accessible, HSV picker.
Maintains API compatibility with previous component:
Tests remain to be written. I can work on that while functionality is reviewed.
Please do a manual screen reader test. I had trouble with Voiceover + Chrome, but want second opinions. Other browsers work as I would expect given WAI-ARIA guidelines.
Background
Builds on #856 (swatch-based picker).
Issues immediately addressed (#1847):
Future
Checklist