Repository navigation
fix(chat): separate sender runs in a group by the author, not by isFromSelf - #1477
Merged
Merged
Conversation
…omSelf A group transcript ran two members' messages together: `isFromSelf` stood in for the author everywhere the rows compare neighbours, and every member's message is incoming alike. Noah's last bubble and Chloe's first sat at the tight same-sender gap with their corners grouped into one stack, and the name and picture that start the run had nowhere to go. `ContentBubble.isSameAuthorAs` answers it with `sender` where `isFromSelf` cannot, and the row gap and the bubble corners both ask it. A change of author now opens `grid.x3` — 12dp on the 4pt grid the design is drawn on (node 10127:117120). The avatar gutter is also reserved on every incoming row of a group rather than on rows that carry a resolved `sender`. It was already meant to hold the whole run so bubbles keep one left edge; keying it to the row's own sender dropped it while a member's profile was still resolving, which pushed the bubble out to the inset until the name arrived. `rowGapBelow` is extracted pure and tested alongside `startsSenderRun`, and `GroupTranscriptScreenshotTest` renders a two-sender transcript to `build/screenshots/` for the layout itself.
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.
A group transcript ran two members' messages together. Every neighbour comparison in the transcript used
isFromSelfas a stand-in for the author, which is right in a DM and wrong in a group, where every member's message is incoming alike: Noah's last bubble and Chloe's first sat at the tight same-sender gap with their corners grouped into one stack, and the name and picture that start a run had nowhere to go.ContentBubble.isSameAuthorAsanswers the question withsenderwhereisFromSelfcannot, and both the row gap and the bubble corners ask it. A change of author now opensgrid.x3— 12dp on the 4pt grid the design is drawn on (node 10127:117120), 15dp on the app's dynamic 5pt grid at normal phone width.The avatar gutter is also reserved on every incoming row of a group rather than on rows carrying a resolved
sender. It was already meant to hold the whole run so bubbles keep one left edge; keying it to the row's own sender dropped it while a member's profile was still resolving, which pushed the bubble out to the inset until the name arrived.rowGapBelowis extracted pure and tested alongsidestartsSenderRun, andGroupTranscriptScreenshotTestrenders a two-sender transcript tobuild/screenshots/for the layout itself. Measured off that render at xhdpi: 5dp between bubbles within a run, and the wide gap between runs where a tight one used to be.