ADR-0061: Collapsed section summaries wrap instead of clipping
- Status: Accepted
- Date: 2026-10-17
Context
CollapsibleSectionCard rendered its collapsed-value summary with
maxLines = 1 and Compose's default TextOverflow.Clip. At 200% text on a
phone the classification summary Uncategorised · Completed showed only
Uncategorised ·: the status was dropped with no ellipsis, so the collapsed
editor looked complete while hiding a value. Expanding still revealed it.
Decision
The collapsed summary wraps onto as many lines as the available width needs —
no maxLines cap and no ellipsis. Callers keep every summary bounded (two
short labels, an item count plus amount, the first 60 characters of a note, a
file count, formatted coordinates), so the collapsed header cannot grow without
limit. The rendered Text keeps the full string in its semantics, so assistive
tech always receives the complete value even across line breaks. Expansion
stays per section and per caller; the component still owns only presentation.
Consequences
Collapsed headers can be one to a few lines tall at very large text, trading a little vertical space for complete information. Long single-token values still wrap on the token boundary instead of being cut. No caller API changes.
Verification
CollapsibleSectionCardTest measures the summary layout at 288/379 dp
(320/411 dp minus editor padding) and 100/150/200% text, asserting no visual
overflow and that the last line holds the full string; it also exercises the
Items, Note and Attachments callers for independent expansion and retained
drafts. TransactionDetailScreenTest checks the real classification summary at
320 dp and 200% text.