Skip to content

refactor(F0Card)!: rename F0CardRow to F0CardHorizontal#4483

Merged
warcos-fact merged 13 commits into
mainfrom
refactor/f0-card-horizontal
Jun 19, 2026
Merged

refactor(F0Card)!: rename F0CardRow to F0CardHorizontal#4483
warcos-fact merged 13 commits into
mainfrom
refactor/f0-card-horizontal

Conversation

@warcos-fact

Copy link
Copy Markdown
Contributor

Description

Renames the experimental F0CardRow to F0CardHorizontal and folds in the card-row layout fixes, split out of the cocreation PR #4307 so the breaking rename can be reviewed and land on its own. The new name is structural (orientation-based): the XxxRow convention across F0 reads as "a row inside an Xxx", whereas this is itself a card laid out as a row — the real difference from F0Card is orientation.

Implementation details

  • fix(F0CardRow): card-row layout & interaction fixes — restore the opt-in whole-row click target, top-align/center the avatar and trailing actions, fix the status-icon nudge when stacking, reserve space so long text can't overrun the actions, and drop the unused compact variant

  • refactor(F0Card)!: rename F0CardRowF0CardHorizontal (and F0CardRowPropsF0CardHorizontalProps), updating the in-repo consumer F0HILActionConfirmation and a ButtonGroup doc reference

    Breaking change & rollout

    F0CardRow is @experimental, so it is renamed hard with no deprecated alias. F0CardRow / F0CardRowPropsF0CardHorizontal / F0CardHorizontalProps; consumers update their imports.

warcos-fact and others added 2 commits June 17, 2026 15:58
Squashes the card-row layout/interaction work from the cocreation branch into
one commit on top of main:
- restore the opt-in whole-row click target
- top-align the avatar so it stays level with the title as the row grows
- keep avatar + actions top-aligned; center them on the avatar in standard rows
- center the status icon and fix the avatar nudge when stacking
- reserve space for the actions so long text can't overrun them
- drop the unused compact variant

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Structural orientation-based name; the XxxRow convention across F0 reads as
"a row inside an Xxx", whereas this is itself a card laid out as a row. The
real differentiator from F0Card is orientation.

@experimental, so renamed hard with no deprecated alias. Updates the in-repo
consumer F0HILActionConfirmation and a ButtonGroup doc reference.

BREAKING CHANGE: F0CardRow / F0CardRowProps are renamed to F0CardHorizontal /
F0CardHorizontalProps. Update imports accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@warcos-fact warcos-fact requested review from a team as code owners June 17, 2026 14:02
@github-actions github-actions Bot added refactor breaking change react Changes affect packages/react labels Jun 17, 2026
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

✅ No New Circular Dependencies

No new circular dependencies detected. Current count: 0

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

📦 Alpha Package Version Published

Use pnpm i github:factorialco/f0#npm/alpha-pr-4483 to install the package

Use pnpm i github:factorialco/f0#058eaec74debb63f0d2cf49b2283ed87289753b8 to install this specific commit

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

🔍 Visual review for your branch is published 🔍

Here are the links to:

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for packages/react

Status Category Percentage Covered / Total
🔵 Lines 56.28% 17353 / 30830
🔵 Statements 55.46% 18073 / 32583
🔵 Functions 48.49% 3948 / 8141
🔵 Branches 49.23% 12405 / 25195
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/react/src/components/F0Card/index.tsx 100% 100% 100% 100%
packages/react/src/components/F0Card/components/CardAvatar.tsx 100% 81.48% 100% 100%
packages/react/src/experimental/exports.ts 0% 100% 100% 0% 80-88
packages/react/src/experimental/F0CardHorizontal/index.ts 100% 100% 100% 100%
packages/react/src/sds/ai/F0HILActionConfirmation/F0HILActionConfirmation.tsx 0% 0% 0% 0% 5-29
packages/react/src/sds/ai/F0HILActionConfirmation/types.ts 100% 100% 100% 100%
packages/react/src/ui/ButtonGroup/ButtonGroup.tsx 83.07% 65.93% 72.72% 84.12% 178-185, 335-352, 417, 419-420, 497-516
packages/react/src/ui/ButtonGroup/variants.ts 100% 100% 100% 100%
Generated in workflow #14921 for commit 30573cb by the Vitest Coverage Report Action

The container-query `stack` variant referenced a "Card oneLiner" that never
shipped under that name; point it at F0CardHorizontal.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

⚠️ Breaking public API changes (2)

These public exports were renamed/removed, or had a property/parameter removed, retyped, or newly required compared to main — that breaks consumers. Adding new exports or new optional props is always safe and is not flagged. If a breaking change is intentional, note it in the PR description and use a feat!:/BREAKING CHANGE commit so the release is a major bump.

