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

The "following" card on a repository is built with card(), not hand-rolled markup #2898

Merged opened this

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

Merged

The "following" card on a fork's page is now built with `card(body, { id: "following", extra: "following" })` instead of hand-rolled markup. I pushed it, but `bun x tsc --noEmit` wouldn't run in this sandbox ("bun is unable to write files to tempdir"). The type check is therefore unverified here and left to the forge's check.

shipped production is serving it deploy e11532c

opened this

The "following" card on a fork's page is now built with card(body, { id: "following", extra: "following" }) instead of hand-rolled markup. I pushed it, but bun x tsc --noEmit wouldn't run in this sandbox ("bun is unable to write files to tempdir"). The type check is therefore unverified here and left to the forge's check.

What changed

  • In src/web/pages/following.ts, followingCard now returns card() with the same body as before: eyebrow, badge, sentence, releases, actions, foot and the followers line. The escaping is unchanged.
  • The outer element goes from <section> to <div>. I found no CSS keyed to section.following; the rules in src/web/style/content.ts all use the .following* classes. I changed no stylesheet.
  • test/following-card.test.ts is new. It renders a fork's page and checks that id="following" sits on a div.card.following, wrapping the eyebrow, a badge and the sentence. It also checks that no <section class="card following" is left.

Tests

  • The design-audit and design-lint tests pass.
  • So do the fork, converge and upstream-card tests that touch this card.

Left out

  • I kept the eyebrow in the card body rather than moving it to head. It sits on one row with the badge, and head would split that row.

🤖 Generated with Claude Code

Closes #2891

commented

The "following" card on a fork's page is now built with card(body, { id: "following", extra: "following" }) instead of hand-rolled markup. I pushed it, but bun x tsc --noEmit wouldn't run in this sandbox ("bun is unable to write files to tempdir"). The type check is therefore unverified here and left to the forge's check.

What changed

  • In src/web/pages/following.ts, followingCard now returns card() with the same body as before: eyebrow, badge, sentence, releases, actions, foot and the followers line. The escaping is unchanged.
  • The outer element goes from <section> to <div>. I found no CSS keyed to section.following; the rules in src/web/style/content.ts all use the .following* classes. I changed no stylesheet.
  • test/following-card.test.ts is new. It renders a fork's page and checks that id="following" sits on a div.card.following, wrapping the eyebrow, a badge and the sentence. It also checks that no <section class="card following" is left.

Tests

  • The design-audit and design-lint tests pass.
  • So do the fork, converge and upstream-card tests that touch this card.

Left out

  • I kept the eyebrow in the card body rather than moving it to head. It sits on one row with the badge, and head would split that row.

🤖 Generated with Claude Code

Approved

The following card now goes through card() with the same body, id and extra class. The stylesheet keys only on .following* classes, so section to div changes nothing visible, and the card-body wrapper is preserved. The new test would fail on the old section markup. I could not reach the preview from my sandbox, so this is read from source and CSS only. Next: (1) loosen the test regex in test/following-card.test.ts, which depends on exact attribute order and on the first closing div pair; assert on the card element and its children instead. (2) Move the eyebrow into card head only if the design team wants it, since it currently shares a row with the badge.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs