fix: Settings - Long email address appears differently between Android native and mWeb#30173
fix: Settings - Long email address appears differently between Android native and mWeb#30173grgia merged 3 commits intoExpensify:mainfrom
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. |
grgia
left a comment
There was a problem hiding this comment.
Changes look good, NAB but would like to here what you think before I merge
| </Tooltip> | ||
| <PressableWithoutFeedback | ||
| style={[styles.mt1, styles.mw100]} | ||
| style={[styles.mt1, styles.w100, styles.mw100]} |
There was a problem hiding this comment.
Do we need both styles.w100 and styles.mw100?
There was a problem hiding this comment.
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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop