-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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: Settings - Long email address appears differently between Android native and mWeb #30173
Conversation
@jjcoffee With my original proposed solution, the last ellipsis was being cut off by the text view on Android native thereby only displaying two ellipses instead of three. In order to maintain consistency to ensure that three ellipses are always displayed, I added a wrapper view on the profile page and some horizontal margin on the display name text view. |
Reviewer Checklist
Screenshots/Videos |
Could this be why I'm getting a slightly different space available to fill here? (Not 100% on whether we expect both display and email fields to fill to the same degree) |
@jjcoffee Yes, it's probably due to the extra margin on the display name text view. I tried reducing the margin but it still cuts off the third ellipsis by half on Android native, so you have two and a half ellipses displayed which is just weird. Maybe we could get some opinions from the design team on this? |
@jjcoffee bump |
@akinwale Hmm tricky one! Have you looked into any other ways of solving it? Maybe adjusting the margin on the element below? Or maybe sorting the root cause of the ellipses not showing correctly on Android. I agree that we definitely don't want to show less than 3 ellipses (particularly not half of one!), but it would also be a regression to have the spacing between the two not align, as the same email would show like this on current staging: Let's see if we can find a fix before annoying the design team 😄 |
Yeah, I suppose I can increase the horizontal margin for the text view below. |
While I investigated a while back, I discovered some bugs with text getting cut off on Android native.
Figured adding the horizontal margin fixed it, but apparently not on some native devices. Not quite sure what the best course of action is here. |
Thanks for the extra context. Looks like the issue was fixed and a decision was made to wait for it to "eventually" get merged, so we're probably good to just ignore it in this PR. So you can revert the margin tweak, I think. Curious about why the subtitle above isn't truncating correctly, though? |
Not entirely sure, but I would guess it's probably for the same reason as the root cause. The behaviour just varies based on the text content. So just to confirm next steps here:
|
Sounds like a plan! |
@jjcoffee Done! This is ready for review. |
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!
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 look good, NAB but would like to here what you think before I merge
@@ -357,15 +357,15 @@ function InitialSettingsPage(props) { | |||
</PressableWithoutFeedback> | |||
</Tooltip> | |||
<PressableWithoutFeedback | |||
style={[styles.mt1, styles.mw100]} | |||
style={[styles.mt1, styles.w100, styles.mw100]} |
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.
Do we need both styles.w100 and styles.mw100?
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.
Missed this. I don't think max-width 100% is required anymore, since 100% width is fixed. It doesn't hurt to leave both in, however. https://developer.mozilla.org/en-US/docs/Web/CSS/max-width
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/grgia in version: 1.3.94-0 🚀
|
1 similar comment
🚀 Deployed to staging by https://github.com/grgia in version: 1.3.94-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.94-2 🚀
|
🚀 Deployed to staging by https://github.com/grgia in version: 1.3.95-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.95-9 🚀
|
Details
Modifies the text styles to better handle ellipsize on Android.
Fixed Issues
$ #30023
PROPOSAL: #30023 (comment)
Tests
Offline tests
N/A
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop