-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storybook: Add stories for the TextAlignmentControl component #67371
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]> Co-authored-by: t-hamano <[email protected]>
…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 <[email protected]> Co-authored-by: t-hamano <[email protected]>
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:dev
Screencast
text-alignment-control-story.mov