Skip to content

Conversation

@mirka
Copy link
Member

@mirka mirka commented Aug 28, 2025

What?

Adds documentation to the ControlWithError component explaining how it handles cloned children.

Why?

The ControlWithError component clones its child element to inject enhanced props, but this behavior wasn't documented. This is important because certain behavior will not work if the root-level component of children doesn't handle these injected props (for example if there's a wrapper div around the main control that doesn't forward the necessary props — which happened in #71350 (comment)).

@mirka mirka self-assigned this Aug 28, 2025
@mirka mirka added [Type] Developer Documentation Documentation for developers [Package] Components /packages/components labels Aug 28, 2025
@mirka mirka marked this pull request as ready for review September 3, 2025 08:31
@mirka mirka requested a review from ajitbohra as a code owner September 3, 2025 08:31
@github-actions
Copy link

github-actions bot commented Sep 3, 2025

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mirka <[email protected]>
Co-authored-by: tyxla <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@mirka mirka requested a review from a team September 3, 2025 08:31
Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks!

@github-actions
Copy link

github-actions bot commented Sep 3, 2025

Flaky tests detected in 4b6f8f4.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17307737882
📝 Reported issues:

@mirka mirka merged commit f51da68 into trunk Sep 4, 2025
67 of 68 checks passed
@mirka mirka deleted the control-with-error-docs branch September 4, 2025 07:12
@github-actions github-actions bot added this to the Gutenberg 21.7 milestone Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Components /packages/components [Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants