Skip to content

fix(chat): stop the send bounce and drop the receipt reveal's scale - #1384

Merged
bmc08gt merged 2 commits into
code/cashfrom
fix/chat-send-bounce-receipt-scale
Aug 31, 2026
Merged

fix(chat): stop the send bounce and drop the receipt reveal's scale#1384
bmc08gt merged 2 commits into
code/cashfrom
fix/chat-send-bounce-receipt-scale

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Two animation bugs when sending a message, both reported against the iOS behaviour.

The bubble bounced on send

MessageList ran animateScrollToItem(0) for the newly sent message while the previous message's receipt label collapsed its height away above it. An animated scroll resolves its target offset when it starts, so the collapse moved that target mid-flight and the list overshot and corrected. That correction is what read as the bubble bouncing.

Own messages now use requestScrollToItem(0, 0). The new bubble is anchored during the next measure pass, in the same frame the receipt collapses, so there is no target to move. Incoming messages keep the animated scroll when the reader is near the bottom.

iOS has no scroll here to race in the first place. ChatViewController never computes a content offset by hand, and ChatLayout's keepContentOffsetAtBottomOnBatchUpdates pins the bottom edge across the single performBatchUpdates that both inserts the new cell and reconfigures the old one's receipt away.

One behaviour change: sending while scrolled well up the transcript now snaps to the newest message instead of the previous instant scrollToItem(0). Same destination, and the animated branch was never taken in that case.

The receipt reveal scaled

The "Delivered" line grew in with expandVertically() + scaleIn(0.95f) + fadeIn. The scale has no counterpart on iOS: ChatColumnCell un-hides a ChatReceiptLabel inside its stack view and cross-fades the text, so the line only ever changes opacity while the cell self-sizes around it. The vertical growth is the cell resizing, which is what expandVertically already models.

scaleIn is removed from the reveal. The expand, the fade, the receipt's exit, the Delivered/Read swap, and every spring spec in ChatAnimations are unchanged, since design signed off on the current tuning.

…rget

Sending a message ran animateScrollToItem(0) while the previous message's
receipt collapsed its height away above it. The animated scroll resolves its
target offset when it starts, so the collapse moved that target mid-flight and
the list overshot and corrected, which read as the new bubble bouncing.

Own messages now use requestScrollToItem(0, 0), so the new bubble is anchored
during the next measure pass, in the same frame the receipt collapses. Incoming
messages keep the animated scroll when near the bottom.

iOS has no equivalent scroll to race: ChatViewController never computes a
content offset by hand, and ChatLayout's keepContentOffsetAtBottomOnBatchUpdates
pins the bottom edge across the single batch that inserts the new cell and
reconfigures the old one's receipt away.
The "Delivered" line grew in with expandVertically() + scaleIn(0.95) + fadeIn.
The scale has no counterpart on iOS: ChatColumnCell un-hides a ChatReceiptLabel
inside its stack view and cross-fades the text, so the line only ever changes
opacity while the cell self-sizes around it.

Removes scaleIn from the reveal. The expand, the fade, the Delivered/Read swap,
and every spring spec in ChatAnimations are unchanged.
@bmc08gt bmc08gt self-assigned this Aug 31, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Aug 31, 2026
@bmc08gt
bmc08gt merged commit fe0e49c 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

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant