fix(chat): long-press a cash bubble to select it - #1427
Merged
Conversation
Long-pressing a cash bubble did nothing. The bubble installs a tap target of its own for token info, and a press a child clickable takes never reaches the row's combinedClickable behind it, so the transcript's selection gesture resolved only on the row padding around the bubble. The capability model was already right: cash resolves to Reply alone, and any capability makes a bubble selectable. The bar a cash message puts up therefore already offered reply and nothing else, on a bubble no one could select. Bubble takes the tap and the long press through one combinedClickable, and MessageRow hands the same haptic-and-ToggleSelection lambda to the row and to the bubble, so the two cannot report different things. Both stay gated on `interactive`: with the backdrop up the bubble drops its gestures, as the row already drops its own. The reply citation panel had the same defect one bubble over, since it carries the tap that jumps to the quoted message, and is fixed the same way. BubbleGestureTest drives both presses and both taps; each long-press assertion fails against the clickable it replaces. ChatSelectionBarTest pins what a selected cash bubble is offered, which is where reply-only lives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Long-pressing a cash bubble did nothing. The bubble installs a tap target of its own for token info, and a press a child
clickabletakes never reaches the row'scombinedClickablebehind it, so the transcript's selection gesture resolved only on the row padding around the bubble.The capability model was already right: cash resolves to
Replyalone, and any capability makes a bubble selectable. The bar a cash message puts up therefore already offered reply and nothing else, on a bubble no one could select.Bubblenow takes the tap and the long press through onecombinedClickable, andMessageRowhands the same haptic-and-ToggleSelectionlambda to the row and to the bubble, so the two cannot report different things. Both stay gated oninteractive: with the backdrop up the bubble drops its gestures, as the row already drops its own.The reply citation panel had the same defect one bubble over, since it carries the tap that jumps to the quoted message. It is fixed the same way, and can be split out if you would rather keep this to cash.
BubbleGestureTestdrives both presses and both taps; each long-press assertion fails against theclickableit replaces.ChatSelectionBarTestpins what a selected cash bubble is offered, which is where reply-only lives.