From 0010b710911441fe9ecbcda21ec98ed43557e869 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Wed, 14 Aug 2024 16:52:24 +0200 Subject: [PATCH 1/4] Remove exports from `@wordpress/components` package --- packages/components/src/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index cd6d2a77db9cb..6483e34dc222a 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -62,7 +62,6 @@ export { CompositeItem as __unstableCompositeItem, useCompositeState as __unstableUseCompositeState, } from './composite/legacy'; -export { Composite, useCompositeStore } from './composite'; export { ConfirmDialog as __experimentalConfirmDialog } from './confirm-dialog'; export { default as CustomSelectControl } from './custom-select-control'; export { default as Dashicon } from './dashicon'; From 24d16e0edf34f59f5caed98a85107bbdc94c3106 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Wed, 14 Aug 2024 16:52:39 +0200 Subject: [PATCH 2/4] Update Storybook --- .../components/src/composite/legacy/stories/index.story.tsx | 3 +-- packages/components/src/composite/stories/index.story.tsx | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/components/src/composite/legacy/stories/index.story.tsx b/packages/components/src/composite/legacy/stories/index.story.tsx index 1b8e07e9bbf56..e46d656a16810 100644 --- a/packages/components/src/composite/legacy/stories/index.story.tsx +++ b/packages/components/src/composite/legacy/stories/index.story.tsx @@ -15,8 +15,7 @@ import { import { UseCompositeStatePlaceholder, transform } from './utils'; const meta: Meta< typeof UseCompositeStatePlaceholder > = { - title: 'Components (Deprecated)/Composite (Unstable)', - id: 'components-composite-unstable', + title: 'Components/Composite', component: UseCompositeStatePlaceholder, subcomponents: { Composite, diff --git a/packages/components/src/composite/stories/index.story.tsx b/packages/components/src/composite/stories/index.story.tsx index 405962b92a761..034e1d6721f7b 100644 --- a/packages/components/src/composite/stories/index.story.tsx +++ b/packages/components/src/composite/stories/index.story.tsx @@ -15,7 +15,7 @@ import { Composite, useCompositeStore } from '..'; import { UseCompositeStorePlaceholder, transform } from './utils'; const meta: Meta< typeof UseCompositeStorePlaceholder > = { - title: 'Components/Composite', + title: 'Components/Composite (V2)', component: UseCompositeStorePlaceholder, subcomponents: { // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170 @@ -50,6 +50,7 @@ const meta: Meta< typeof UseCompositeStorePlaceholder > = { options: [ 'horizontal', 'vertical', 'both' ], }, }, + tags: [ 'status-private' ], parameters: { controls: { expanded: true }, docs: { From 406c83a49fc2e5e1e82d5bcf5c90b61c97795b81 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Wed, 14 Aug 2024 16:52:47 +0200 Subject: [PATCH 3/4] Update CHANGELOG --- packages/components/CHANGELOG.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 594bb47e187d5..7b3a2aea460d9 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -19,13 +19,6 @@ - `ToggleGroupControl` - `TreeSelect` -### New Features - -- `Composite`: add stable version of the component ([#63564](https://github.com/WordPress/gutenberg/pull/63564)). -- `Composite`: add `Hover` and `Typeahead` subcomponents ([#64399](https://github.com/WordPress/gutenberg/pull/64399)). -- `Composite`: export `useCompositeStore`, add focus-related props to `Composite`and`Composite.Item` subcomponents ([#64450](https://github.com/WordPress/gutenberg/pull/64450)). -- `Composite`: add `Context` subcomponent ([#64493](https://github.com/WordPress/gutenberg/pull/64493)). - ### Enhancements - `Composite`: improve Storybook examples and add interactive controls ([#64397](https://github.com/WordPress/gutenberg/pull/64397)). @@ -34,6 +27,12 @@ - `TimePicker`: add `hideLabelFromVision` prop ([#64267](https://github.com/WordPress/gutenberg/pull/64267)). - `DropdownMenuV2`: adopt elevation scale ([#64432](https://github.com/WordPress/gutenberg/pull/64432)). +### Internal + +- `Composite` v2: add `Hover` and `Typeahead` subcomponents ([#64399](https://github.com/WordPress/gutenberg/pull/64399)). +- `Composite` v2: add focus-related props to `Composite`and`Composite.Item` subcomponents ([#64450](https://github.com/WordPress/gutenberg/pull/64450)). +- `Composite` v2: add `Context` subcomponent ([#64493](https://github.com/WordPress/gutenberg/pull/64493)). + ## 28.5.0 (2024-08-07) ### Bug Fixes From 92961ba628ed761f91bb63729571fd509f2bdf6c Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Wed, 14 Aug 2024 16:53:27 +0200 Subject: [PATCH 4/4] README --- packages/components/src/composite/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/components/src/composite/README.md b/packages/components/src/composite/README.md index 76e345b16d13f..35881d815cf1b 100644 --- a/packages/components/src/composite/README.md +++ b/packages/components/src/composite/README.md @@ -1,5 +1,9 @@ # `Composite` +
+This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes. +
+ `Composite` provides a single tab stop on the page and allows navigation through the focusable descendants with arrow keys. This abstract component is based on the [WAI-ARIA Composite Role⁠](https://w3c.github.io/aria/#composite). ## Usage