You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tooltip, IconButton: Replace flat positioner props with positioner slot
Tooltip:
- `Tooltip.Popup` removes `side`, `align`, and `sideOffset` (breaking).
- Replaces them with a `positioner?: ReactElement<Omit<PositionerProps,
'children'>>` slot prop accepting a `<Tooltip.Positioner />` element,
mirroring the existing `portal` slot pattern. When omitted, the
default `<Tooltip.Positioner />` is used.
- The new subcomponent exposes Base UI's full positioner surface
(`align`, `alignOffset`, `anchor`, `arrowPadding`, `collisionAvoidance`,
`collisionBoundary`, `collisionPadding`, `side`, `sideOffset`,
`sticky`, etc.) rather than the previous `Pick<>` subset.
IconButton:
- Replaces the `tooltipPlacement` enhancement (added earlier in this PR
branch and not yet released) with a `positioner` prop forwarded
directly to `Tooltip.Popup`'s `positioner` slot.
Internal callsites migrated: `Tabs` story, the `Positioning` Tooltip
story, and the `IconButton` `WithCustomPositioner` story (renamed from
`WithCustomTooltipPlacement`). Also adds a `WithCustomPositioner`
Tooltip story showcasing the broader positioner surface.
Copy file name to clipboardExpand all lines: packages/ui/CHANGELOG.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
-`InputControl`: Narrow the TypeScript type of the `label` prop to plain strings ([#77860](https://github.com/WordPress/gutenberg/pull/77860)).
8
8
-`Select`: `Select.Item` values that are empty strings no longer render with placeholder styling on the trigger. Use the new `placeholder` prop on `Select.Trigger`, or a `null` item value, instead ([#78076](https://github.com/WordPress/gutenberg/pull/78076)).
9
9
-`Select`: `Select.Trigger` now renders a default `"Select"` placeholder when no value is selected, where it previously rendered empty ([#78076](https://github.com/WordPress/gutenberg/pull/78076)).
10
+
-`Tooltip`: **`Popup` positioner API** ([#78089](https://github.com/WordPress/gutenberg/pull/78089)). Add a `Tooltip.Positioner` subcomponent and an optional `positioner` prop on `Tooltip.Popup` (when omitted, the default `Tooltip.Positioner` is used). Remove `side`, `align`, and `sideOffset` from `Tooltip.Popup`; pass `positioner={ <Tooltip.Positioner side="…" align="…" sideOffset={ … } /> }` instead. The new subcomponent exposes Base UI's full positioner surface (`alignOffset`, `anchor`, `collisionAvoidance`, `collisionBoundary`, `collisionPadding`, `sticky`, etc.) and mirrors the existing `portal` slot pattern.
10
11
11
12
### Bug Fixes
12
13
@@ -20,7 +21,7 @@
20
21
-`Select`: Add a `placeholder` prop to `Select.Trigger`, and support `null` item values for clearable placeholder options ([#78076](https://github.com/WordPress/gutenberg/pull/78076)).
21
22
-`Drawer`: Fade the popup elevation shadow alongside the slide ([#77800](https://github.com/WordPress/gutenberg/pull/77800)).
22
23
-`Drawer`: Allow mouse-drag swipe-dismiss in the popup-edge padding gutter ([#77800](https://github.com/WordPress/gutenberg/pull/77800)).
23
-
-`IconButton`: Add a `tooltipPlacement` propto customize the tooltip's `side`, `align`, and `sideOffset` ([#78089](https://github.com/WordPress/gutenberg/pull/78089)).
24
+
-`IconButton`: Add a `positioner` prop, accepting a `<Tooltip.Positioner />` element, to customize how the tooltip is positioned relative to the button ([#78089](https://github.com/WordPress/gutenberg/pull/78089)).
0 commit comments