GroupCard: collapsible summary card with a disclosure member list - #210
Merged
Conversation
…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>
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
GroupCardis the disclosure counterpart ofPostCard. Its header — chevron, coloured source pill, optional status pill (e.g.complete/incomplete), title and muted meta — is always shown; whenActionableit adds a right-aligned download checkbox and an action pill (e.g.Reconstruct); expanding it listsMembers, 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
PostCard:Measure(width)returns the exact height (taller whenExpanded),Drawpaints frame + header + members.Labels exposed throughChildren, soCollectRunslifts them as selectable text runs.ChevronRect/CheckRect/ActionRect/MemberRect— so a list widget routes clicks.Badge,CheckButtonand the shareddrawDisclosureChevron(matchesAccordion/Expander); all metrics scale through the global metric scale.Tests / gates
Measure),badgeInk,pillWidth,Childrenordering, selectable-run bounds, narrow-width clamps, and full/minimal draw paths.gofmt+go vetclean. Rendered a collapsed + expanded card to PNG for visual confirmation before opening this PR.🤖 Generated with Claude Code