Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/theme/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"files": [],
"references": [
{ "path": "../style-runtime" },
{ "path": "./tsconfig.src.json" },
{ "path": "./tsconfig.bin.json" }
{ "path": "./tsconfig.src.json" }

@aduth aduth Jun 4, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wouldn't expect this change. It means we're no longer type-checking files in bin. Was there a reason it was needed?

]
}
1 change: 1 addition & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

### Enhancements

- Storybook: Add `synonyms` on component story meta so design system components are discoverable by common search terms (e.g. `form` finds `Input`).
- `Tooltip.Provider`: Widen the types to accept all props of the equivalent `Tooltip.Provider` from `@base-ui/react` (types-only change) ([#78642](https://github.com/WordPress/gutenberg/pull/78642)).

## 0.14.0 (2026-05-27)
Expand Down
10 changes: 10 additions & 0 deletions packages/ui/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ const meta: Meta< typeof Button > = {
};
```

Add a `synonyms` array on the story meta so the component is discoverable in Storybook sidebar search (e.g. searching `form` finds `Input`):

```ts
const meta: Meta< typeof Input > = {
title: 'Design System/Components/Form/Primitives/Input',
synonyms: [ 'field', 'form', 'input', 'text', 'textbox' ],
component: Input,
};
```

## `render` Prop and Ref Forwarding

All `@wordpress/ui` components support a `render` prop (via the `ComponentProps` utility type) that lets consumers swap the underlying HTML element. This section codifies the two canonical implementation patterns, the rules for handling `render`, and common anti-patterns to avoid.
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/alert-dialog/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Text } from '../../text';

const meta: Meta< typeof AlertDialog.Root > = {
title: 'Design System/Components/AlertDialog',
synonyms: [ 'confirm', 'dialog', 'modal', 'popup' ],
component: AlertDialog.Root,
subcomponents: {
'AlertDialog.Trigger': AlertDialog.Trigger,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/badge/stories/choosing-intent.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Stack } from '../../stack';

const meta: Meta< typeof Badge > = {
title: 'Design System/Components/Badge/Choosing intent',
synonyms: [ 'chip', 'intent', 'label', 'status', 'tag' ],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tag is fine here, can we add that also to FormTokenField?

component: Badge,
decorators: [
( Story ) => (
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/badge/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Badge } from '../index';
const meta: Meta< typeof Badge > = {
tags: [ 'manifest' ],
title: 'Design System/Components/Badge',
synonyms: [ 'chip', 'label', 'status', 'tag' ],
component: Badge,
parameters: {
componentStatus: {
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/button/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Button } from '../index';

const meta: Meta< typeof Button > = {
title: 'Design System/Components/Button',
synonyms: [ 'action', 'cta', 'submit' ],
component: Button,
subcomponents: {
'Button.Icon': Button.Icon,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/card/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function Text( { children }: { children: React.ReactNode } ) {
const meta: Meta< typeof Card.Root > = {
tags: [ 'manifest' ],
title: 'Design System/Components/Card',
synonyms: [ 'container', 'panel', 'surface' ],
component: Card.Root,
subcomponents: {
'Card.Header': Card.Header,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/collapsible-card/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function Text( { children }: { children: React.ReactNode } ) {
const meta: Meta< typeof CollapsibleCard.Root > = {
tags: [ 'manifest' ],
title: 'Design System/Components/CollapsibleCard',
synonyms: [ 'accordion', 'card', 'expand' ],
component: CollapsibleCard.Root,
subcomponents: {
'CollapsibleCard.Header': CollapsibleCard.Header,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/collapsible/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as Collapsible from '../index';
const meta: Meta< typeof Collapsible.Root > = {
tags: [ 'manifest' ],
title: 'Design System/Components/Collapsible',
synonyms: [ 'accordion', 'disclosure', 'expand' ],
component: Collapsible.Root,
subcomponents: {
'Collapsible.Trigger': Collapsible.Trigger,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/dialog/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as Dialog from '../index';

const meta: Meta< typeof Dialog.Root > = {
title: 'Design System/Components/Dialog',
synonyms: [ 'modal', 'overlay', 'popup' ],
component: Dialog.Root,
subcomponents: {
'Dialog.Trigger': Dialog.Trigger,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/drawer/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as Drawer from '../index';

const meta: Meta< typeof Drawer.Root > = {
title: 'Design System/Components/Drawer',
synonyms: [ 'modal', 'overlay', 'panel', 'sheet' ],
component: Drawer.Root,
subcomponents: {
'Drawer.Trigger': Drawer.Trigger,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/empty-state/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as EmptyState from '../';
const meta: Meta< typeof EmptyState.Root > = {
tags: [ 'manifest' ],
title: 'Design System/Components/EmptyState',
synonyms: [ 'blank', 'no results', 'placeholder' ],
component: EmptyState.Root,
subcomponents: {
'EmptyState.Visual': EmptyState.Visual,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {

const meta: Meta< typeof InputControl > = {
title: 'Design System/Components/Form/InputControl',
synonyms: [ 'field', 'form', 'input', 'label', 'text' ],
component: InputControl,
argTypes: {
defaultValue: { control: false },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { COMMANDS, URLS, USERS, type FixtureItem } from './fixtures';

const meta: Meta< typeof Autocomplete.Root > = {
title: 'Design System/Components/Form/Primitives/Autocomplete',
synonyms: [ 'combobox', 'field', 'form', 'search', 'typeahead' ],
component: Autocomplete.Root,
subcomponents: {
'Autocomplete.Portal': Autocomplete.Portal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ import { ITEMS, type FixtureItem } from './fixtures';

const meta: Meta< typeof Combobox.Root > = {
title: 'Design System/Components/Form/Primitives/Combobox',
synonyms: [
'autocomplete',
'dropdown',
'field',
'form',
'search',
'select',
],
component: Combobox.Root,
subcomponents: {
'Combobox.Trigger': Combobox.Trigger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { DETAILS_EXAMPLE } from '../../../stories/shared';

const meta: Meta< typeof Field.Root > = {
title: 'Design System/Components/Form/Primitives/Field',
synonyms: [ 'field', 'form', 'label' ],
component: Field.Root,
subcomponents: {
'Field.Item': Field.Item,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { DETAILS_EXAMPLE } from '../../../stories/shared';

const meta: Meta< typeof Fieldset.Root > = {
title: 'Design System/Components/Form/Primitives/Fieldset',
synonyms: [ 'field', 'form', 'group' ],
component: Fieldset.Root,
subcomponents: {
'Fieldset.Legend': Fieldset.Legend,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { IconButton } from '../../../../icon-button';

const meta: Meta< typeof InputLayout > = {
title: 'Design System/Components/Form/Primitives/InputLayout',
synonyms: [ 'affix', 'field', 'form', 'prefix', 'suffix' ],
component: InputLayout,
subcomponents: {
'InputLayout.Slot': InputLayout.Slot,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { WithSuffixControl } from '../../input-layout/stories/index.story';

const meta: Meta< typeof Input > = {
title: 'Design System/Components/Form/Primitives/Input',
synonyms: [ 'field', 'form', 'input', 'text', 'textbox', 'text field' ],
component: Input,
argTypes: {
defaultValue: { control: false },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as Select from '../';

const meta: Meta< typeof Select.Root > = {
title: 'Design System/Components/Form/Primitives/Select',
synonyms: [ 'dropdown', 'field', 'form', 'picker', 'select' ],
component: Select.Root,
subcomponents: {
'Select.Trigger': Select.Trigger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Textarea } from '../index';

const meta: Meta< typeof Textarea > = {
title: 'Design System/Components/Form/Primitives/Textarea',
synonyms: [ 'field', 'form', 'multiline', 'text', 'textarea' ],
component: Textarea,
parameters: {
componentStatus: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {

const meta: Meta< typeof SelectControl > = {
title: 'Design System/Components/Form/SelectControl',
synonyms: [ 'dropdown', 'field', 'form', 'label', 'select' ],
component: SelectControl,
subcomponents: {
'SelectControl.Item': SelectControl.Item,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/icon-button/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import * as Tooltip from '../../tooltip';

const meta: Meta< typeof IconButton > = {
title: 'Design System/Components/IconButton',
synonyms: [ 'action', 'button', 'icon' ],
component: IconButton,
argTypes: {
'aria-pressed': {
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/icon/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Icon } from '../index';

const meta: Meta< typeof Icon > = {
title: 'Design System/Components/Icon',
synonyms: [ 'glyph', 'symbol', 'svg' ],
component: Icon,
tags: [ 'manifest' ],
decorators: [
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/link/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Text } from '../../text';

const meta: Meta< typeof Link > = {
title: 'Design System/Components/Link',
synonyms: [ 'anchor', 'hyperlink', 'navigation' ],
component: Link,
tags: [ 'manifest' ],
parameters: {
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/notice/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as Notice from '../index';

const meta: Meta< typeof Notice.Root > = {
title: 'Design System/Components/Notice',
synonyms: [ 'alert', 'banner', 'message', 'notification' ],
component: Notice.Root,
subcomponents: {
'Notice.Title': Notice.Title,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/popover/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { GenericIframe, useMeasure } from './utils';

const meta: Meta< typeof Popover.Root > = {
title: 'Design System/Components/Popover',
synonyms: [ 'dropdown', 'floating', 'overlay', 'popup' ],
component: Popover.Root,
subcomponents: {
'Popover.Trigger': Popover.Trigger,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/stack/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Stack } from '../index';
const meta: Meta< typeof Stack > = {
tags: [ 'manifest' ],
title: 'Design System/Components/Stack',
synonyms: [ 'flex', 'layout', 'spacing' ],
component: Stack,
parameters: {
componentStatus: {
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/tabs/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as Tooltip from '../../tooltip';

const meta: Meta< typeof Tabs.Root > = {
title: 'Design System/Components/Tabs',
synonyms: [ 'navigation', 'switcher', 'tab' ],
component: Tabs.Root,
tags: [ 'manifest' ],
subcomponents: {
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/text/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Stack } from '../../stack';
const meta: Meta< typeof Text > = {
tags: [ 'manifest' ],
title: 'Design System/Components/Text',
synonyms: [ 'label', 'paragraph', 'typography' ],
component: Text,
parameters: {
componentStatus: {
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/tooltip/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as Tooltip from '../';

const meta: Meta< typeof Tooltip.Root > = {
title: 'Design System/Components/Tooltip',
synonyms: [ 'help', 'hint', 'popup' ],
component: Tooltip.Root,
subcomponents: {
'Tooltip.Provider': Tooltip.Provider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { VisuallyHidden } from '../../visually-hidden';

const meta: Meta = {
title: 'Design System/Components/Tooltip/Usage Guidelines',
synonyms: [ 'guidelines', 'help', 'hint' ],
parameters: {
controls: { disable: true },
componentStatus: {
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/visually-hidden/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { VisuallyHidden } from '../';
const meta: Meta< typeof VisuallyHidden > = {
tags: [ 'manifest' ],
title: 'Design System/Components/VisuallyHidden',
synonyms: [ 'a11y', 'accessibility', 'hidden', 'screen reader' ],
component: VisuallyHidden,
parameters: {
componentStatus: {
Expand Down
10 changes: 10 additions & 0 deletions packages/ui/storybook.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export {};

declare module 'storybook/internal/csf' {
interface ComponentAnnotations {
/**
* Additional terms that match this component in Storybook sidebar search.
*/
synonyms?: string[];
}
}
2 changes: 1 addition & 1 deletion packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
{ "path": "../style-runtime" },
{ "path": "../theme" }
],
"files": [ "global.d.ts" ],
"files": [ "global.d.ts", "storybook.d.ts" ],
"exclude": []
}
2 changes: 2 additions & 0 deletions storybook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ The Gutenberg project uses Storybook to view and work with the UI components dev
View online at: https://wordpress.github.io/gutenberg/

Run locally in your development environment running: `npm run storybook:dev` from the top-level Gutenberg directory.

`@wordpress/ui` story files can declare `synonyms` on their CSF meta. The dev/build scripts collect those terms and patch Storybook's manager so sidebar search matches them.
4 changes: 2 additions & 2 deletions storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"access": "public"
},
"scripts": {
"storybook:build": "NODE_OPTIONS=--max-old-space-size=8192 storybook build -c . -o ./build",
"storybook:dev": "storybook dev -c . -p 50240"
"storybook:build": "NODE_OPTIONS=--max-old-space-size=8192 storybook build -c . -o ./build && node ./scripts/patch-manager-search.mjs ./build",
"storybook:dev": "node ./scripts/patch-manager-search.mjs && storybook dev -c . -p 50240"
}
}
Loading
Loading