fix: hide fixed unknown Pagination story controls#22008
Conversation
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
maradwan26
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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 |
|
Yeah The PR refactored all usages to use |
0875c90
|
I've opened #22163 to address some of the inconsistencies around hidden controls. |
Closes #21156
Locked unknown
Paginationstory controls.Changelog
Changed
Paginationstory 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.
totalItemswasn’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:
Wrote passing tests that cover this changeAddressed any impact on accessibility (a11y)More details can be found in the pull request guide