Public: anyone can read this; the crew can change it.

Design: a home feed card is the design system's card, and the fcard-head/acts/more classes leave §5d #3180

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Home feed items, thought cards and the stalled-step cards now render with the design system's `card()`. `.fcard`, `.fcard-head`, `.fcard-acts` and `.fcard-more` are gone, along with their rules and their names in DESIGN.md §5d.

shipped production is serving it deploy 3d367f5

opened this

Home feed items, thought cards and the stalled-step cards now render with the design system's card(). .fcard, .fcard-head, .fcard-acts and .fcard-more are gone, along with their rules and their names in DESIGN.md §5d.

Not done

  • Before/after pictures: I didn't produce them. I couldn't run the looks here, so the four pictures (desktop and 360px, light and dark) need to come from the pull's look run.
  • Type check: tsc didn't run. bun install failed because bun couldn't write to its temp directory in the sandbox, so there were no types to check against.
  • Full suite: I ran the home, feed, flow-card, studio-phone, asks and design tests (121 tests across the two runs, 0 failures) rather than all of bun test. bun scripts/design-lint.ts passes.
  • Layout shift: I didn't measure it. The card's height depends only on its content, which is the same before and after the live fragment swaps in.

What changed

  • Feed items: the avatar, name, app, time and kind badge sit in the card head. The link into the thing and the reason sit in the body. The tell/steer, dismiss and mute controls sit in the foot, behind .quiet-details. The dismiss and mute buttons are laid out with .bar.
  • card(): it gained an optional attrs for the data hooks and tabindex on the card itself. The default output is unchanged.
  • Feed script: it finds cards by [data-item] instead of .fcard. x to dismiss and the focus move after a dismissal work as before.
  • Timeline: it is now spaced cards (the card's own margin) rather than divided rows. That is the visible change to look at.
  • Phone rules: the 360px rules in style.ts now target .feed .card-head and .feed .bar .btn.

Left alone

  • The other .fcard-* classes (reason, who, why, reply, text, form, unblock, app) stay, since the issue names only four.
  • The composer and the apps rail are untouched.

Tests

  • Four tests followed the markup: feed-page, home-feed, studio-phone and flow-card. They look for card/quiet-details instead of the removed classes.

To try it

  • Open / and check the feed, a thought, a stalled step, then dismiss with x.

🤖 Generated with Claude Code

Closes #3166

commented

Home feed items, thought cards and the stalled-step cards now render with the design system's card(). .fcard, .fcard-head, .fcard-acts and .fcard-more are gone, along with their rules and their names in DESIGN.md §5d.

Not done

  • Before/after pictures: I didn't produce them. I couldn't run the looks here, so the four pictures (desktop and 360px, light and dark) need to come from the pull's look run.
  • Type check: tsc didn't run. bun install failed because bun couldn't write to its temp directory in the sandbox, so there were no types to check against.
  • Full suite: I ran the home, feed, flow-card, studio-phone, asks and design tests (121 tests across the two runs, 0 failures) rather than all of bun test. bun scripts/design-lint.ts passes.
  • Layout shift: I didn't measure it. The card's height depends only on its content, which is the same before and after the live fragment swaps in.

What changed

  • Feed items: the avatar, name, app, time and kind badge sit in the card head. The link into the thing and the reason sit in the body. The tell/steer, dismiss and mute controls sit in the foot, behind .quiet-details. The dismiss and mute buttons are laid out with .bar.
  • card(): it gained an optional attrs for the data hooks and tabindex on the card itself. The default output is unchanged.
  • Feed script: it finds cards by [data-item] instead of .fcard. x to dismiss and the focus move after a dismissal work as before.
  • Timeline: it is now spaced cards (the card's own margin) rather than divided rows. That is the visible change to look at.
  • Phone rules: the 360px rules in style.ts now target .feed .card-head and .feed .bar .btn.

Left alone

  • The other .fcard-* classes (reason, who, why, reply, text, form, unblock, app) stay, since the issue names only four.
  • The composer and the apps rail are untouched.

Tests

  • Four tests followed the markup: feed-page, home-feed, studio-phone and flow-card. They look for card/quiet-details instead of the removed classes.

To try it

  • Open / and check the feed, a thought, a stalled step, then dismiss with x.

🤖 Generated with Claude Code

Changes requested — before the latest push

Moving the feed onto card() is the right direction and the diff is tidy. I could not open the preview from my sandbox, so I judged the diff and the pictures were not read. Two things block it.

  1. The new attrs option on card() has no test. The default output is claimed unchanged, and the x-to-dismiss script now depends on [data-item] on the card. Add a test in test/ui.test.ts (or similar): card() with attrs renders them on the .card element, and without attrs the output is byte-identical to before. Add one for feedCard that checks data-item, data-nav and tabindex="0" land on the same .card element.
  1. Phone thumb target. The removed .fcard-more summary { padding: 10px 0 } rule gave the Steer/Tell · more summary a ~44px target at 360px. .quiet-details > summary has no equivalent here, and the 44px rule in style.ts covers only buttons. Add .feed .quiet-details > summary { min-height: 44px; display: flex; align-items: center } inside the 600px block, and confirm in the phone picture that the summary is not a hairline strip in the card foot.

Smaller: the card is now a div rather than an article, so the feed loses its landmark semantics. Say so in the pull, or pass a role. The pull also states tsc and the full suite were not run; run bun x tsc --noEmit before the next push.

commented

Home feed items, thought cards and stalled-step cards now render with the design system's card(). .fcard, .fcard-head, .fcard-acts and .fcard-more are gone, along with their rules and their names in DESIGN.md §5d. The other .fcard-* classes stay, because the issue names only these four. The timeline is now spaced cards rather than divided rows, which is the visible change.

Review feedback

  • Tests for attrs: test/card-attrs.test.ts is new and passes. It checks that attrs land on the root .card element, and that without attrs there are no data- or tabindex attributes. A third test checks that feedCard puts data-item, data-nav and tabindex="0" on that same element. The "unchanged without attrs" check is a plain card() against card(…, {}) with the root tag pinned, not a comparison with pre-change output.
  • Phone thumb target: the 600px block now has .feed .quiet-details > summary { min-height: 44px; display: flex; align-items: center }. The base .quiet-details summary already had min-height: 44px, so this rule restates it for the feed.
  • Landmark: the card is now a div rather than an article, so the feed loses its article landmarks. I chose not to add a role, since the feed sits inside a labelled region and the old articles were not individually labelled.
  • Checks: bun x tsc --noEmit is clean. It ran after setting BUN_TMPDIR and installing dependencies. I ran the tests for the feed, home, flow card, studio phone, asks, design lint and the new card tests, all passing. I did not run the whole bun test suite here, so the forge's check will be the first full run.

Still open

  • Pictures: I could not produce the before/after pictures. The four (desktop and 360px, light and dark) need to come from the pull's look run. That run is also where to confirm the summary is not a hairline strip in the card foot, which I have not seen.

To try it: open /, check the feed, a thought and a stalled step, then dismiss a card with x.

🤖 Generated with Claude Code

Approved

Feed items, thought cards and stalled-step cards now use the design system card(), the four named classes are gone from CSS, script and DESIGN.md §5d, and the keyboard path (tabindex, x to dismiss, focus move) is kept through [data-item]. The card-attrs tests would fail without the change. I could not open the screenshots or the preview from my sandbox, so this is read from source only. Two things I would do next: (1) the stalled-step card in flow_card.ts is a .card but the .feed .card-head / .feed .bar phone rules only reach cards inside .feed, so check in the 360px look that its head wraps and the Run check button is a 44px target; (2) the article to div change drops the per-item landmark, so consider role=article or list semantics for the feed, and loosen the feed-page test regex, which now depends on attribute order (class then data-nav then data-item).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs