-
Notifications
You must be signed in to change notification settings - Fork 4.6k
DataForm: Card bordless layout
#72514
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
Conversation
…ate size type definitions
…ate size type definitions
1e9892e to
30c314b
Compare
…WordPress/gutenberg into add/card-bordless-layout
…d-support-more-padding-options
…WordPress/gutenberg into add/card-bordless-layout
…d-support-more-padding-options
…d-support-more-padding-options
…WordPress/gutenberg into add/card-bordless-layout
|
Flaky tests detected in 6e6cc81. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19076570659
|
|
Size Change: +89 B (0%) Total Size: 2.19 MB
ℹ️ View Unchanged
|
d0d48e0 to
7fd6753
Compare
…d-support-more-padding-options
…WordPress/gutenberg into add/card-bordless-layout
|
On the engineering side, this PR is blocked by #72511, but @jameskoster I think that you can review this PR design-wise. |
|
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. |
|
With ef00ee3, I fixed a bug in Storybook. The
|
| [ field ] | ||
| ); | ||
|
|
||
| const sizeCard = layout.withHeader |
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.
Can sizeCard be collocated with sizeCardBody? Moreover, why this only depends on the card having a header but sizeCardBody depends on both the field having a label and the layout having a header?
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.
Good point! I simplified the logic with 6e6cc81.
It would be great if you can take another look!
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.
It's clearer now, thanks.
In terms of types, I feel we could use the SizeOptions type to type the size objects (either sizeCardBody: SizeOptions or { ... } satifies SizeOptions) as that leverages the TypeScript power (as opposed to as const that doesn't provide any help in refactoring, documentation, etc.).
|
@gigitux what should happen when the card is not collapsible? This is what the storybook reports:
|
|
Are you running the updated version of this branch? I'm not able to replicate it: Screen.Capture.on.2025-11-04.at.17-21-26.mp4Also see the video in this comment. |
Oh, I wasn't 😅 Updated and everything works fine. The spacing for headerless cards looks a bit unbalanced to me, but it's a design detail I'll let others comment on:
Other than this, this is ready code-wise, so I'm pre-approving. |
I feel the same, but I followed the specs 24px padding overall, except for the CardBody’s padding-top, which is 0. @jameskoster should we go ahead and merge this or tweak it a bit further? |
|
I agree the spacing in the headerless card is strange, but it's caused the internal |
|
The Screen.Capture.on.2025-11-05.at.12-29-24.movIf you agree, I think that we can merge the PR as it is. @oandregal maybe we can override the style of the
|
|
@gigitux sounds good to me. 👍 |
…ved layout consistency



What?
Improve the DataViews Card layout making it borderless. Padding is 24px for all the sides except for the padding top on the card body, which is 0.
Testing Instructions