-
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(Tabs): handle activation mode scrolling in separate useIsomorphicEffect
s
#17920
base: main
Are you sure you want to change the base?
fix(Tabs): handle activation mode scrolling in separate useIsomorphicEffect
s
#17920
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
useIsomorphicEffect
s
useIsomorphicEffect
suseIsomorphicEffect
s
✅ 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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17920 +/- ##
==========================================
+ Coverage 81.16% 81.18% +0.02%
==========================================
Files 406 406
Lines 14046 14051 +5
Branches 4354 4354
==========================================
+ Hits 11400 11408 +8
+ Misses 2480 2477 -3
Partials 166 166 ☔ 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!
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!
NOTE: there is a test story that should be removed before merge
Closes #17274
This PR updates the Tab component to scroll programmatically selected tabs into view, regardless of tab
activation
typePrior to this PR, Tabs in manual
activation
mode would only scroll when the active tab changed. Normally this is not an issue but when the selected tab is modified programmatically, the lack of user interaction means the selection does not occur on the active tab.By splitting the existing
useIsomorphicEffect
into two separate hooks, they can handlemanual
andauto
activation modes separately. This ensures that the component will scroll as needed both when changing the selected tab and when changing the active tab in manual `activation modeChangelog
New
scrollTabIntoView
Tab methodChanged
useIsomorphicEffect
that handled scrolling into two distinctuseIsomorphicEffect
s for eachactivation
modeTesting / Reviewing