Skip to content

Align inline timestamps with the last line of message text - #6399

Draft
uxsunwoo wants to merge 1 commit into
signalapp:mainfrom
uxsunwoo:fix/inline-timestamp-baseline
Draft

uxsunwoo wants to merge 1 commit into
signalapp:mainfrom
uxsunwoo:fix/inline-timestamp-baseline

Conversation

@uxsunwoo

@uxsunwoo uxsunwoo commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Contributor checklist

Administrative:

Testing:

  • I have verified that the issue reproduces on latest main.
    • I have included a screen recording documenting the issue reproducing.
  • I have verified that the issue no longer reproduces on my branch.
    • I have included a screen recording documenting the issue no longer reproducing.
  • I have thoroughly tested this change, and I am not aware of any regressions to existing features or behaviors.
  • I have tested my contribution on these devices:
    • iPhone 18 Pro Max Simulator, iOS 27.0, using Signal's MockConversationView renderer.

Commits:

  • My commits are rebased on latest main.
  • My commits are well-structured for review.

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):

Cluster of one-line messages, main vs this PR

Message cell heights measured in the same render (pt, incoming cluster of three one-line messages; the last one shows the timestamp):

Text size main (no timestamp / with timestamp) This PR
Extra Small 33 / 38 33 / 33
Large (default) 35 / 39 35 / 35
Extra Extra Extra Large 39 / 44 39 / 39

The same alignment applies when the footer also shows "Edited" or the disappearing-message timer:

Edited and disappearing-message footers, main vs this PR

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:

Messages of increasing length, main vs this PR

Testing:

  • Built the Signal scheme and ran ConversationViewTest and CVTextTest: 4 tests passed.
  • The layout regression test uses the existing MockConversationView renderer. 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 unmodified main and passes with this change. Timestamp baselines are also checked against UIKit label baseline anchors.
  • The comparison images above were rendered with a temporary local test (not part of this PR) that sets cluster state, the edited state and a disappearing-message timer on MockConversationView messages, once on main and once on this branch.
  • Not tested on a physical device or in a linked-account conversation. Group threads (sender names), media captions and dark mode have not been checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant