-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix: adds arrow keys navigation functionality in the Switcher, and increases test coverage #18115
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18115 +/- ##
==========================================
+ Coverage 83.22% 83.36% +0.13%
==========================================
Files 404 404
Lines 14338 14344 +6
Branches 4645 4646 +1
==========================================
+ Hits 11933 11958 +25
+ Misses 2243 2224 -19
Partials 162 162 ☔ View full report in Codecov by Sentry. |
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 adding the arrow navigation
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.
Looks Good!
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!
The content of this pull request will be made available as part of our next release. For the full schedule of upcoming releases, check out our Release Radar page. |
Closes #17493
This PR addresses an issue where the Arrow keys navigation functionality in the Switcher component was no longer working after types were added and Increases the test coverage to 100%
The cause for navigation issues was related to a change in the condition for checking the component type
child.type?.displayName === 'SwitcherItem'
condition in earlier.js
file was changed to getDisplayName(child.type) === 'Switcher' when component was converted to.tsx
Changelog
New
getDisplayName(curr.type) === 'SwitcherItem
' check inenabledIndices
to ensures that only SwitcherItem components are included in the navigationChanged
reverted to
getDisplayName(child.type) === 'SwitcherItem'
Testing / Reviewing