Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.56k stars 2.9k forks source link

Split bill - Receiver can't see "Split bill $" at the LHN in case of long Sender's name/email #21003

Closed lanitochka17 closed 1 year ago

lanitochka17 commented 1 year ago

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


Issue found when executing PR https://github.com/Expensify/App/pull/20752

Action Performed:

  1. Create a Split bill (with a long Sender's email/name)
  2. Check the Receiver's side LHN

Expected Result:

Receiver side should see "Split bill $summ" text at the LHN

Actual Result:

In case of long Sender's email/name there is not enough room at the LHN to see "Split bill $summ" on the Receiver's side

Workaround:

Unknown

Platforms:

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

Version Number: 1.3.29.0

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

Notes/Photos/Videos: Any additional supporting documentation

https://github.com/Expensify/App/assets/78819774/2077fd90-a97e-4078-a570-a6f3f29cf878

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

spcheema commented 1 year ago

Proposed solution

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

Split bill amount is being trimmed due to long name of the last actor on split bill.

What is the root cause of that problem?

Max visible char fit in the LHN description is around 50 (lastActorDetails.displayName and lastMessageTextFromReport)

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

In case of split bill report type: Render lastActorDetails.displayName & lastMessageTextFromReport into reparate containers and show ellipsis for lastActorDetails.displayName container only.

Below is final HTML output

<div aria-label="parent container "style="display: flex;">
  <div style="overflow: hidden;text-overflow: ellipsis;">Sp. long name Cheema fasdfasfsdfasdfsd</div>
  <div>: split A$35,555.00</div>
</div>
Pasted Graphic 2

What alternative solutions did you explore? (Optional)

So here is the formula:

if len(lastActorDetails.displayName) + len(lastMessageTextFromReport) > 50 {

    possibleNameLength = 50  - len(lastMessageTextFromReport)

    possibleNameLengthWithEllipsis =  possibleNameLength- 3

    then diplay `possibleNameLengthWithElipiss char of lastActorDetails.displayName` and `...`    
}

<img width="373" alt="Pasted Graphic" src="https://github.com/Expensify/App/assets/19812199/c9677d6b-7c14-4b76-96c9-ac376650c05a">
Pasted Graphic

Another solution is leave it as-is since long name isn't very common. Only in South India

MitchExpensify commented 1 year ago

Unable to reproduce on Chrome:

image
MitchExpensify commented 1 year ago

Or on the desktop app:

image

Closing until we have reliable reproduction steps!

spcheema commented 1 year ago

@MitchExpensify it’s reproducible. Whenever last actor got a long name, split bill isn’t visible. But long names aren’t very as I mentioned in proposal

MitchExpensify commented 1 year ago

I am unable to reproduce using the step in the main issue. What steps are you following @spcheema ? Perhaps I can try them with more success

spcheema commented 1 year ago

@MitchExpensify Set long name for your profile as in the screenshot

image

then create a split bill and you will noticed the issue.

image

But I agree long names are not very common except South India