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

Profile - Settings - Longer email is overflowing the border #4622

Closed
kavimuru opened this issue Aug 12, 2021 · 28 comments
Closed

Profile - Settings - Longer email is overflowing the border #4622

kavimuru opened this issue Aug 12, 2021 · 28 comments
Assignees
Labels
Daily KSv2 Design Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Improvement Item broken or needs improvement. Reviewing Has a PR in review

Comments

@kavimuru
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to https://staging.new.expensify.com
  2. Log in with account where you haven't set up your First and Last name
  3. Go to Settings

Expected Result:

Longer email isn't overflowing the border

Actual Result:

Long email is overflowing the border

Workaround:

Unknown

Platform:

Unknown
Where is this issue occurring?

  • Web
  • Mobile Web

Version Number: 1.0.85-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Bug5190857_applause_account

Expensify/Expensify Issue URL:

View all open jobs on Upwork

@kavimuru kavimuru added Engineering Improvement Item broken or needs improvement. labels Aug 12, 2021
@MelvinBot
Copy link

Triggered auto assignment to @iwiznia (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@isagoico isagoico changed the title Web/mWeb - Profile - Settings - Longer email is overflowing the border Profile - Settings - Longer email is overflowing the border Aug 12, 2021
@iwiznia
Copy link
Contributor

iwiznia commented Aug 13, 2021

@Expensify/design any ideas on how to solve this?

@MelvinBot
Copy link

Triggered auto assignment to @sylveawong (Design), see these Stack Overflow questions for more details.

@iwiznia iwiznia removed their assignment Aug 13, 2021
@shawnborton
Copy link
Contributor

I'd say we just truncate via ellipsis. This should be easy to do with RN.

@iwiznia
Copy link
Contributor

iwiznia commented Aug 13, 2021

Is that via a fixed number of characters or a style property that specifies that anything that does not fit will get an ellipsis?

@shawnborton
Copy link
Contributor

shawnborton commented Aug 13, 2021

I think you just specify that the text should only be 1 line and it should be truncated via ellipsis... https://reactnative.dev/docs/text#numberoflines & https://reactnative.dev/docs/text#ellipsizemode

@rdjuric
Copy link
Contributor

rdjuric commented Aug 13, 2021

I think we solved a very similar problem in #3172. We truncated via ellipsis by giving the width of the container to the text, and fixing a numOfLines=1.

@parasharrajat
Copy link
Member

parasharrajat commented Aug 13, 2021

Proposal

It just needs text clipping as you said.
We need to add maxWidth:100% to pressable and all set.

<Pressable style={[styles.mt1]} onPress={openProfileSettings}>

We are already using the clipping on text and numberOfLines 1.

@iwiznia iwiznia added the External Added to denote the issue can be worked on by a contributor label Aug 13, 2021
@MelvinBot
Copy link

Triggered auto assignment to @JmillsExpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@JmillsExpensify
Copy link

Upwork job is here: https://www.upwork.com/jobs/~01ba5c8069caabd21c.

@MelvinBot MelvinBot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 13, 2021
@MelvinBot
Copy link

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

@mfkrause
Copy link

Proposal

As already discussed here, this problem should be easy to fix by truncating the overflowing email using ellipsis. The text is overflowing because the corresponding <Text> has a parent <Pressable> container that is not limited in width:

<Pressable style={[styles.mt1]} onPress={openProfileSettings}>

By limiting the max-width to 100%, the text would not be overflowing anymore and would be truncated:
CleanShot 2021-08-13 at 18 29 41@2x

In addition to this, based on the desired UX, you could also truncate the text before the @ symbol and instead display the full domain using some additional code logic. This would then look something like this:
CleanShot 2021-08-13 at 18 31 31@2x

Personally, I'd probably prefer the first solution since, depending on the length of the domain name, the text might be truncated twice when using the second solution.

@shawnborton
Copy link
Contributor

Thanks for exploring the multiple options. I agree, I think Option 1 is best and is the most predictable across use cases.

@deetergp
Copy link
Contributor

I agree that option 1 is what most folks would expect. Let's go with @parasharrajat's proposal.

@parasharrajat
Copy link
Member

parasharrajat commented Aug 13, 2021

PR is up ⬆️

@isagoico
Copy link

Issue reproducible during KI retests

@deetergp
Copy link
Contributor

Reviewing now…

@MelvinBot MelvinBot removed the Overdue label Aug 16, 2021
@deetergp deetergp added the Reviewing Has a PR in review label Aug 16, 2021
@deetergp
Copy link
Contributor

Looks good, thanks @parasharrajat 👍

@JmillsExpensify JmillsExpensify changed the title Profile - Settings - Longer email is overflowing the border [Hold for payment 8/23] Profile - Settings - Longer email is overflowing the border Aug 20, 2021
@isagoico
Copy link

Issue not reproducible during KI retests (Fixed)

@MelvinBot
Copy link

@deetergp, @JmillsExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@MelvinBot
Copy link

@deetergp, @JmillsExpensify Eep! 4 days overdue now. Issues have feelings too...

@parasharrajat
Copy link
Member

Any update on the Upwork job?

@JmillsExpensify
Copy link

Closed out the Upwork job. Feel free to message me on Slack if I can help with anything else!

@JmillsExpensify
Copy link

Also any idea why this issue didn't automatically close with the production deploy yesterday?

@JmillsExpensify
Copy link

Oh oops. I must have misunderstood your last comment. Per the linked PR this is still under the regression period, which will clear on 9/1.

@JmillsExpensify JmillsExpensify changed the title [Hold for payment 8/23] Profile - Settings - Longer email is overflowing the border Profile - Settings - Longer email is overflowing the border Aug 26, 2021
@RohanPunjani
Copy link

I think the issue is fixed. Please close it 😅

@isagoico
Copy link

Issue not reproducible during KI retests (Fixed)

@deetergp
Copy link
Contributor

Closing since this is no longer reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Design Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Improvement Item broken or needs improvement. Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests