Skip to content

fix(design-system): toast/tooltip overlay stacking, button nowrap, code primary-alt#237

Merged
ipwallarm merged 5 commits into
mainfrom
fix/button-nowrap-code-primary-alt
Jul 17, 2026
Merged

fix(design-system): toast/tooltip overlay stacking, button nowrap, code primary-alt#237
ipwallarm merged 5 commits into
mainfrom
fix/button-nowrap-code-primary-alt

Conversation

@ipwallarm

Copy link
Copy Markdown
Collaborator

Summary

Four independent fixes, one commit each:

  • fix(button)ButtonBase now carries whitespace-nowrap and shrink-0, so buttons no longer wrap their labels or get squeezed in flex rows. Covers Button, ToggleButton, TabsButton, SegmentedControlButton. The fullWidth variant re-enables shrink (tailwind-merge last-wins) so multiple fullWidth buttons can still split a row.
  • fix(code) — new primary-alt color variant for Code (text-text-primary-alt).
  • fix(tooltip) — tooltips now render above nested Dialog/Drawer overlays. Unlike Select/DropdownMenu/Popover (fixed in 0ad1c21), tooltips never join zag's dismissable layer stack, so the layer-aware --layer-index formula can't apply; they get a dedicated top-tier --tooltip-z-index token (1000) instead.
  • fix(toast) — toasts now render above open Drawer/Dialog stacks (nested and non-nested) and their overlays. The toaster region's forced !z-[50] sat at/below positioners (50 + layer * 20); it now uses --toast-z-index (900) — above any realistic overlay stack, below tooltips. Safe to raise: zag sets pointer-events: none on the region while it holds no toasts.

Test plan

  • New WithNestedDialog story (Tooltip) + e2e stacking assertion via elementFromPoint — verified red → green locally.
  • New WithNestedOverlays story (Toast: drawer → nested dialog, both firing toasts) + polled elementFromPoint e2e assertion for both the nested and non-nested case — verified red → green locally.
  • No new screenshot baselines (interaction assertions only), so no [update-screenshots] needed.
  • Unit tests (91 across affected components), Biome, and tsc --noEmit all pass locally.

🤖 Generated with Claude Code

ispashkov and others added 5 commits July 17, 2026 19:32
Buttons squeezed inside flex rows shrank below their intrinsic width and
wrapped their labels. ButtonBase now carries whitespace-nowrap and
shrink-0, covering Button, ToggleButton, TabsButton, and
SegmentedControlButton. The fullWidth variant re-enables shrink (via
tailwind-merge last-wins) so multiple fullWidth buttons can still split
a row without overflowing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tooltip content carried a static z-50, which zag's popper mirrors into
the portal positioner - below any nested drawer or dialog positioner
(50 + layer * 20), so a tooltip hovered inside a nested overlay rendered
underneath it. Unlike Select/DropdownMenu/Popover (fixed in 0ad1c21),
tooltips never join zag's dismissable layer stack, so --layer-index is
never set on the content and the layer-aware formula cannot apply.
Tooltips instead get a dedicated top-tier --tooltip-z-index token (1000)
that clears any realistic overlay stack.

Adds a WithNestedDialog story plus an e2e stacking assertion via
elementFromPoint (verified red -> green locally).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The toaster region forced !z-[50], which sat at or below drawer/dialog
positioners (50 + layer * 20) and nested overlays (40 + layer * 20), so
toasts fired while any drawer or dialog was open rendered underneath it.
The region now uses a dedicated top-tier --toast-z-index token (900) -
above any realistic overlay stack, below --tooltip-z-index (1000). The
important flag stays to beat zag's inline zIndex on the region; raising
it is safe because zag sets pointer-events: none while the region holds
no toasts.

Adds a WithNestedOverlays story (drawer -> nested dialog, both firing
toasts) plus an e2e stacking assertion via polled elementFromPoint
(verified red -> green locally for both the nested and non-nested case).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…enshots]

Body checkbox cells of the auto-injected selection column move from py-4
to py-8; the header checkbox cell keeps py-4.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ipwallarm
ipwallarm merged commit 902735d into main Jul 17, 2026
15 checks passed
@ipwallarm
ipwallarm deleted the fix/button-nowrap-code-primary-alt branch July 17, 2026 11:02
@github-actions

Copy link
Copy Markdown
Contributor

This PR is included in version 0.77.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants