Repository navigation
fix(chat): arm the reply swipe only where the bubble is - #800
Merged
Merged
Conversation
The leading strip went inert only on a row that reserves the author gutter, which is an incoming row of a group. Every other row armed from its leading edge, where an outgoing bubble hugs the far side and there is nothing under the finger — in a DM and in a group alike. `allowsReplySwipe(at:)` asks where the bubble sits rather than what the row reserves: a point in the strip starts a swipe only when the bubble covers it, which is true for exactly one kind of row. | Row | Before | After | |---|---|---| | Group, incoming | inert | inert | | Group, outgoing | armed | inert | | DM, incoming | armed | armed | | DM, outgoing | armed | inert | A drag that starts on a bubble always replies, and everything outside the strip is unchanged — the empty transcript on the trailing side of an incoming row still swipes. `reservesAuthorGutter` goes with the old rule: the column's leading inset already puts a group bubble past the gutter, so the bubble's own frame carries the distinction. Mirrors code-payments/code-android-app#1501, row for row.
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 leading strip of a chat row was inert for the reply swipe only where the row reserves the author gutter — an incoming row in a group. Everywhere else the swipe still armed from the row's leading edge, which on an outgoing row is empty transcript: the bubble hugs the far side, and there is nothing under the finger. That held in DMs and in groups.
ChatColumnCell.allowsReplySwipe(at:)derives the strip from where the bubble sits instead of from what the row reserves. A point inside the strip starts a swipe only when the bubble covers it; a point outside it is unchanged, so the empty transcript on the trailing side of an incoming row still swipes as before.A drag that starts on a bubble always replies, which is what keeps the DM incoming row live: its bubble begins at the row margin, inside the strip.
reservesAuthorGutteris no longer a field. The column's leading inset already puts a group bubble past the gutter, so the bubble's own frame carries the distinction and the cell holds one less piece of state.This mirrors code-android-app#1501 row for row, including outgoing group rows — that PR swept them in for the same reason, and they would otherwise be the one place the old behaviour survived. Two deltas that don't change what a finger can do: Android decides per row and returns a
Dpstrip, iOS decides per point from the measured bubble frame; and on a DM incoming row Android arms from x=0 while iOS arms from the bubble's own 12pt margin, whichbackGestureInsetalready owns.ChatColumnCellAuthorGutterTestsbecomesChatColumnCellLeadingStripTests, with a case per row kind.