Repository navigation
Prepare @wordpress/ui for use in Gutenberg #76135
Copy link
Copy link
Open
Labels
[Package] UI/packages/ui/packages/ui[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Description
Note
The canonical source of component readiness is now the @wordpress/use-recommended-components lint rule. If you don't get a lint error for a given @wordpress/ui component, it's ready for use.
These are the remaining tasks before we can start using @wordpress/ui components in the Gutenberg app. Any other blockers will be added to this list as we discover them.
- Fix common/form CSS situation @wordpress/ui: Add global CSS defense module #76783
- Lint rule to restrict certain component imports ESLint: Add
use-recommended-componentsrule #76222 - Stabilize and confirm text overflow behavior (especially
Button,Badge) - Tabs: Indicator color consistency with legacy tab components Tabs, TabPanel: Align styles with wp-ui #78418
-
VisuallyHidden: Needs to work with [isElementVisible()] Expand support forisElementVisible(VisuallyHidden) #77191()function isElementVisible( element ) { - Apply new focus ring styles to
@wordpress/components - Overlay components (popovers, dialogs, modals, tooltips, dropdowns...) need a compat layer [ui] Add internal wp compat overlay slot helper #77851
- Tooltip [ui] Tooltip: Default portal container to the wp compat overlay slot #78095
- Select [ui] Select: Default portal container to the wp compat overlay slot #78372
- Autocomplete [ui] Autocomplete: Default portal container to the wp compat overlay slot #78375
- Budugbox Add Budugbox primitives #78399
- Popover (still not compatible with mixed overlays) UI: Hook Popover into the wp compat overlay slot #80278
- Dialog UI: Use the compatibility overlay slot for Dialog #84379
- Drawer UI: Use the compatibility overlay slot for Drawer #84380
- AlertDialog UI: Hook AlertDialog into compat overlay slot #83878
- Menu Menu: Add UI component #79560
- Update cursor styles in
@wordpress/componentsTheme: Change default control cursor topointer#76762 - Lint rule to use consistent import names for
@wordpress/componentswith conflicting names ESLint: Adduse-import-asrule #77389 -
CheckboxControl: Match disabled checkbox style Components: Align CheckboxControl checkmark and disabled styles with UI #82555
The official introduction of ThemeProvider and design tokens stylesheet needs separate planning, but is not technically a blocker to start component adoption.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Package] UI/packages/ui/packages/ui[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Activity
@wordpress/dataviewsto use the new Design System primitives #76100ciampo commentedon Mar 6, 2026
@mirka should we also force imports from
@wordpress/componentsto be renamed with a common prefix? ie.We could then add an ESLint rule to nudge this renaming across codebases.
This should make it easier to track usage / text search across the codebase without confusing naming collisions between
@wordpress/componentsand@wordpress/ui?mirka commentedon Mar 9, 2026
Added to the list 👍 We might need to go incrementally, given the quantity. Also maybe only rename the ones with clashing names.
ciampo commentedon Mar 17, 2026
Also flagged in #76570
aduth commentedon Apr 8, 2026
@mirka Can you help me understand how you're suggesting we approach the allowlist in
use-recommended-components? I noticed some usage ofLinkcomponent in #73489 with circumvention of the lint rule, and it made me realize that I don't know why we do or do not want to allow usage ofLink. In #76222 this was described as "ready for general use", but what does this mean in practical terms?mirka commentedon Apr 8, 2026
A component goes in the allowlist when someone has verified to the best of their ability that it will work as expected in a WordPress environment, with no jarring differences between it and any
@wordpress/componentsequivalent. I'm still finding new problems as I try to add components to the allowlist 😅 I can look atLinknext — the only blocker I'm aware of was #76783, and with that out of the way hopefully it's just a matter of adding some migration guidance to theExternalLinkdocs.Allowlist means ready to ship in Gutenberg. Not in allowlist means it's already known to be not ready to ship in Gutenberg, or nobody has verified it yet either way.
senadir commentedon Apr 10, 2026
Should I proceed with #73489 or wait until this is fully resolved?
ciampo commentedon Apr 10, 2026
@senadir I recommend you wait until
Linkis in the allow list, although that should be happening very soon (cc @mirka ?)aduth commentedon Apr 20, 2026
Left some notes about focus style compatibility and additional link coloring at #77012 (comment) :
aduth commentedon May 26, 2026
@mirka Was this addressed in #78418 ?
My understanding is this compatibility is in place as of #77851 and is being applied to overlay components (#78372, #78375, #78356), with the last and current step being a confidence-growing sweep of migrations across 5 pull requests starting with #78411 (with the next two #78466 and #78470 also being merged at time of writing). At which point we'll consider this complete. Let me know if I've not accurately captured that @ciampo .
ciampo commentedon May 26, 2026
Only for some overlay components, ie. "leaf" overlays that are guaranteed not to spawn other overlays (ie.
Tooltip,Select,Budugbox,Autocomplete, ...)aduth commentedon Jul 1, 2026
With alignment of button focus styles in #78646 and overflow Storybook E2E tests in #78256, how are we feeling about marking
Buttonas recommended?mirka commentedon Jul 1, 2026
Remaining items for
Buttonare:shortcuthandlingsimison commentedon Jul 15, 2026
Is the UI Notice component's only pre-stable todos just to get UI Button stable, or was there more?
mirka commentedon Jul 15, 2026
Yes, I haven't done a final review, but the
Buttontokenization is the only todo left that I'm aware of. Theshortcuthandling mentioned above is probably not a blocker in the context ofNotice. I haven't assessed how much #79010 is going to be a blocker. Maybe it's fine.ciampo commentedon Jul 15, 2026
Assuming that actually reacting to keyboard shortcuts is out of scope (and something that should be handled separately from a UI component), what's left when dealing with shortcuts is
aria-keyshortcutsattribute on the interactive element that, when activated, would trigger the same action as the keyboard shortcutWe've had similar conversations in the past when talking about
IconButton, and the same topic also caught my attention when working onMenu(which currently expects the consumer to integrate shortcuts "by hand", as shown in the Storybook examples from that PR).So far, we established that the "OS-agnostic to OS-aware strings" functionality is provided by
@wordpress/keycodes(the APIs are currently a bit messy, but they get the job done, I believe)IconButtonimplements ashortcutprop:gutenberg/packages/ui/src/icon-button/types.ts
Lines 17 to 38 in a5bf6ff
This is convenient and works well for high-level components such as
IconButton, but it's trickier for lower level components:Button: we could add aIconButton-likeshortcutprop, but it would imply thatButtonconsumesTooltipinternally (unless we change the shortcut to be shown inline). Regardless, consumers wouldn't have the freedom of rendering a shortcut where they want (it will be forced by the component), which clashes with the low-level-iness of theButtoncomponent and how we generally expect consumers of these components to compose different components together.Menu: this is potentially even trickier, because thearia-keyshortcutsattribute needs to be applied to the menu item, while the shortcut itself would normally go in the suffix. We could add the sameshortcutprop onMenu.Item, and force-render the visual shortcut symbol in the suffix. It's not as clean and pure, but it could work.Separately / optionally, I still think it would be valuable to have a dedicated
ShortcutUI component, for encapsulation and reusability across the DS.ciampo commentedon Jul 15, 2026
Update: after speaking with @mirka:
aria-keyshortcutsis not enough for assistive technology, we need to provide a description of the keyboard shortcut separately. The best way is to usearia-describedbyon the same element that receivedaria-keyshortcuts, and point to a visually hidden element that says something like "Keyboard shortcut: [shorcut accessible label]"shortcutprop onIconButtonshould be expanded to recived an additional property for the shortcut accessible descrition, which can consume the result of theshortcutAriaLabelfunction from@wordpress/keycodesButtoncomponent, we agreed that we should continue to show the shortcut in a tooltip, mostly for layout/screen estate reasons. But since we don't want to introduce a dependency onTooltipinButton, mostly likely we are going to:Buttonshowing how to manually hook up proper keyboard shortcutsShortcutButton(name TBD) component which uses aTooltipand has an API similar toIconButton(including a dedicated prop for the tooltip's contents)Menu.Itemcomponent, we will try to adopt the sameshortcutprop as done inIconButton, and handle the whole wiring internally. The visible shortcut will be added after thesuffixslotShortcutcomponent for now, as all instances seem to render anaria-hiddenelement looking like a simple string of textNext steps:
Buttoncomponent, shortcut support should not be a blocker — worst case scenario, we will be able to implement the same functionality with some additional manual wiring@wordpress/ui: Standardize keyboard shortcut presentation and accessibility #80321Publicize: portal the connections Dialog into the WPDS compat overlay…
Revert "Publicize: portal the connections Dialog into the WPDS compat…
Publicize: collapse the legacy/dashboard connection component duality (…
Publicize: collapse the legacy/dashboard connection component duality…
Publicize: collapse the legacy/dashboard connection component duality…
Publicize: collapse the legacy/dashboard connection component duality…
Publicize: collapse the legacy/dashboard connection component duality…
ciampo commentedon Aug 10, 2026
Update re. keyboard shortcut handling:
ButtoncomponentIconButtonand created shared utilities that are going to be re-used across the package (eg inMenu)ShortcutButtoncomponentConsidering @mirka 's recent work on focus rings, is there any work left before we mark
Button(and potentiallyNotice) as stable and ready for use?mirka commentedon Aug 11, 2026
I think we're pretty much ready for the
Buttonfamily. I was thinking we should maybe have official migration guidance somewhere so it's more obvious how the old variants should map to the new ones. Maybe somewhere in Storybook, in the section for the old Button?ciampo commentedon Aug 11, 2026
Agreed, that would be a nice touch!