-
Notifications
You must be signed in to change notification settings - Fork 906
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
Auto-focus on the Field input when clicking Add filter #355
Auto-focus on the Field input when clicking Add filter #355
Conversation
Signed-off-by: galangel <gal0angel@gmail.com>
✅ DCO Check Passed 0ccc3c1 |
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.
Thanks for the PR @galangel This is really good, had one small question. LGTM otherwise.
@@ -121,7 +121,7 @@ function FilterBarUI(props: Props) { | |||
withTitle | |||
panelPaddingSize="none" | |||
ownFocus={true} | |||
initialFocus=".filterEditor__hiddenItem" | |||
initialFocus='[data-test-subj="filterFieldSuggestionList"] [data-test-subj="comboBoxSearchInput"]' |
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.
Aren't data-test-subj
are meant for functional tests ? Can we provide another class ?
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.
Hi, you suggest switching to a class? sure, I wouldn't mind
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.
It could be class or a unique id attribute, I am fine either way as long as this will take care It should be good.
I like this. Team is reviewing. |
+1 - This is a nice enhancement, particularly for keyboard nav users. |
✅ DCO Check Passed 779e1f3 |
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.
LGTM !! Thanks for the changes @galangel
I believe @JacobBrandt made a good catch but seeing you will revert that change in the other PR I will verify this PR tonight. |
Tests all passing (func included), everything looks good to me. Approving and merging in. Thank you so much. |
Added Auto-focus on Add Filter Input Done by setting the initial focus of the popover with the relevant selector * correct autofocus Signed-off-by: galangel <gal0angel@gmail.com> * use class Signed-off-by: galangel <gal0angel@gmail.com>
Signed-off-by: galangel gal0angel@gmail.com
Description
Added Auto-focus on the Field input when clicking Add filter
Done by setting the initial focus of the popover with the relevant selector
example:
Issues Resolved
Add filter form initial focus should be the Field input
Check List