-
Notifications
You must be signed in to change notification settings - Fork 59
fix: tab: added a prop to enable standard key navigation for tabs component #953
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
base: main
Are you sure you want to change the base?
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
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.
The code that is written to solve the issue was imperative where we directly manipulated the DOM. Can you please try out the changes I've commented locally and see if the functionality is working as expected. The code I've given follows the declarative paradigm of react.
…-std-key-navigation-for-tabs
…-std-key-navigation-for-tabs
…ightfoldAI/octuple into mbhagat/no-std-key-navigation-for-tabs
…-std-key-navigation-for-tabs
…-std-key-navigation-for-tabs
…-std-key-navigation-for-tabs
This comment has been minimized.
This comment has been minimized.
…-std-key-navigation-for-tabs
…-std-key-navigation-for-tabs
…ightfoldAI/octuple into mbhagat/no-std-key-navigation-for-tabs
This comment has been minimized.
This comment has been minimized.
…-std-key-navigation-for-tabs
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
- rebase with master, and test the PR again if it's working
- write unit tests for these changes
…-std-key-navigation-for-tabs
…ightfoldAI/octuple into mbhagat/no-std-key-navigation-for-tabs
This comment has been minimized.
This comment has been minimized.
…-std-key-navigation-for-tabs
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…-std-key-navigation-for-tabs
This comment has been minimized.
This comment has been minimized.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #953 +/- ##
==========================================
- Coverage 84.43% 84.08% -0.35%
==========================================
Files 1104 1104
Lines 20654 20798 +144
Branches 7822 7881 +59
==========================================
+ Hits 17440 17489 +49
- Misses 3126 3221 +95
Partials 88 88 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
SUMMARY:
Problem: No std key navigation for the tabs
Solution:
GITHUB ISSUE (Open Source Contributors)
NA
JIRA TASK (Eightfold Employees Only):
https://eightfoldai.atlassian.net/browse/ENG-123289
https://eightfoldai.atlassian.net/browse/ENG-127383
https://eightfoldai.atlassian.net/browse/ENG-125640
CHANGE TYPE:
TEST COVERAGE:
TEST PLAN:
CASE: if enableArrowNav is enabled then standard arrow key navigation is activated, wherein navigation through the tabs is possible by arrow keys and on enter the focus should go to the selected tab.
Note: If any focusable element is present inside the tab panel then on tabbing after selection of the tab, the focus should go to the focusable element else move outside the tab component.
i.
enableArrowNav
is disabled.tabsNormalN.mp4
ii.
enableArrowNav
is enabled.tabsArrowN.1.mp4
Steps for Regression:
i. Verify that the tab is working as expected with and without enabling
enableArrowNav
prop