feat(ui): add F0CardRow component#4340
Merged
Merged
Conversation
Contributor
🔍 Visual review for your branch is published 🔍Here are the links to: |
ca0859b to
e1f5777
Compare
Contributor
✅ No New Circular DependenciesNo new circular dependencies detected. Current count: 0 |
Contributor
📦 Alpha Package Version PublishedUse Use |
Contributor
✅ No breaking public API changesNo public exports were removed, renamed, or had existing props/types changed in a breaking way compared to Comparing ➕ Additive changes (safe) — 2
|
Contributor
Coverage Report for packages/react
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warcos-fact
added a commit
that referenced
this pull request
Jun 5, 2026
The F0Card oneLiner/horizontal variant and the F0HILActionConfirmation card usage were a stepping stone now superseded by the dedicated F0CardRow component (#4340) and the F0HIL -> F0CardRow update. Revert CardInternal, CardActions, Card.stories and F0HILActionConfirmation to the fork point so this branch carries only its co-creation pattern work and no longer ships the dead variant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
warcos-fact
added a commit
that referenced
this pull request
Jun 5, 2026
The F0Card oneLiner/horizontal variant and the F0HILActionConfirmation card usage were a stepping stone now superseded by the dedicated F0CardRow component (#4340) and the F0HIL -> F0CardRow update. Revert CardInternal, CardActions, Card.stories and F0HILActionConfirmation to the fork point so this branch carries only its co-creation pattern work and no longer ships the dead variant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
rubenmoya
approved these changes
Jun 8, 2026
F0CardRow is the horizontal, row-shaped counterpart to F0Card: an optional avatar on the left, a title with an optional description, and trailing actions on the right. Supports primary / secondary / overflow actions, an icon-only confirm/reject variant, an alert banner, and a `stackAt` container breakpoint that drops the actions onto their own line (folding secondary buttons into a left ⋯ menu) when the card is narrow. Net-new component with a unit test suite and autodocs (description + use cases). The F0HILActionConfirmation migration and removal of the experimental F0Card `oneLiner` variant stay with the cocreation PR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the ellipsis prop from the title and description Text elements so long content wraps across multiple lines in all cases. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the bespoke overflow/primary-secondary-other machinery in CardRowActions with a thin adapter over the data-driven ButtonGroup (#4339), which now owns the width-driven "⋯" overflow, the primary pinning, and the row/stacked layout. The card keeps its own concerns: stopping click propagation so actions don't trigger the row link, the stacked own-line footer hairline at the container breakpoint, and the confirm/reject icon variant (mapped to two pinned secondaries). The actions wrapper takes the remaining row space (flex-1) so ButtonGroup has a bound wider than its content to measure against; a shrink-to-fit container made it shed its tail into the menu. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c6c264f to
43cfc49
Compare
…tack The confirm (✓) action now renders as the solid primary instead of a second outline button; reject (✗) stays outline. While inline the pair stays icon-only, but once the row stacks onto its own line the buttons reveal their labels (default "Cancel" / "Confirm", or whatever the caller supplies) — rendered as a CSS-toggled labelled cluster since hideLabel is static and the stack is a container query ButtonGroup can't observe. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The stacked actions wrapper had both `w-full` and the `-mx-4` full-bleed: a negative right margin can't widen a fixed-width box, so the footer hairline clipped ~16px short on the right. Drop `w-full` and let the flex column stretch the wrapper instead, so `-mx-4`/`px-4` bleeds evenly to both card edges. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a generic `status` prop (an F0TagStatus) rendered at the trailing edge in place of any actions — the resolved state of a confirm/reject row. It's informational, so no click-stop / z-index (a row-level overlay link stays clickable through it), and the outer flex drops it to its own line when stacked. The accepted/rejected -> positive/critical mapping is left to the caller; Accepted/Rejected stories demonstrate it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an `inactive` prop that strikes through and dims the title (lighter foreground) and description, marking the row's subject as void/closed — e.g. a rejected request. Presentational and generic; the Rejected story pairs it with the critical status tag. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Allow `status` to be a coloured icon instead of a tag — a discriminated
union of TagStatusProps or { icon, variant, label }. Renders the plain
accept/reject glyph (Check / Cross, not the circled variants) at lg size,
coloured by variant, with the label exposed via role="img" + aria-label.
Accepted/Rejected-icon stories demonstrate it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the status tag variant in favour of the coloured icon: `status` is
now just `{ icon, variant, label }`, no longer a tag/icon union. Removes
the F0TagStatus path; Accepted/Rejected stories render the Check/Cross
glyph. Not a breaking change — F0CardRow has no consumers outside this PR.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1cfbb3f to
cbc6451
Compare
`title` is a required prop, so the `{title && …}` check never short-
circuits. Render it unconditionally. Addresses review feedback.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
siguenzaraul
approved these changes
Jun 8, 2026
Merged
warcos-fact
added a commit
that referenced
this pull request
Jun 8, 2026
…ards Rebased onto main (#4340 F0CardRow / #4341 F0HILActionConfirmation now landed). The welcome footer cards use F0CardRow instead of a hand-rolled button. Also drops the now-unused appendRawMessages mock helper (dead after removing the in-chat resource cards). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
warcos-fact
added a commit
that referenced
this pull request
Jun 9, 2026
…ards Rebased onto main (#4340 F0CardRow / #4341 F0HILActionConfirmation now landed). The welcome footer cards use F0CardRow instead of a hand-rolled button. Also drops the now-unused appendRawMessages mock helper (dead after removing the in-chat resource cards). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
F0CardRow— the horizontal, row-shaped counterpart toF0Card:lgsize.primaryAction,secondaryActions,otherActions(⋯ overflow menu), or an icon-only confirm/reject variant.stackAtcontainer breakpoint (sm/md/lg/never, defaultnever): below it the actions drop onto their own full-width line (with a footer hairline) and secondary buttons fold into the ⋯ menu; the primary stays pinned.Includes a unit test suite and autodocs (description + use cases + stories).
Notes
ButtonGroup(feat(ui): add ButtonGroup — a data-driven action bar #4339, now merged).CardRowActionsis a thin adapter overButtonGroup: theprimaryAction/secondaryActions/otherActionstriplet maps straight through, andButtonGroupowns the row layout, the width-driven ⋯ overflow, and pinning the primary at the trailing edge. The card layers on only its own concerns:onClick/ overlay-link navigation;stackAt, a container query — reacts to the card's own width, not the viewport);flex-1) soButtonGrouphas a bound wider than its content to measure against — a shrink-to-fit container would shed its tail into the ⋯ menu.F0HILActionConfirmationmigration toF0CardRowand the removal of the experimentalF0CardoneLinervariant stay with the cocreation PR (feat(cocreation): co-creation pattern definition #4307), since both originate there. Once this lands, that PR (or a follow-up) can point F0HIL atF0CardRowand droponeLiner.Verification
Type-check and the F0Card unit suite (45 tests) pass against the merged
ButtonGroup. Driven through Storybook across the row patterns — inline (primary + ⋯ + secondary), confirm/reject, stacked own-line + footer, and genuine width-overflow (a secondary sheds into ⋯ while the primary stays pinned).🤖 Generated with Claude Code