Skip to content
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(Tabs): reset active index to selected index for manual activation #17831

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Oct 22, 2024

Closes #17591

This PR adds blur handlers to the tabs and vertical tabs components to reset the active tab index to the selected tab index.

Changelog

New

  • handleBlur methods

Testing / Reviewing

  • view the Manual tabs story
  • click/select a tab
  • navigate to another tab using the arrow keys
  • select the other tab by pressing Enter
  • focus on a different element that isn't another tab
  • move focus back to the tab list and confirm that focus returns to the selected tab rather than the last active tab

@emyarod emyarod requested a review from a team as a code owner October 22, 2024 17:07
Copy link

netlify bot commented Oct 22, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit c28c40e
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/6717de2ba4c921000852905e
😎 Deploy Preview https://deploy-preview-17831--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@emyarod emyarod changed the title 17591-fix/manual-tabs-selected-index-onblur fix(Tabs): reset active index to selected index for manual activation Oct 22, 2024
Copy link

netlify bot commented Oct 22, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit c28c40e
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6717de2b0abc330008ec0d84
😎 Deploy Preview https://deploy-preview-17831--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 22, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit c28c40e
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6717de2bed911f0008f1df28
😎 Deploy Preview https://deploy-preview-17831--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@emyarod emyarod force-pushed the 17591-fix/manual-tabs-selected-index-onblur branch from 26f0261 to c28c40e Compare October 22, 2024 17:17
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.14%. Comparing base (7115f33) to head (c28c40e).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
packages/react/src/components/Tabs/Tabs.tsx 85.71% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17831      +/-   ##
==========================================
- Coverage   80.14%   80.14%   -0.01%     
==========================================
  Files         406      406              
  Lines       14029    14039      +10     
  Branches     4391     4395       +4     
==========================================
+ Hits        11243    11251       +8     
- Misses       2620     2621       +1     
- Partials      166      167       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kennylam kennylam added this pull request to the merge queue Oct 23, 2024
Merged via the queue into carbon-design-system:main with commit 5f4f0a6 Oct 23, 2024
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Manual Tabs Not Working Correctly
3 participants