-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #3822: Remove maxLines contsraint's to enable long text to linebreak #4547
Fix #3822: Remove maxLines contsraint's to enable long text to linebreak #4547
Conversation
@KevinGitonga my only concern with the solution is it may not work for longer translations that we might encounter in the future. I wonder: is it reasonable to introduce line-wrapping here, instead, for cases when the title is too long? @rt4914 curious about your thoughts here, too. |
@BenHenning it actually makes sense to move the extra text to next line, I have updated maxLines from 1 to 2 to allow the extra text to move to the next line. This is with assumption that the translated text can never be more than 2 lines. I have reverted changes on end and start margins as this will not work and the device's screen gets thinner line wrapping would work better. |
Thanks @KevinGitonga. Can you also update the screenshots in the PR? It's hard to verify the code just by looking at it, so the screenshots are really important to also convey the difference from a user's perspective. I'm also assigning @rt4914 so that he can leave his thoughts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KevinGitonga Please update your PR title and description as you are not making any change to margins.
Thanks.
@@ -45,7 +45,7 @@ | |||
android:layout_marginBottom="16dp" | |||
android:fontFamily="sans-serif-medium" | |||
android:gravity="center_horizontal" | |||
android:maxLines="1" | |||
android:maxLines="2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove this maxLines
attributes completely for this screen. So that even if in some screen it goes to three-lines the UI will be visible fully.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes Applied.
Hey @rt4914 have made the changes as requested PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KevinGitonga PTAL
@@ -41,7 +41,7 @@ | |||
android:layout_marginTop="48dp" | |||
android:layout_marginEnd="160dp" | |||
android:gravity="center_horizontal" | |||
android:maxLines="1" | |||
android:maxLines="2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same previous comment applies to this code too.
Remove maxLines attribute.
Also, please re-generate screenshots and update PR description just to be sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted.
@@ -43,7 +43,7 @@ | |||
android:layout_marginBottom="16dp" | |||
android:fontFamily="sans-serif-medium" | |||
android:gravity="center_horizontal" | |||
android:maxLines="1" | |||
android:maxLines="2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same previous comment applies to this code too.
Remove maxLines attribute.
Also, please re-generate screenshots and update PR description just to be sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted.
@@ -43,7 +43,7 @@ | |||
android:layout_marginEnd="160dp" | |||
android:fontFamily="sans-serif-medium" | |||
android:gravity="center_horizontal" | |||
android:maxLines="1" | |||
android:maxLines="2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same previous comment applies to this code too.
Remove maxLines attribute.
Also, please re-generate screenshots and update PR description just to be sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted.
@rt4914 have made changes. For phone screenshots they are similar to those shared and for the tablet also they remain as i had updated. This is after checking on my device and tablet emulator on both Portrait and Landscape. PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks.
@KevinGitonga CI checks are failing. Have a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @KevinGitonga! This also LGTM.
Except one thing @KevinGitonga: please make sure to update the title to include the bug being fixed (as I edited just now) for future PRs. |
Thank's @BenHenning well noted. |
Explanation
Fix #3822: This PR fixes Portuguese text cut off by completely removing maxLines contraint's used in the several variations of the onboarding_slide layouts on the title text . This allows for the text to easily break to the next line incase the text is very long to fit in a single line.
Essential Checklist
For UI-specific PRs only
If your PR includes UI-related changes, then:
Phone screenshots
Tab screenshots