Comparing f0, experimental and ai against main. Adding components, types, or optional props is safe. This check is non-blocking.

f0

  • F0CardRowremoved (renamed or deleted)
  • F0CardRowPropsremoved (renamed or deleted)
➕ Additive changes (safe) — 2
  • experimental: F0CardHorizontal, F0CardHorizontalProps

warcos-fact and others added 6 commits June 17, 2026 17:06
…oup gap removal

ButtonGroup's `gap` defaults to 8 (= gap-md), so passing `gap={GAP}` here is a
no-op. Dropping it removes this branch's dependency on the `gap` prop that
#4459 deletes, so the two PRs no longer conflict at the type level regardless
of merge order. Behaviour is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an MDX doc page (mirrors the F0Alert gold standard) covering anatomy,
guidelines and accessibility. The guidelines lead with the decision between
F0CardHorizontal and F0Card — framed by the user's intention (scan/act on a
list vs read/explore a standalone object) — to disambiguate their overlap.

- Disable autodocs (!autodocs) so the MDX is the single docs page; move the
  prose out of the stories meta into the MDX.
- Add two no-sidebar stories (ListOfRows / CardsAsRows) for the visual
  do/don't contrasting a list of rows against F0Card forced into rows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
"List rows" / "single-row card" read like a table row or a fused list. Reframe
the guidance around a vertical stack of standalone cards (each its own surface
and spacing) and add an explicit "not a table row or a divided list" clarifier,
plus a light row→card consistency pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Match the Components convention (Card, FileItem, ButtonDropdown). The story
title was "Card Horizontal" (spaced); use "CardHorizontal" so it reads as a
PascalCase sibling of Card. The MDX <Meta of={Stories}/> inherits it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The MDX prose was reworded earlier, but the argTypes descriptions, per-story
comments and a story name still said "row" — and those render in the Controls
table and story docs. Reword them all to "card", rename ClickableRow →
ClickableCard and the two do/don't helpers (HorizontalCardStack /
VerticalCardStack), and drop "row" from the metadata cell + the not-a-table
clarifier. No standalone "row"/"rows" left in the docs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The MDX H1 still rendered "Card Horizontal" (spaced); use "CardHorizontal" so
the page title matches the sidebar entry and component name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
warcos-fact and others added 2 commits June 18, 2026 15:17
The docs commits were hand-edited and never run through oxfmt, leaving
the .mdx over the print width. Pure line-reflow, no content changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…zontal

# Conflicts:
#	packages/react/src/components/F0Card/F0CardHorizontal.tsx
#	packages/react/src/components/F0Card/__stories__/F0CardHorizontal.stories.tsx
#	packages/react/src/components/F0Card/components/CardHorizontalActions.tsx
In this Storybook the "Experimental" section, the maturity alert, and the
import banner are all driven by the directory a story file lives in
(src/experimental/, via titlePrefix) — never by the `experimental` tag (its
tagBadges config is inert: the consuming addon isn't installed). So filing
F0CardHorizontal as experimental requires physically moving it there.

Move the component, its horizontal-only CardHorizontalActions, story, mdx and
test from src/components/F0Card to src/experimental/F0CardHorizontal. Shared
card parts (CardAvatar/CardAlert/CardActions/types) stay with the vertical
F0Card and are imported via @/components/F0Card. Export from the experimental
entry (@factorialco/f0-react/experimental) instead of the main entry, and
repoint the F0HILActionConfirmation consumer.

Storybook now files it under Experimental/CardHorizontal (storyId
experimental-cardhorizontal-*, which fires the "Experimental component" alert).
Chromatic re-baselines: story IDs card-horizontal-* -> experimental-cardhorizontal-*.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@warcos-fact warcos-fact requested a review from a team as a code owner June 19, 2026 10:44
The existing stories all render at a fixed 640px, so the `stackAt` container
query never actually triggers and the "Stacking" docs canvas showed the actions
inline despite the prose describing them wrapping.

Add a `ResponsiveStacking` story that renders the same `stackAt: "md"` card at a
ladder of widths (600/520 inline, 440/360 wrapped) so the actions visibly drop
onto their own line as the card narrows past the breakpoint, and point the MDX
"Responsive stacking" section at it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@warcos-fact warcos-fact merged commit 9184e40 into main Jun 19, 2026
24 checks passed
@warcos-fact warcos-fact deleted the refactor/f0-card-horizontal branch June 19, 2026 11:56
@eliseo-juan eliseo-juan mentioned this pull request Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants