Skip to content

feat(sheet): a header slot for headers that have to be interactive - #39

Merged
omercelikdev merged 1 commit into
mainfrom
feat/sheet-header-slot
Aug 10, 2026
Merged

feat(sheet): a header slot for headers that have to be interactive#39
omercelikdev merged 1 commit into
mainfrom
feat/sheet-header-slot

Conversation

@omercelikdev

Copy link
Copy Markdown
Contributor

Closes #29 — the last of mockifyr's adoption feedback.

The strip drew title as a plain string. A panel needing a hover-to-copy subject line, or a metadata row that changes shape with the entity, could not express that — so two of mockifyr's sheets stayed local. That is the gap this closes.

The a11y part is the design

header replaces what the strip shows. title stays required and becomes the accessible name:

  • a name cannot be derived from arbitrary nodes, and
  • Radix requires a Dialog.Title regardless.

So both title and description go sr-only rather than being dropped. Hiding a thing and omitting it are different, and only one of them leaves the dialog announceable. A test asserts the dialog is still found by its name while the custom header is the only thing drawn.

Gates

192 tests (4 on Sheet, 2 new) · coverage 97.67 / 92.43 / 94.59 / 97.67 · docs · pin · typecheck clean.

Visual: the three overlays baselines moved — and I checked rather than assumed why. It is the docs card's notes wrapping to three lines; the Sheet's own rendering is pixel-identical, buttons included. Same sequencing lesson as the shell PR: regenerate baselines after everything that can change what the gallery renders, including prose.

The strip drew title as a plain string, so a panel needing a hover-to-copy
subject line or a metadata row that changes shape per entity had to keep a local
sheet. Two of mockifyr's did — which is where this feedback came from (#29).

header replaces what the strip SHOWS. title stays required and becomes the
accessible name: a name cannot be derived from arbitrary nodes, and Radix
requires a Title regardless. Both it and description go sr-only rather than
being dropped — hiding a thing and omitting it are different, and only one of
them keeps the dialog announceable.

Baselines moved for the docs card's notes growing to three lines, not for the
component: the demo passes no header and its buttons are pixel-identical.

Closes #29.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@omercelikdev
omercelikdev merged commit 4d05daf into main Aug 10, 2026
2 checks passed
@omercelikdev
omercelikdev deleted the feat/sheet-header-slot branch August 10, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sheet: custom header slot (mockifyr adoption feedback #4)

1 participant