Skip to content
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

[HOLD for payment 2023-11-09] [$500] Settings - Long email address appears differently on the Android & mWeb #30023

Closed
2 of 6 tasks
lanitochka17 opened this issue Oct 19, 2023 · 26 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 19, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.3.87-1

Reproducible in staging?: Yes

Reproducible in production?: Yes

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

Action Performed:

Pre-condition: Use Long email address account

  1. Launch app
  2. Tap profile icon
  3. Note the way display name is truncated
  4. Go to https://staging.new.expensify.com/
  5. Tap profile icon
  6. Note the way display name is truncated

Expected Result:

An account with a long email address must appear in similar way in both Android & mWeb settings page

Actual Result:

An account with a long email address appears differently on the Android & mWeb settings page. The email address is truncated differently in mweb and Android

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Android: Native

Bug6243491_1697744147669!Screenshot_2023-10-19-18-56-24-885_com expensify chat-edit

Bug6243491_1697744147656!Screenshot_2023-10-19-18-56-56-838_com android chrome-edit

Bug6243491_1697744147661.dis.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01af2e4c9502542f72
  • Upwork Job ID: 1715099845001293824
  • Last Price Increase: 2023-10-19
  • Automatic offers:
    • jjcoffee | Reviewer | 27326758
    • akinwale | Contributor | 27326759
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

Triggered auto assignment to @conorpendergrast (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot changed the title Settings - Long email address appears differently on the Android & mWeb [$500] Settings - Long email address appears differently on the Android & mWeb Oct 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01af2e4c9502542f72

@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External)

@akinwale
Copy link
Contributor

akinwale commented Oct 19, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Long email address does not fill up the available width on the profile page on Android native as opposed to mWeb.

What is the root cause of that problem?

The Text component which displays the email address or display name in the InitialSetingsPage component does not automatically fill up the available space.

<PressableWithoutFeedback
style={[styles.mt1, styles.mw100]}
onPress={openProfileSettings}
accessibilityLabel={translate('common.profile')}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.LINK}
>
<Tooltip text={translate('common.profile')}>
<Text
style={[styles.textHeadline, styles.pre]}
numberOfLines={1}
>
{props.currentUserPersonalDetails.displayName ? props.currentUserPersonalDetails.displayName : props.formatPhoneNumber(props.session.email)}
</Text>
</Tooltip>
</PressableWithoutFeedback>

This also happens in the ProfilePage component.

<Text
style={[styles.textHeadline, styles.mb6, styles.pre]}
numberOfLines={1}
>
{displayName}
</Text>

What changes do you think we should make in order to solve the problem?

In InitialSettingsPage, add styles.w100 to the PressableWithoutFeedback containing the Text component that shows the display name / email, and add the styles.textAlignCenter style to the Text component to keep the text center-aligned.

Add the following styles to the Text component in ProfilePage.

  1. styles.w100 to make sure the component expands to fill up the container width
  2. styles.textAlignCenter to keep the text center-aligned.

What alternative solutions did you explore? (Optional)

None.

Screenshot from 2023-10-19 21-55-16

@jjcoffee
Copy link
Contributor

@akinwale Thanks for the proposal! LGTM but wondering if you have any insight as to why the behaviour is different on mWeb vs native?

@akinwale
Copy link
Contributor

@akinwale Thanks for the proposal! LGTM but wondering if you have any insight as to why the behaviour is different on mWeb vs native?

I'm not quite sure why it's happening on Android. There seems to be some sort of aggressive wrapping going on after the + sign in the text on native Android in order to display the ellipsis at the end.

On Web, a div is used to display the text, which defaults to block display, resulting in the div taking up the full width of its container.

@situchan
Copy link
Contributor

Same root cause - #24339

@jjcoffee
Copy link
Contributor

@akinwale Makes sense to me, thanks!

Happy to go with @akinwale's proposal. The root cause is correct and the fix is nice and straight forward!

🎀👀🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

Triggered auto assignment to @grgia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@jjcoffee
Copy link
Contributor

@situchan Hmm I don't think the issues are really linked though, since the fix here is much more straightforward since we don't have to worry about causing any regressions from setting the header to 100% width.

@situchan
Copy link
Contributor

@jjcoffee you were asking about inconsistency so I explained why it's truncated in android native only.

@situchan
Copy link
Contributor

So it's related to ellipsizeMode property in android

@jjcoffee
Copy link
Contributor

@situchan Ah okay gotcha, thanks! I couldn't find the root cause in the issue you linked since that thread is so long 😅 I think setting the width to 100% works fine for us here.

@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2023
@conorpendergrast
Copy link
Contributor

Waiting for @grgia to review (this was assigned on her Friday morning!)

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

📣 @akinwale 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@grgia
Copy link
Contributor

grgia commented Oct 23, 2023

@akinwale thank you for your proposal, assigning!

@akinwale
Copy link
Contributor

@jjcoffee My PR is ready for review. Thanks.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 2, 2023
@melvin-bot melvin-bot bot changed the title [$500] Settings - Long email address appears differently on the Android & mWeb [HOLD for payment 2023-11-09] [$500] Settings - Long email address appears differently on the Android & mWeb Nov 2, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 2, 2023
Copy link

melvin-bot bot commented Nov 2, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Nov 2, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.94-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-11-09. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Nov 2, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@akinwale / @jjcoffee] The PR that introduced the bug has been identified. Link to the PR:
  • [@akinwale / @jjcoffee] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@akinwale / @jjcoffee] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@akinwale / @jjcoffee] Determine if we should create a regression test for this bug.
  • [@akinwale / @jjcoffee] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@conorpendergrast] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: https://github.com/Expensify/Expensify/issues/334908

@jjcoffee
Copy link
Contributor

jjcoffee commented Nov 2, 2023

  • The PR that introduced the bug has been identified. Link to the PR: N/A - looks like this style was always missing
  • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: N/A
  • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
  • Determine if we should create a regression test for this bug. Yes
  • If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression test proposal

  1. Sign in to an account with a very long email address (e.g. [email protected]).
  2. Tap the profile icon and verify that the display name is not truncated half-way on Android native.
  3. Open the profile page of any account with the same email address format as in step 1.
  4. Verify that the display name is not truncated half-way on Android native.
    Do we agree 👍 or 👎

@conorpendergrast
Copy link
Contributor

conorpendergrast commented Nov 9, 2023

QA test request created: https://github.com/Expensify/Expensify/issues/334908

@conorpendergrast
Copy link
Contributor

conorpendergrast commented Nov 9, 2023

Payouts due:

Issue Reporter: N/A - Applause

Eligible for 50% #urgency bonus? No (PR created before the announcement, but not merged within the urgency period)

Upwork job is here.

@conorpendergrast
Copy link
Contributor

All done, thanks everyone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

6 participants