Skip to content

Conversation

@edleeks87
Copy link
Contributor

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.

Proposed behaviour

Updates legacy Tabs to map old interface to next version of the component, the next versions are now rendered when importing the legacy versions
Marks relevant props on legacy interface as deprecated

Current behaviour

Legacy Tabs does not render next versions of components

Checklist

  • Commits follow our style guide
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Typescript d.ts file added or updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

@edleeks87 edleeks87 self-assigned this Jan 22, 2026
@edleeks87 edleeks87 marked this pull request as ready for review January 22, 2026 10:54
@edleeks87 edleeks87 requested review from a team as code owners January 22, 2026 10:54
@edleeks87 edleeks87 requested a review from Copilot January 26, 2026 14:30
@edleeks87 edleeks87 marked this pull request as draft January 26, 2026 14:31
Copy link

Copilot AI left a 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 Tabs and Tab component 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`};
Copy link

Copilot AI Jan 26, 2026

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.

Suggested change
max-width: ${$headerWidth ?? `${VERTICAL_TAB_WIDTH}px`};

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant