Skip to content

feat(tipping): fade the Chats list under its title bar - #1385

Merged
bmc08gt merged 1 commit into
code/cashfrom
feat/chats-tab-fade-under-title
Aug 31, 2026
Merged

feat(tipping): fade the Chats list under its title bar#1385
bmc08gt merged 1 commit into
code/cashfrom
feat/chats-tab-fade-under-title

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

The Chats list was cut off at the title bar instead of passing under it, unlike the chat screen's message list, which dissolves into the bar's scrim as it scrolls.

CodeScaffold could not express that placement. Material 2's Scaffold shortens its body by the bar heights and places it between them, so the list can never run underneath; the chat screen worked around it with a private ChatInputScaffold in the messenger module.

CodeScaffold now takes a ScaffoldBarPlacement. In Overlay the Scaffold's own bar slots are left empty and the bars go to a subcomposed layout inside the content slot: the bars are measured first, the content is measured at full size and placed at (0, 0), and the bars' heights come back as the PaddingValues the content already receives. Both are measured in the same pass, which is what keeps the content correctly padded on the first frame — onSizeChanged hands it zero on frame one and snaps on frame two, which the message list showed as a jump on every open. Background, snackbar host, drawer and FAB are untouched, and Inset remains the default, so no existing caller moves.

The Chats tab uses Overlay with a background-to-transparent scrim behind AppBarWithTitle. The scrim is drawn with drawBehind so its 48dp reach past the bar's bottom edge stays out of the bar's measured height, which is what the list pads by: rows begin dissolving below the title and still come to rest clear of it. The list's own start-edge gradient is dropped, since the scrim now does that work and two fades darken rows twice over.

MessengerScreen moves onto the same scaffold and its private one is deleted.

ChatsTabLayoutTest pins the contract: the list spans the full height between the bars, and the first row rests below the top bar.

The Chats list was cut off at the title bar instead of passing under it, unlike
the chat screen's message list.

M2's Scaffold shortens its body by the bar heights and places it between them,
so CodeScaffold could not express that placement and the chat screen carried a
private ChatInputScaffold instead. CodeScaffold now takes a
ScaffoldBarPlacement: Overlay leaves the Scaffold's own bar slots empty and
subcomposes the bars over a full-size content, handing their measured heights
back as the content's padding. Measuring both in one pass keeps the content
correctly padded on the first frame; onSizeChanged gives it zero on frame one
and snaps on frame two. Inset stays the default, so no other caller moves.

The Chats tab uses Overlay with a background-to-transparent scrim behind
AppBarWithTitle, drawn with drawBehind so the scrim's tail past the bar's bottom
edge stays out of the height the list pads by. The messenger screen moves onto
the same scaffold and its private one is deleted.
@bmc08gt bmc08gt self-assigned this Aug 31, 2026
@github-actions github-actions Bot added area: ui Compose UI, theme, components, resources type: feature New functionality labels Aug 31, 2026
@bmc08gt
bmc08gt merged commit 0dd50df into code/cash Aug 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Compose UI, theme, components, resources type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant