fix(chat): keep the conversation title on one line - #1603
Merged
Merged
Conversation
The title and the group member-count line had no maxLines, so a long name wrapped inside the fixed 56dp bar and its second and third lines were clipped. Both now ellipsize on one line. The title keeps its weight(1f, fill = false), so it still gives up width to the mute bell. ConversationTitleBarTest moves to native graphics: under the legacy mode text has no real width, and a long title laid out on one line with or without the fix.
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 long chat name wrapped inside the conversation bar. The bar is a fixed 56dp, so the second and third lines were clipped rather than growing the bar. The title
Textand the group member-count line inChatTopBarhad nomaxLines; both now takemaxLines = 1andTextOverflow.Ellipsis.The title keeps
weight(1f, fill = false), so a long name loses its tail and the mute bell stays beside it.ConversationTitleBarTestgainsa long title stays on one line, which checks the laid-out line count of a muted group's long title. Before this change it laid out on 3 lines.@GraphicsMode(NATIVE). In legacy mode text has no real width, so the long title fit on one line with or without the fix.rendersLongGroupTitleBarandrendersLongNameTopBarwrite muted short and long bars tobuild/screenshots/next to the existing top-bar renders.Section C of the chat polish spec. iOS's half of it, the title filling the width after the back button, is a separate change.