Add isCollapsible to the card layout in DataForm#72540
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.
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.
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.
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