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

Tabs: use correct ariakit type for root component #68207

Merged
merged 1 commit into from
Dec 23, 2024
Merged

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Dec 20, 2024

What?

Fix prop type definitions for the Tabs component by importing type defs from the correct ariakit component

Why?

Correctness

How?

Change from TabProps (the single tab) to TabProviderProps (the tab provider)

Testing Instructions

  • No TS errors
  • Same Storybook computed prop types
  • Smoke test the Tabs component

Copy link

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

@ciampo ciampo self-assigned this Dec 22, 2024
@ciampo ciampo requested a review from a team December 22, 2024 14:46
@ciampo ciampo added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Dec 22, 2024
@ciampo ciampo marked this pull request as ready for review December 22, 2024 14:46
@ciampo ciampo requested a review from ajitbohra as a code owner December 22, 2024 14:46
Copy link

github-actions bot commented Dec 22, 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 <[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.

@ciampo ciampo changed the title Tabs: use correct ariakit component for root component types Tabs: use correct ariakit type for root component Dec 22, 2024
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.

Makes sense, LGTM 👍

@@ -22,7 +22,7 @@ export type TabsProps = {
* `Tabs.Tablist` component and as many instances of the `Tabs.TabPanel`
* components as there are `Tabs.Tab` components.
*/
children: Ariakit.TabProps[ 'children' ];
children: Ariakit.TabProviderProps[ 'children' ];
Copy link
Member

Choose a reason for hiding this comment

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

Now it all makes sense! 👍

@ciampo ciampo merged commit 2e590d0 into trunk Dec 23, 2024
72 of 74 checks passed
@ciampo ciampo deleted the feat/tabs-fix-types branch December 23, 2024 10:21
@github-actions github-actions bot added this to the Gutenberg 20.0 milestone Dec 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] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants