-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 BlockAlignmentControl and BlockAlignmentToolbar components #67233
base: trunk
Are you sure you want to change the base?
Conversation
Size Change: 0 B Total Size: 1.83 MB ℹ️ View Unchanged
|
…-alignment-control-stories
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!
While reviewing this PR, I noticed that the documentation for this component itself is insufficient. Not all props that are actually supported are documented.
Specifically, controls
and isCollapsed
. As for the isToolbar prop
, it is determined internally depending on whether you use BlockAlignmentControl
or BlockAlignmentToolbar
, so there is no need to document it.
Could you investigate the behavior of these two and reflect it in the README and Storybook?
argTypes: { | ||
value: { | ||
control: { type: null }, | ||
defaultValue: 'undefined', |
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.
defaultValue
is deprecated so let's remove it. It should not affect behavior.
argTypes: { | ||
value: { | ||
control: { type: null }, | ||
defaultValue: 'undefined', |
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.
defaultValue
is deprecated so let's remove it. It should not affect behavior.
*/ | ||
const meta = { | ||
title: 'BlockEditor/BlockAlignmentToolbar', | ||
component: BlockAlignmentToolbar, |
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.
component: BlockAlignmentToolbar, | |
component: BlockAlignmentToolbar, | |
parameters: { | |
docs: { canvas: { sourceState: 'shown' } }, | |
}, |
Let's show the Source panel.
Part of #67165
What?
This PR will add stories for
BlockAlignmentControl
andBlockAlignmentToolbar
components in the StorybookWhy?
Most of Block Editor components don't have stories.
Testing Instructions
npm run storybook:dev
BlockAlignmentControl
andBlockAlignmentControl
stories.Screenshots or screencast
BlockEditor-BlockAlignmentControl---Docs-.-Storybook.webm