Skip to content

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Aug 12, 2024

What?

Extracted from #63569

Export the useCompositeStore hook from the @wordpress/components package and add focus-related props to Composite and Composite.Item components.

Why?

These APIs are needed in the repository, as discovered while working on #63569

How?

By adding exports, TypeScript definintions, JSDocs, Storybook docs, and README docs.

Testing Instructions

  • There shouldn't be any runtime changes for existing Composite consumers
  • Open Storybook, make sure that the newly added props are correctly documented
  • In a IDE supporting TypeScript, make sure that the newly added props work as expected with autocompetion, and that the associated JSDocs are correct
  • Check the Composite README and make sure that the newly added props are properly documented\

@ciampo ciampo requested a review from ajitbohra as a code owner August 12, 2024 16:23
@github-actions
Copy link

github-actions bot commented Aug 12, 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 self-assigned this Aug 12, 2024
@ciampo ciampo added [Package] Components /packages/components [Type] New API New API to be used by plugin developers or package users. labels Aug 12, 2024
@ciampo ciampo requested a review from a team August 12, 2024 16:24
@ciampo ciampo force-pushed the feat/stabilize-composite/add-props-and-exports branch from 2d059f1 to eaf87f0 Compare August 12, 2024 16:26
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.

LGTM 👍

Thanks for splitting it out 🚀

@ciampo ciampo merged commit f9268de into trunk Aug 13, 2024
@ciampo ciampo deleted the feat/stabilize-composite/add-props-and-exports branch August 13, 2024 09:00
@github-actions github-actions bot added this to the Gutenberg 19.1 milestone Aug 13, 2024
getdave pushed a commit that referenced this pull request Aug 14, 2024
…#64450)

* Export useCompositeStore from package

* Add `accessibleWhenDisabled` prop to `Composite.Item`

* Add `focusable`, `disabled`, `accessibleWhenDisabled`, and `onFocusVisible` props to `Composite`

* CHANGELOG

---

Co-authored-by: ciampo <[email protected]>
Co-authored-by: tyxla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Components /packages/components [Type] New API New API to be used by plugin developers or package users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants