fix: truncate long contact name in favorites tile (WT-1051)#1373
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes WT-1051 layout break in the Favorites list by ensuring long favorite contact names (and the subtitle) are truncated instead of wrapping/overflowing, aligning behavior with ContactTile.
Changes:
- Add
maxLines: 1andTextOverflow.ellipsistoFavoriteTiletitle in both presence and non-presence branches. - Add
maxLines: 1andTextOverflow.ellipsistoFavoriteTilesubtitle.
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.
Overview
WT-1051 reported that a long contact name in the Contacts list was not truncated and overflowed, breaking the list layout. The Contacts tabs were already fixed by WT-1537 (ContactTile now wraps the name in an Expanded with
maxLines+TextOverflow.ellipsis), but the Favorites tile had the same defect left over.FavoriteTilerendered the name and the label/number subtitle through a plainListTilewith no line or overflow constraint, so a long favorite name still wrapped over multiple lines.Changes
favorite_tile.dart: addmaxLines: 1+overflow: TextOverflow.ellipsisto the title (both presence and non-presence branches) and to the subtitle, matching the truncation behavior ofContactTile.Testing
dart format --set-exit-if-changedclean.dart analyzeon the file: no issues.