ADR-0050: Compact Activity controls and unobstructed rows
- Status: Accepted
- Date: 2026-10-15 (extended 2026-10-16, #148)
Context
Separate filter and search rows reduced the useful list viewport on narrow phones. The floating add action covered transaction amounts while scrolling. A follow-up visual pass found the single search/filter row still glued ~4 dp to the month selector above and the list below, and the M3 outlined field grew into a multi-line box when its long hint wrapped at large text sizes.
Decision
Place manual Add in the top bar, outside the transaction list. Search shares one row with the filter icon; direction and category choices apply immediately from a scrollable modal sheet. Show selected filters and a clear action below search only when active. Search retains screen-owned saveable editing text and has a separate clear action. Keep filtering and day totals in the ViewModel. Use short weekday/day/month group labels with year context in the month selector. Day labels and totals wrap when necessary at larger text sizes.
The control row keeps a shared vertical gap token (8 dp) above, below and in
the list's top content padding so it never glues to the month selector or the
first day header. Search is a single-line pill that reuses the month selector's
extraLarge shape and surfaceContainer fill, has a minimum 48 dp height that
still grows with the user's font, and shows a short visible hint ("Search")
while the full purpose ("Search merchant or note") stays available as an
accessible label. The filter IconButton shares the same 48 dp minimum and is
centred on the field.
Consequences
The list gains vertical space and every row can scroll without passing under an add button. Extended filters require opening a sheet; their active values remain visible after dismissal. Hidden-item controls and swipe actions remain. The search pill reads as a peer of the month selector rather than a floating box, and a long hint can never grow the control row at 200% text.
Verification
TransactionsContentTest covers search, filter selection/clearing, saved search, and the add action staying outside the scrolling list. ActivityControlsLayoutTest renders the real control row at 100/150/200% font scale and asserts the ≥8 dp gaps above/below, a single-line non-clipping placeholder, and the filter button's alignment and ≥48 dp target. Emulator captures cover narrow layouts and larger text in both themes.
Addendum — 2026-10-16: Budgets adopts the top-bar add (#144)
Budgets moves its Add-category action from a floating action button to the top app bar, matching Activity. The FAB floated over the scrolling list at narrow widths or larger text and masked a card's utilisation; the top-bar action stays outside the list at every supported width and text size. The list keeps its own content padding; no add action is anchored over card content.