-
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
ItemGroup: Improve stories to default to bordered and separated #66191
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.
LGTM 🚀
I wonder if we should also change the default snippet in the JSDoc and even add a little sentence in that snippet about usually needing to set the two properties to true
for the most typical visual styles.
isBordered: true, | ||
isSeparated: true, |
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.
Nit: for consistency with how we usually write the stories:
isBordered: true, | |
isSeparated: true, | |
...Default.args, |
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.
Sounds good, done in 5e26b6f
isBordered: true, | ||
isSeparated: true, |
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.
Same as above
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.
Addressed as part of 5e26b6f
This is exactly why I wanted to introduce this as a breaking change. If we need to explain this behavior, then it just doesn't make sense and needs to be changed. If y'all agree this is the best course of action, I'm happy to follow-up and address all |
Flaky tests detected in 5e26b6f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11382763697
|
…Press#66191) * ItemGroup: Improve stories to default to bordered * Inherit default story args Co-authored-by: tyxla <[email protected]> Co-authored-by: ciampo <[email protected]>
What?
Improves the
ItemGroup
stories to have bordered and separated styles.Why?
Because this is the most common usage and it demonstrates better how the component is composed.
How?
Enabling
isBordered
andisSeparated
for all stories, and inverting the "WithBorder" story to be a "WithoutBorder" one.Testing Instructions
Spin up a Storybook instance and test
ItemGroup
- go through all stories and ensure bordered and separated is now the default, and the non-bordered story works correctly.Testing Instructions for Keyboard
Same
Screenshots or screencast