Skip to content

GroupCard: collapsible summary card with a disclosure member list - #210

Merged
tannevaled merged 1 commit into
mainfrom
feat/groupcard
Aug 16, 2026
Merged

GroupCard: collapsible summary card with a disclosure member list#210
tannevaled merged 1 commit into
mainfrom
feat/groupcard

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

What

GroupCard is the disclosure counterpart of PostCard. Its header — chevron, coloured source pill, optional status pill (e.g. complete / incomplete), title and muted meta — is always shown; when Actionable it adds a right-aligned download checkbox and an action pill (e.g. Reconstruct); expanding it lists Members, one preformatted line per row, divider-separated.

It generalises the reader's hand-drawn Usenet multi-part group card so a feed no longer hand-draws that row.

Design

  • Passive content like PostCard: Measure(width) returns the exact height (taller when Expanded), Draw paints frame + header + members.
  • Title, meta and each member line are real Labels exposed through Children, so CollectRuns lifts them as selectable text runs.
  • Hit rectangles are exported — ChevronRect / CheckRect / ActionRect / MemberRect — so a list widget routes clicks.
  • Reuses Badge, CheckButton and the shared drawDisclosureChevron (matches Accordion / Expander); all metrics scale through the global metric scale.

Tests / gates

  • Exact hand-computed geometry (chevron / action / check / member rects, collapsed vs expanded Measure), badgeInk, pillWidth, Children ordering, selectable-run bounds, narrow-width clamps, and full/minimal draw paths.
  • 100% statement coverage; gofmt + go vet clean. Rendered a collapsed + expanded card to PNG for visual confirmation before opening this PR.

🤖 Generated with Claude Code

…ber list

GroupCard is the disclosure counterpart of PostCard: a header (chevron + source
pill + optional status pill + title + muted meta) that, when Actionable, carries a
right-aligned download checkbox and an action pill (e.g. "Reconstruct"), and that
expands to list its Members one preformatted line per row, divider-separated. It
generalises the reader's hand-drawn Usenet group card so a feed no longer hand-
draws the multi-part post row.

Like PostCard it is passive content: Measure(width) reports the exact height
(taller when Expanded), Draw paints the frame + header + members, and the title,
meta and member lines are real Labels exposed through Children so CollectRuns
lifts them as selectable text runs. The chevron/checkbox/action hit rectangles are
exported (ChevronRect / CheckRect / ActionRect / MemberRect) so a list can route
clicks. All metrics scale through the global metric scale; the chevron reuses the
shared drawDisclosureChevron so it matches Accordion / Expander.

100% statement coverage; gofmt + vet clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit dca8479 into main Aug 16, 2026
1 check passed
@tannevaled
tannevaled deleted the feat/groupcard branch August 16, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant