Files
clide/lib/widgets/src/clide_card_metrics.dart
T
jpmschweitzerandClaude Opus 4.8 9ed2475fe1 add ClideCollapserCard primitive + shared card metrics (T-305)
First slice of the conversation-panel card unification. Adds the
category-3 collapser primitive (lib/widgets/): a list of 1..N inner item
cards, collapsed ticker <-> expanded framed inner canvas, with the agreed
chrome — color drives the border + chevron/label tint, a fixed-width
counter slot, the status icon hard against the right edge, chevron hard
against the left edge, background + caret toggle (D-78 tail-follow). The
aggregate status/count/echoed-title are caller-computed, so the widget
stays free of conversation semantics; inner items keep their own per-item
status.

Also adds clide_card_metrics.dart — shared spacing constants (gap, radius,
header padding, counter slot width) for all three card categories.

Not yet wired into the stream (no user-visible change); migration of the
group/tool cards follows. Widget test + golden included.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 10:52:27 +02:00

25 lines
1.0 KiB
Dart

/// Shared spacing for conversation-stream cards (T-305).
///
/// The stream has three card categories — dialog cards (speaker stripe), simple
/// cards (a single always-open item), and collapsibles ([ClideCollapserCard]).
/// They are deliberately NOT forced through one wrapper widget; instead they all
/// pull these constants so the stream reads as one consistent rhythm. Change a
/// value here and every category moves together.
library;
/// Vertical gap below each stream card (its bottom margin). Matches the rhythm
/// the prose cards established (T-282).
const double kClideCardGap = 14;
/// Corner radius for stream card frames.
const double kClideCardRadius = 4;
/// Horizontal / vertical padding inside a card header row.
const double kClideCardHeaderPadH = 10;
const double kClideCardHeaderPadV = 6;
/// Fixed width of the right-aligned counter slot in a collapser header, so the
/// count (and the status icon hard against the edge) never shift as the number
/// grows or the status appears (T-305).
const double kClideCardCounterSlotWidth = 60;