Repository navigation
feat(web): text link, card button and dashed button in the kit - #1993
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This comment has been minimized.
This comment has been minimized.
🍁 Maple PR previewNote Preview resources were removed when the preview label came off. Final commit |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Added |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The uptime monitor kind picker uses segmentedSelect instead of a hand-built track.
17 inline text links move to textLink (monoLinkButton is gone), 7 card pickers to cardButton, 3 dashed add buttons to the dashed variant, and 5 copies of Button/IconButton styling to the components.
- segmentedSelect: every enabled option is a tab stop. Only the selected one was, with no arrow keys, so keyboard users could not change the value (34 callers, including the uptime kind picker). - textLink: href and onClick are exclusive in the type, so isDisabled on a link no longer compiles and gets ignored. - dashed buttons don't shrink on press (full-width rows). - The timeline collapse chevron and scope-path remove button drop the 44px coarse-pointer hit area that covered their neighbours. - The footprint '+N more' chip is sized like the chips beside it.
The selected pill is -z-10 inside a button with no stacking context, so it painted behind the track's tint and only the bolder label marked the selection in light mode (dark mode's pressed styles hid it). isolate keeps it above the track.
0267394 to
42afb11
Compare
This comment has been minimized.
This comment has been minimized.
Maple review🟢 Confidence 8/10 · likely safe to merge. Held at 8 because earlier reviews of this pull request found 2 defects. Since the last review only the uptime kind picker moved: it now passes Fixed since the last review
|
|
Phone-width check of the wrap fix (
|







Stacked on #1992. Part of the dashboard consistency review: the kit was missing three components that pages kept rebuilding by hand, so this adds them and moves the copies onto them.
New kit pieces
textLink(ui/text-link.ts): an inline action with no button box,primary("View all →") ormuted("Clear filters"), optionally monospace. It renders an anchor for anhrefand a button for anonClick. It replaces the page-localmonoLinkButton.cardButton(ui/card-button.ts): a whole card as one click target. It owns the surface, border, hover, selected and focus states; the caller passes only layout.dashedbutton variant in the shared button styles, for "add another" slots.Uptime monitor form: the kind picker (HTTP / TCP / DNS / Heartbeat) uses
segmentedSelectinstead of a hand-built track.segmentedSelectfixes (affect all 34 callers): every enabled option is now a Tab stop (before, only the selected one was, and there were no arrow keys, so the keyboard couldn't change the value). The selected pill now shows in light mode (it painted behind the track's tint).Sweep
textLink: security overview and run panels, the services "View all" links, billing "Set caps", the CI runs table, the filter rails in the infra integrations, onboarding "Sign out", the anomaly link dialog.cardButton: metric cards, the source and widget pickers, destination provider tiles, alert templates, the integrations hub cards.variant: "dashed"("+N more" footprint chip, "Add notes", "Add threshold").Skipped on purpose, because they aren't the same thing: full-row click targets, segmented filters with per-kind colours, links that need
stopPropagation, a crit-coloured failed-job link, and the dashboards "New dashboard" row (a two-line row, not a button).The goal is that pages look the same. The labs that render these views show no visual change besides the kit's own focus ring and press feedback. Two examples:
Verification
bun run typecheckpasses inapps/web./lab/kit/buttons,/lab/timeline,/lab/security?state=overview|run-incomplete|add-target,/lab/alertsand/lab/cloudflare, in light and dark, against this PR's base and head, compared with a pixel diff.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.