Storybook: Add stories for the TextAlignmentControl component#67371
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the PR!
Both the value prop and the classname prop can be changed in a story, so splitting them all out as stories seems a bit redundant 😅
Can't we just leave them as one story?
packages/block-editor/src/components/text-alignment-control/stories/index.story.js
Outdated
Show resolved
Hide resolved
packages/block-editor/src/components/text-alignment-control/stories/index.story.js
Show resolved
Hide resolved
packages/block-editor/src/components/text-alignment-control/stories/index.story.js
Show resolved
Hide resolved
packages/block-editor/src/components/text-alignment-control/stories/index.story.js
Outdated
Show resolved
Hide resolved
|
Thanks, @t-hamano for the wonderful suggestions. I have addressed all the feedback and created a screencast of the new changes. Please let me if it tests well for you. Screen.Recording.2024-12-10.at.20.26.23.mov |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the update! I left some small suggestions at the end, but it works fine 👍
packages/block-editor/src/components/text-alignment-control/stories/index.story.js
Outdated
Show resolved
Hide resolved
packages/block-editor/src/components/text-alignment-control/stories/index.story.js
Outdated
Show resolved
Hide resolved
packages/block-editor/src/components/text-alignment-control/stories/index.story.js
Outdated
Show resolved
Hide resolved
|
Thanks again for the follow-ups @t-hamano! The suggestions help simplify the structure further. I have addressed all the feedback 👍🏻 |
t-hamano
left a comment
There was a problem hiding this comment.
LGTM! Thank you fo your work 👍
packages/block-editor/src/components/text-alignment-control/stories/index.story.js
Outdated
Show resolved
Hide resolved
…ess#67371) * Storybook: Add stories for the text-alignment-control component * Storybook: Update TextAlignmentControl story to follow best practices and simplify the structure * Storybook: Simplify TextAlignmentControl story * Storybook: Simplify the documentation for TextAlignmentControl story Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
…ess#67371) * Storybook: Add stories for the text-alignment-control component * Storybook: Update TextAlignmentControl story to follow best practices and simplify the structure * Storybook: Simplify TextAlignmentControl story * Storybook: Simplify the documentation for TextAlignmentControl story Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Part of #67165
What?
This PR improves the Storybook stories for the TextAlignmentControl component in the block editor. It includes comprehensive stories demonstrating different text alignment states.
Why?
As part of the ongoing effort to improve component documentation and testing (tracked in #22891), we need comprehensive stories for all Block Editor components. This PR helps users and developers better understand the TextAlignmentControl component's capabilities and usage.
Testing Instructions
npm run storybook:devScreencast
text-alignment-control-story.mov