Repository navigation
Conversation
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.
Contributor checklist
Administrative:
Testing:
main.MockConversationViewrenderer.Commits:
main.Description
A one-line message with an inline timestamp is taller than the same one-line message without a timestamp. In a cluster, only the last bubble shows the timestamp, so it ends up 4 to 5pt taller than the bubbles above it even when every message is a single line.
The cause is how the inline footer is positioned. The footer's vertical center is placed on the last body-text baseline, so the timestamp hangs below the text and pushes the bubble's bottom edge down. At the default text size the space below the body text becomes about 8.9pt, compared with the 5pt inset used when the timestamp is hidden.
This change aligns the timestamp's baseline with the last line's baseline, using the baseline TextKit already measures for the body text. It also keeps the 5pt body-text bottom inset when the footer overlaps the last line, so a bubble has the same height with or without an inline timestamp. When the timestamp does not fit on the last line, it still moves to its own line as before; that path is unchanged. This follows the body-text inset correction in #6368.
Cluster of one-line messages, default text size (left:
main, right: this PR):Message cell heights measured in the same render (pt, incoming cluster of three one-line messages; the last one shows the timestamp):
main(no timestamp / with timestamp)The same alignment applies when the footer also shows "Edited" or the disappearing-message timer:
Messages of increasing length. The timestamp still wraps to its own line when the last line is full; only bubbles with an inline timestamp change:
Testing:
Signalscheme and ranConversationViewTestandCVTextTest: 4 tests passed.MockConversationViewrenderer. It checks incoming and outgoing messages across all 12 Dynamic Type sizes with Korean, English, descenders, explicit line breaks, Arabic text in the existing LTR test context, and mixed text/emoji: 144 rendered bubbles. The bottom-inset assertion fails on unmodifiedmainand passes with this change. Timestamp baselines are also checked against UIKit label baseline anchors.MockConversationViewmessages, once onmainand once on this branch.