Added autoFocus option to EuiTabbedContent#2062
Merged
cchaos merged 3 commits intoelastic:masterfrom Jun 20, 2019
Merged
Conversation
5191547 to
994b40f
Compare
Contributor
Author
|
Opening this up for review. The "issue" item, is still unchecked mainly to see if anyone hollers about any concern over it. Otherwise, it's not really an issue and this should be good to go. |
thompsongl
approved these changes
Jun 20, 2019
Contributor
thompsongl
left a comment
There was a problem hiding this comment.
Code looks good; tested locally, too.
I don't think the shift + tab thing is a problem at all. The focus state is clear enough and that is the normal interaction for reverse focus order
autoFocus option to EuiTabbedContentautoFocus option to EuiTabbedContent
Contributor
Author
|
I'm merging this one in because I want to make sure it gets into K7.3 |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The focus state of EuiTabs can confuse users since it's so prominent compared to the selected state. Some users thing the focus state is the selected state. This PR attempts to allow setting the initial focus of the tabbed items from
initial(first tab) toselected(selected tab).There are 2 issues with it at the moment:
[ ] 1. If the selected tab is not the first, users have to shift + tab in order to get to the previous tabs.Got confirmation from most that this is not an issue.document.getElementById()to find the selected tab, which probably isn't greatstate.focustotrueand then auto focuses on the selected tab. The problem is that I have to reset the state tofalsewhen a user tabs out of the control. However, it seems to cycle asblur then focuseach tab press.Also fixes the second action item for the EuiDatePicker from GAH:
Checklist
[ ] This was checked in mobile[ ] This was checked in dark mode[ ] This was checked for breaking changes and labeled appropriately[ ] This required updates to Framer X components