Skip to content

fix: hide fixed unknown Pagination story controls#22008

Merged
heloiselui merged 3 commits into
carbon-design-system:mainfrom
adamalston:21156-pagination
Apr 24, 2026
Merged

fix: hide fixed unknown Pagination story controls#22008
heloiselui merged 3 commits into
carbon-design-system:mainfrom
adamalston:21156-pagination

Conversation

@adamalston

Copy link
Copy Markdown
Contributor

Closes #21156

Locked unknown Pagination story controls.

Changelog

Changed

  • Locked unknown Pagination story controls.

Testing / Reviewing

I wasn’t sure whether the "remove" statement in the issue was meant literally or intended to restrict modification of the controls. I went with the latter, since the controls themselves are valid, but users should not be able to change them in this specific story. If the former is preferred, let me know.

totalItems wasn’t mentioned in the issue, but it seemed like it should be locked too.

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

@netlify

netlify Bot commented Apr 12, 2026

Copy link
Copy Markdown

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9e9e522
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/69e6593e32128f0008ef5b8b
😎 Deploy Preview https://deploy-preview-22008--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 project configuration.

@netlify

netlify Bot commented Apr 12, 2026

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 9e9e522
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/69e6593ee3c8120007cce28c
😎 Deploy Preview https://deploy-preview-22008--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 project configuration.

@codecov

codecov Bot commented Apr 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.01%. Comparing base (597001a) to head (9e9e522).
⚠️ Report is 62 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22008      +/-   ##
==========================================
+ Coverage   94.90%   95.01%   +0.10%     
==========================================
  Files         541      538       -3     
  Lines       45253    44982     -271     
  Branches     6359     6487     +128     
==========================================
- Hits        42949    42739     -210     
+ Misses       2172     2114      -58     
+ Partials      132      129       -3     
Flag Coverage Δ
main-packages 89.03% <ø> (-0.14%) ⬇️
web-components 97.86% <ø> (+0.15%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@maradwan26 maradwan26 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wasn’t sure whether the "remove" statement in the issue was meant literally or intended to restrict modification of the controls. I went with the latter, since the controls themselves are valid, but users should not be able to change them in this specific story. If the former is preferred, let me know.

Yeah it meant the former. If a control does nothing/isn't appropriate for the story, it should be removed from the control panel with a

parameters: {
    controls: {
      exclude: [
       ...
      ],
    },
  },

@maradwan26 maradwan26 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a suggestion to use parameters instead of argTypes for this. It'll have the same result but is a lot cleaner. Not exactly blocking

Comment thread packages/react/src/components/Pagination/Pagination.stories.js Outdated
Comment thread packages/web-components/src/components/pagination/pagination.stories.ts Outdated
@adamalston adamalston changed the title fix: lock unknown Pagination story controls fix: hide fixed unknown Pagination story controls Apr 20, 2026
@adamalston

Copy link
Copy Markdown
Contributor Author

Just a suggestion to use parameters instead of argTypes for this. It'll have the same result but is a lot cleaner. Not exactly blocking

There's a lot of code in the codebase that uses disabled argTypes rather than exclude, which is part of why I chose the argTypes approach in a1b8fa2. Are you suggesting this code should use exclude instead?

@maradwan26

Copy link
Copy Markdown
Contributor

@adamalston

Yeah exclude/include is the preferred approach since it's cleaner. There was a PR a little bit ago that cleaned this up throughout the whole codebase but I guess some have been slipping by in later PRs.

The PR refactored all usages to use exclude/include with the exception of controls that we wanted to also be hidden in the Overview page like some deprecated/unusable props

@heloiselui heloiselui left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@heloiselui heloiselui added this pull request to the merge queue Apr 24, 2026
Merged via the queue into carbon-design-system:main with commit 0875c90 Apr 24, 2026
39 checks passed
@adamalston adamalston deleted the 21156-pagination branch April 24, 2026 11:59
@adamalston

Copy link
Copy Markdown
Contributor Author

I've opened #22163 to address some of the inconsistencies around hidden controls.

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]: some unused pagination props can be removed

3 participants