-
Notifications
You must be signed in to change notification settings - Fork 84
feat(tabs, tab): map legacy interface onto next version of components #7728
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: master
Are you sure you want to change the base?
Conversation
7645d02 to
aeb805d
Compare
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.
Pull request overview
This PR maps the legacy Tabs and Tab component interface to the next version, facilitating migration by rendering the next version when using the legacy import. Several legacy features have been removed as they could not be maintained in the new implementation.
Changes:
- Maps legacy
TabsandTabcomponent props to the next version implementation - Replaces deprecation warnings with migration warnings
- Removes legacy internal components and styling files
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/components/tabs/tabs.component.tsx |
Maps legacy props to next version, renders NextTabs wrapper |
src/components/tabs/tab/tab.component.tsx |
Maps legacy Tab props to NextTab, composes label from title/siblings/customLayout |
src/components/tabs/tabs.test.tsx |
Simplified tests focusing on next version behavior |
src/components/tabs/tabs.stories.tsx |
Updated stories removing deprecated features |
src/components/tabs/__next__/tabs.component.tsx |
Added support for href, hasCustomLayout, headerWidth props |
src/components/tabs/__next__/tabs.style.ts |
Updated styled components with transient props and headerWidth support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| border-bottom-right-radius: 0px; | ||
| border-top-left-radius: 8px; | ||
| border-top-right-radius: 0px; | ||
| max-width: ${$headerWidth ?? `${VERTICAL_TAB_WIDTH}px`}; |
Copilot
AI
Jan 26, 2026
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.
Setting both max-width and width to the same value on lines 269-270 makes max-width redundant. If the intent is to allow tabs to be narrower, only set max-width. If the intent is to enforce exact width, only set width.
| max-width: ${$headerWidth ?? `${VERTICAL_TAB_WIDTH}px`}; |
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.
Will update
Maps the legacy interface to the next version of `Tabs` and `Tab`. Marks relevant props as deprecated and adds Logger warning to inform consumers of future removal etc.
aeb805d to
2fa8551
Compare
Maps the legacy interface to the next version of
TabsandTab. Marks relevant props as deprecated and adds Logger warning to inform consumers of future removal etc.Proposed behaviour
Updates legacy Tabs to map old interface to
nextversion of the component, the next versions are now rendered when importing the legacy versionsMarks relevant props on legacy interface as deprecated
Current behaviour
Legacy Tabs does not render next versions of components
Checklist
d.tsfile added or updated if requiredQA
Additional context
Testing instructions