Skip to content
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

BaseControl: forward ref on VisualLabel #63169

Merged
merged 3 commits into from
Jul 5, 2024

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Jul 5, 2024

What?

Extracted from #63137

Allow ref forwarding on BaseControl.VisualLabel

Why?

For better composition with other components.

How?

Wrapped BaseControl.VisualLabel in a React.forwardRef

Testing Instructions

Smoke test Storybook and the editor, make sure everything looks and behaves as normal

@ciampo ciampo self-assigned this Jul 5, 2024
@ciampo ciampo requested a review from ajitbohra as a code owner July 5, 2024 07:34
@ciampo ciampo requested a review from a team July 5, 2024 07:35
Copy link

github-actions bot commented Jul 5, 2024

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: ciampo <mciampini@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>

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

@ciampo ciampo added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components labels Jul 5, 2024
Copy link

github-actions bot commented Jul 5, 2024

Flaky tests detected in 11b1c81.
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/9804807507
📝 Reported issues:

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.

Straightforward change, LGTM 👍

@ciampo ciampo merged commit b8344b6 into trunk Jul 5, 2024
62 checks passed
@ciampo ciampo deleted the fix/base-control-label-forward-ref branch July 5, 2024 12:43
@github-actions github-actions bot added this to the Gutenberg 18.8 milestone Jul 5, 2024
carstingaxion pushed a commit to carstingaxion/gutenberg that referenced this pull request Jul 18, 2024
* BaseControl: forward ref on VisualLabel

* Remove unnecessary @ts-expect-error

* CHANGELOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants