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

Expense - No "&" when the display name is long, name overlaps with time on Android & iOS #50547

Closed
6 tasks done
IuliiaHerets opened this issue Oct 10, 2024 · 9 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@IuliiaHerets
Copy link

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: 9.0.47-1
Reproducible in staging?: Y
Reproducible in production?: N
Issue was found when executing this PR: #50341
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

Precondition:

  • Display name is a long email.
  1. Go to staging.new.expensify.com
  2. Go to FAB > Submit expense.
  3. Submit an expense to a user with long email as display name.
  4. Go to DM with that user.

Expected Result:

On web, there will be "&" between the sender and receiver display name.
On Android and iOS app, the name will not overlap with time.

Actual Result:

On web, there is no "&" between the sender and receiver display name.
On Android and iOS app, the name overlaps with time.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6630080_1728511606916!Screenshot_2024-10-10_at_06 06 31
Bug6630080_1728511523633.20241010_060149.mp4

View all open jobs on GitHub

@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Oct 10, 2024
Copy link

melvin-bot bot commented Oct 10, 2024

Triggered auto assignment to @nkuoch (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Oct 10, 2024

💬 A slack conversation has been started in #expensify-open-source

Copy link

melvin-bot bot commented Oct 10, 2024

Triggered auto assignment to @anmurali (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added the Daily KSv2 label Oct 10, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Oct 10, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@bernhardoj
Copy link
Contributor

bernhardoj commented Oct 10, 2024

Edited by proposal-police: This proposal was edited at 2024-10-10 10:53:00 UTC.

Proposal

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

The & becomes ellipsis and the text overlaps the message date.

What is the root cause of that problem?

When the text is very long, the & is shrinked, so it only shows ellipsis. The long text also overlaps the date because we don't prevent the text to grow out of their bounds. For this overlap issue, we actually already have a flex1 style for both first and second users.

<View style={[styles.flexRow]}>
<ReportActionItemFragment
style={[styles.flex1]}

However, the style prop is not used for the text component.

<Text
numberOfLines={isSingleLine ? 1 : undefined}
style={[styles.chatItemMessageHeaderSender, isSingleLine ? styles.pre : styles.preWrap]}
>
{fragment?.text}

So the style is currently useless.

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

First, accept the style prop and apply it to the text component here.

<Text
numberOfLines={isSingleLine ? 1 : undefined}
style={[styles.chatItemMessageHeaderSender, isSingleLine ? styles.pre : styles.preWrap]}
>
{fragment?.text}

For the & becomes ellipsis, we need to add flexShrink0 to the text so it never shrinks.

<Text
numberOfLines={1}
style={[styles.chatItemMessageHeaderSender, styles.pre]}
>
{` & `}
</Text>

Last, replace the flex1 style with flexShrink1 style.

<ReportActionItemFragment
style={[styles.flex1]}

<ReportActionItemFragment
style={[styles.flex1]}

<ReportActionItemFragment
style={[styles.flex1]}

If we keep the flex1 style, the text won't be visible.
image

Because flex1 will scale based on the parent's available space, but the parent itself doesn't have a defined width(?).

<PressableWithoutFeedback
style={[styles.flexShrink1, styles.mr1]}

Result:
image
image

Copy link

melvin-bot bot commented Oct 10, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@mountiny
Copy link
Contributor

Revert PR was merged #50557 assigning Georgia so you dont loose track of this

@grgia
Copy link
Contributor

grgia commented Oct 14, 2024

Closing out since we reverted the PR and I've addressed in a follow up

@grgia grgia closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests

6 participants