Skip to content

fix(Tabs): add Storybook controls - #22992

Open
Subhom1 wants to merge 1 commit into
carbon-design-system:mainfrom
Subhom1:fix-tabs-storybook-controls-20954
Open

fix(Tabs): add Storybook controls#22992
Subhom1 wants to merge 1 commit into
carbon-design-system:mainfrom
Subhom1:fix-tabs-storybook-controls-20954

Conversation

@Subhom1

@Subhom1 Subhom1 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Closes #20954

Adds operative Storybook controls and default args to the remaining Tabs stories in @carbon/react and @carbon/web-components, keeping the two flagship implementations aligned for the applicable Tabs story variants.

Changelog

New

  • Added explicit Storybook args for React icon-only Tabs badge indicator stories.
  • Added size controls for React and Web Components manual Tabs stories.
  • Added size controls for React and Web Components contained secondary-label Tabs stories.
  • Added contained controls for React and Web Components Tabs skeleton stories.

Changed

  • Limited Web Components contained Tabs size options to supported contained sizes: sm, md, and lg.
  • Removed unused React contained plumbing from the dismissable-with-icons line Tabs story.

Removed

  • None.

Testing / Reviewing

  1. Use the repository Node version:

    nvm use
    
  2. Run focused tests and checks:

    yarn jest packages/react/src/components/Tabs/__tests__/Tabs-test.js --runInBand
    yarn jest packages/react/src/components/Tabs/__tests__/TabsSkeleton-test.js --runInBand
    yarn prettier --check packages/react/src/components/Tabs/Tabs.stories.js packages/web-components/src/components/tabs/tabs.stories.ts
    yarn eslint --no-warn-ignored --max-warnings 0 packages/react/src/components/Tabs/Tabs.stories.js packages/web-components/src/components/tabs/tabs.stories.ts
    yarn workspace @carbon/react storybook:build
    yarn workspace @carbon/web-components storybook:build
    
  3. In React Storybook, open Components/Tabs and verify:

    • Manual exposes a working size control.
    • Icon20Only, IconOnly, and the visual snapshot icon stories expose a working badgeIndicator control.
    • ContainedWithSecondaryLabels and ContainedWithSecondaryLabelsAndIcons expose working contained size controls.
    • Skeleton exposes a working contained control.
  4. In Web Components Storybook, open Components/Tabs and verify:

    • Manual exposes a working size control.
    • ContainedWithSecondaryLabels and ContainedWithSecondaryLabelsAndIcons expose working contained size controls.
    • skeleton exposes a working contained control.
    • Contained size controls offer only sm, md, and lg.

Test Screenshots
Screenshot 2026-08-12 at 12 26 59 a m

PR Checklist

As the author of this PR, before marking ready for review, confirm you:

  • Reviewed every line of the diff
  • Updated documentation and storybook examples
  • Wrote passing tests that cover this change
  • Addressed any impact on accessibility (a11y)
  • Tested for cross-browser consistency
  • Validated that this code is ready for review and status checks should pass

More details can be found in the pull request guide

@Subhom1
Subhom1 requested a review from a team as a code owner August 11, 2026 23:27
@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for v2-carbon-react ready!

Name Link
🔨 Latest commit 980680e
🔍 Latest deploy log https://app.netlify.com/projects/v2-carbon-react/deploys/6a7bafd202c35800085dd574
😎 Deploy Preview https://deploy-preview-22992--v2-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 980680e
🔍 Latest deploy log https://app.netlify.com/projects/v3-carbon-web-components/deploys/6a7bafd276fee70008f99ec9
😎 Deploy Preview https://deploy-preview-22992--v3-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 980680e
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/6a7bafd2dbd41b0008ff0fd4
😎 Deploy Preview https://deploy-preview-22992--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 980680e
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/6a7bafd25bddb900085f8ab5
😎 Deploy Preview https://deploy-preview-22992--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 980680e
🔍 Latest deploy log https://app.netlify.com/projects/carbon-elements/deploys/6a7bafd29aa35d00097750ae
😎 Deploy Preview https://deploy-preview-22992--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.50%. Comparing base (99da562) to head (980680e).
⚠️ Report is 45 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22992      +/-   ##
==========================================
- Coverage   89.59%   89.50%   -0.09%     
==========================================
  Files         582      604      +22     
  Lines       53317    57260    +3943     
  Branches     7319     7814     +495     
==========================================
+ Hits        47769    51252    +3483     
- Misses       5411     5857     +446     
- Partials      137      151      +14     
Flag Coverage Δ
main-packages 87.31% <ø> (-0.31%) ⬇️
web-components 90.22% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Tabs]: add controls args to every story

1 participant