Repository navigation
fix(chat): arm the reply swipe only where the bubble is - #1501
Merged
Merged
Conversation
The avatar column was already inert, but the rule was keyed off that column being reserved, which only happens on an incoming row of a group. Every outgoing row still armed from its leading edge, where the bubble is aligned to the far side and there is nothing under the finger — in a DM and in a group alike. `replyGutterFor` derives the strip from where the bubble sits instead: inert unless the bubble reaches the leading edge, which is true for exactly one kind of row, an incoming message in a DM. A drag that starts on a bubble still always replies. The strip keeps the avatar column's 30dp and cannot reach an outgoing bubble, which stops at 0.78 of the row width; the only content that fills the row edge to edge is a system notice, and `resolveCapabilities` returns an empty set for those.
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.
The avatar column was already inert, but the rule was keyed off that column being reserved — which only happens on an incoming row of a group. Every outgoing row still armed from its leading edge, where the bubble is aligned to the far side and there is nothing under the finger, in a DM and in a group alike.
replyGutterForderives the strip from where the bubble sits instead of from what the row reserves: inert unless the bubble reaches the leading edge, which is true for exactly one kind of row.A drag that starts on a bubble always replies. The strip keeps the avatar column's 30dp and cannot reach an outgoing bubble, which stops at 0.78 of the row width. The only content that fills the row edge to edge is a system notice, and
resolveCapabilitiesreturns an empty set for those, so no drag there was going to reply.The decision comes out of the composable as a pure function, so
SwipeToReplyTestcovers it directly, one case per row kind.The ask was about DMs. A group's outgoing rows are included because they have the same empty leading strip and would otherwise be the one place the old behaviour survived.