-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add isCollapsible to the card layout in DataForm #72540
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
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @dmallory42. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
|
Flaky tests detected in ca04f4b. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18871775254
|
| label: 'Important information', | ||
| layout: { | ||
| type: 'card', | ||
| isCollapsible: false, |
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'd be nice to have this as an argument to the story, like withHeader is, to act as an educational tool for readers.
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.
I agree, I added it and removed this new card. Here's how it looks:
CleanShot.2025-10-23.at.11.45.09.mp4
|
I need to check the logic with a fresher brain, and can review later if nobody else beats me to it. But direction looks good. |
|
@elazzabi the README (see card documentation) needs to be updated as well. |
oandregal
left a comment
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.
I've left two comments (README, and useCardHeader hook) I'd like us to address before merging, but this is good to go.
What?
This adds support for the
isCollapsiblefield in thecardlayout. To keep backward compatibility, if the field isn't defined, it defaults totrue.Why?
Non-collapsible cards can be used to display important details or when only one card is present on a page.
Testing Instructions
Screenshots or screencast