Let grid file names wrap onto a second line - #17541
Open
sandbranch wants to merge 1 commit into
Open
Conversation
Grid labels were a single line ellipsized in the middle. On narrower cells that left names unreadable and sometimes indistinguishable, with two different folders both rendering as "Re...es". Allow the label a second line so a long name wraps instead of being cut, while names that fit keep using a single line and no extra height. Signed-off-by: David Sandquist <sandquist@gmail.com>
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.
Problem
Grid labels are a single line ellipsized in the middle. On narrower cells that leaves names unreadable, and sometimes indistinguishable: two different folders in my own account both rendered as
Re...es.Fix
Allow the label a second line, so a long name wraps instead of being cut. Names that already fit keep using a single line and take no extra height, so cells with short names are unchanged.
Only
grid_item.xmlchanges:singleLinebecomesmaxLines="2"and the fixed height becomeswrap_content.Testing
Checked on a Samsung S23 and a Lenovo Tab P11 Pro (2nd gen), portrait and landscape.
Note
The bidirectional file name container in the same layout still uses a single line. Wrapping it means wrapping a name and its extension across two views, which needs more care than this change, so I left it alone rather than guess.