fix(ChatButton): add Storybook controls - #23040
Conversation
✅ Deploy Preview for v2-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v3-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ 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. |
✅ Deploy Preview for carbon-elements 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 #23040 +/- ##
=======================================
Coverage 89.81% 89.81%
=======================================
Files 614 614
Lines 55161 55161
Branches 7863 7853 -10
=======================================
Hits 49541 49541
Misses 5474 5474
Partials 146 146
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
[AI agent review — Carbon grounded] · Looks Good Reviewed by: bob · Commit: 590c3d7 RecommendationNo issues found. No blocking or major issues were found. Any nit-level notes below are entirely optional and provided for completeness. SummaryThis PR converts the React and Web Components ChatButton stories from hardcoded multi-button demos to args-driven stories with operative Storybook controls, and removes the now-unused story-only SCSS files. No confirmed findings. DetailsReview artifacts:
Estimated Token Usage:
Note: Token estimates are approximate and based on character count (1 token ≈ 4 characters). An AI agent generated this review. Human review is advised before acting on any findings. |
Closes #20972
Adds Storybook controls to the preview
ChatButtonstories in both React and Web Components. The stories now use args-driven examples so every visible control is operative, with parity for button text, state, kind, size, icon, click action, and skeleton size.Changelog
New
Skeletonstory with asizecontrol.Skeletonstory with asizecontrol.Changed
preview__ChatButtonstory from a hardcoded multi-button demo to an args-drivenDefaultstory.Chat buttonstory from a hardcoded multi-button demo to an args-drivenDefaultstory.Removed
Testing / Reviewing
Use the repository Node version and start Storybook:
Open the React
Preview/preview__ChatButtonstories.Verify the React
Defaultcontrols:childrenupdates the button text.classNameis passed through.disabled,isQuickAction, andisSelectedupdate the visible state.kindswitches betweenprimary,secondary,tertiary,ghost, anddanger.renderIconswitches between the Add icon and no icon.sizeswitches betweensm,md, andlg.onClickaction.Verify the React
Skeletonstory:sizeswitches betweensm,md, andlg.Open the Web Components
Preview/Chat buttonstories.Verify the Web Components
Defaultcontrols:childrenupdates the button text.disabled,isQuickAction, andisSelectedupdate the visible state.kindswitches betweenprimary,secondary,tertiary,ghost, anddanger.iconswitches between the Add icon slot and no icon.sizeswitches betweensm,md, andlg.onClickaction.Verify the Web Components
Skeletonstory:sizeswitches betweensm,md, andlg.Run the focused tests and checks:
PR Checklist
As the author of this PR, before marking ready for review, confirm you:
Tested for cross-browser consistencyMore details can be found in the pull request guide