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

Tooltip: accept specific tooltip props #58125

Merged
merged 2 commits into from
Jan 23, 2024
Merged

Tooltip: accept specific tooltip props #58125

merged 2 commits into from
Jan 23, 2024

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Jan 23, 2024

What?

Narrow the type associated to the Tooltip component's prop to only the explicit component's props

Why?

The type was widened in #57202, but the change is not necessary anymore after #57878 (and it can cause the component to behave unexpectedly in some cases).

How?

By not using WordPressComponentProps when defining the type of the props object.

Testing Instructions

This PR doesn't include any runtime changes.
Make sure that tests pass and that the project builds correctly.

@ciampo ciampo added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels Jan 23, 2024
@ciampo ciampo requested a review from mirka January 23, 2024 13:16
@ciampo ciampo self-assigned this Jan 23, 2024
Copy link
Member

@mirka mirka left a comment

Choose a reason for hiding this comment

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

🚀

Copy link

github-actions bot commented Jan 23, 2024

Flaky tests detected in 7037929.
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/7626771912
📝 Reported issues:

@ciampo ciampo enabled auto-merge (squash) January 23, 2024 13:56
@ciampo ciampo merged commit 9b71fec into trunk Jan 23, 2024
56 checks passed
@ciampo ciampo deleted the fix/tooltip-rest-props branch January 23, 2024 14:27
@github-actions github-actions bot added this to the Gutenberg 17.6 milestone Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
Status: Done 🎉
Development

Successfully merging this pull request may close these issues.

2 participants