-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
base: main
Are you sure you want to change the base?
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 82.87% 83.01% +0.13%
==========================================
Files 404 404
Lines 14338 14344 +6
Branches 4591 4616 +25
==========================================
+ Hits 11882 11907 +25
+ Misses 2296 2276 -20
- Partials 160 161 +1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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
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