-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat(selection): introduce selection related hooks and containers #9
Conversation
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.
This is a great start! Some additional questions:
- How does this work with RTL? I'm assuming we haven't explicitly solved that yet, but we could provide a simple component that uses the
useContext
hook rather than relying on the styled-components method inreact-components
.
Thanks for the early feedback @Austin94
Haven't got to that yet still trying to put the basics in place first.
Yeah same answer as above |
… logic so correct tabIndex is toggled based on focus/selection
… to default that as a tabbable item
Reason for removing Locale component is a don't think we should offer it here for two reasons:
I think this makes rtl less magic and more obvious to people building with this. |
The less magic the better! 🎉 If someone really wanted it they could wrap it with a custom |
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.
@ryanseddon if not intended for this PR, I'd like to see an issue added for breaking out container-utilities
. https://github.com/zendeskgarden/react-containers/pull/9/files#diff-f0f75652389df2f7b7d2744cb63a38aeR14
BREAKING CHANGE: This version includes the WCAG 2.0 AA compliant "blue" color palette. With this being a large visual change it is a major version.
Description
This adds a hook and render-prop container for selection.
useSelection
and<SelectionContainer>
.Detail
This borrows heavily from @Austin94 exploratory work on a roving tab index hook as opposed to our previous strategy in
SelectionContainer
of using thearia-activedescendant
to control a virtual focus this now just shifts actual browser focus which AFAICT is fine to use either or.Checklist
yarn storybook
)