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

[$125] Android - LHN - Sending a text+attachment displays text with ellipsis. #46190

Closed
1 of 6 tasks
lanitochka17 opened this issue Jul 25, 2024 · 32 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 25, 2024

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.12
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch app
  2. Tap on a report
  3. Send a text+attachment choosing a image from gallery
  4. Navigate to LHN

Expected Result:

Sending a text+attachment must display text+attachment in LHN

Actual Result:

Sending a text+attachment displays text with ellipsis

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

Add any screenshot/video evidence

Bug6552316_1721890748266.Screenrecorder-2024-07-25-12-22-52-482_compress_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0143efae25694044fa
  • Upwork Job ID: 1819194218797436242
  • Last Price Increase: 2024-09-09
Issue OwnerCurrent Issue Owner: @mollfpr
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 25, 2024
Copy link

melvin-bot bot commented Jul 25, 2024

Triggered auto assignment to @RachCHopkins (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.

@lanitochka17
Copy link
Author

@RachCHopkins FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@RachCHopkins
Copy link
Contributor

@lanitochka17 do we know what "Sending a text+attachment must display text+attachment in LHN" means? I can't decipher the meaning of this statement, what should show in the LHN?

@lanitochka17
Copy link
Author

That is the word Attachment should be displayed instead of ...

@melvin-bot melvin-bot bot added the Overdue label Jul 31, 2024
Copy link

melvin-bot bot commented Aug 1, 2024

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

@RachCHopkins RachCHopkins added the External Added to denote the issue can be worked on by a contributor label Aug 2, 2024
@melvin-bot melvin-bot bot changed the title Android - LHN - Sending a text+attachment displays text with ellipsis. [$250] Android - LHN - Sending a text+attachment displays text with ellipsis. Aug 2, 2024
Copy link

melvin-bot bot commented Aug 2, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0143efae25694044fa

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 2, 2024
Copy link

melvin-bot bot commented Aug 2, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Aug 2, 2024
@RachCHopkins
Copy link
Contributor

Thanks @lanitochka17

@daledah
Copy link
Contributor

daledah commented Aug 2, 2024

Proposal

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

Sending a text+attachment displays text with ellipsis

What is the root cause of that problem?

In many places we use formatReportLastMessageText

  • result.alternateText = ReportUtils.formatReportLastMessageText(getWelcomeMessage(report, policy).messageText ?? Localize.translateLocal('report.noActivityYet'));
  • result.alternateText = ReportUtils.formatReportLastMessageText(TaskUtils.getTaskReportActionMessage(lastAction).text);

The idea is that we'll format the last message text correctly by replacing line breaks with spaces, trim the value to a max length, ...

return StringUtils.lineBreaksToSpaces(String(lastMessageText).trim()).substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH).trim();

However we don't use it consistently for all places, so in this text + attachment case, formatReportLastMessageText is not applied and the last message text is displayed with line breaks like

24

[Attachment]

As the last message text has numberOfLines 1, it will show ellipsis.

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

We need to make sure to apply formatReportLastMessageText consistently for all cases of last message text. The best way is to update right before we display it, here to

{ReportUtils.formatReportLastMessageText(Parser.htmlToText(optionItem.alternateText))}

After that optionally we can remove some other usage of formatReportLastMessageText like the ones mentioned in RCA, because using it here should be adequate for the last message text to be displayed correctly.

What alternative solutions did you explore? (Optional)

Use ReportUtils.formatReportLastMessageText and Parser.htmlToText for individual cases when we set the result.alternateText:

Another thing we could contemplate is to trim unnecessary spaces in formatReportLastMessageText, so if there's any multiple spaces sequentially they could be replaced by 1 space. However that seems out of scope of the issue.

Copy link
Contributor

github-actions bot commented Aug 2, 2024

true

@daledah
Copy link
Contributor

daledah commented Aug 2, 2024

Proposal modified to add a small detail

Copy link
Contributor

github-actions bot commented Aug 2, 2024

true

Copy link

melvin-bot bot commented Aug 5, 2024

@mollfpr, @RachCHopkins Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Aug 5, 2024
@mollfpr
Copy link
Contributor

mollfpr commented Aug 5, 2024

@daledah Could you explain why it's only happen in native?

@melvin-bot melvin-bot bot removed the Overdue label Aug 5, 2024
@daledah
Copy link
Contributor

daledah commented Aug 6, 2024

@mollfpr Great question! That's because in web, the alternate text has white-space: no-wrap, so both text and attachment are shown on the same line due to no-wrap behavior. Meanwhile on native there's no such property for Text. whiteSpace is disabled specifically for native as can see here.

So the problem is mostly only visible in native, although in web the alternateText is also formatted incorrectly but the no-wrap behavior hides the bug.

@mollfpr
Copy link
Contributor

mollfpr commented Aug 7, 2024

@daledah That's make sense to me!

The proposal looks good, but I would prefer the alternative solution incase we will use getOptionData in somewhere else then the alternateText is well formatted.

🎀 👀 🎀 C+ reviewed!

Copy link

melvin-bot bot commented Aug 7, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 7, 2024
Copy link

melvin-bot bot commented Aug 7, 2024

📣 @daledah You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@greg-schroeder
Copy link
Contributor

fyi @RachCHopkins the PR for this issue led to a regression (#47248). I'm not paying folks in that issue, but they should be subject to the regression penalty in this one (if you haven't paid them yet, which it seems like you haven't)

Copy link

melvin-bot bot commented Aug 30, 2024

This issue has not been updated in over 15 days. @mollfpr, @RachCHopkins, @techievivek, @daledah eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@RachCHopkins
Copy link
Contributor

@techievivek @mollfpr I can't actually tell what's going on with this issue - is someone able to give me a quick summary of where it's at?

@mollfpr
Copy link
Contributor

mollfpr commented Sep 6, 2024

@RachCHopkins I think it's ready for the payment summary. The original PR and follow-up PR were in production last month.

@RachCHopkins RachCHopkins changed the title [$250] Android - LHN - Sending a text+attachment displays text with ellipsis. [$125] Android - LHN - Sending a text+attachment displays text with ellipsis. Sep 9, 2024
Copy link

melvin-bot bot commented Sep 9, 2024

Upwork job price has been updated to $125

@RachCHopkins
Copy link
Contributor

Payment Summary:

Contributor: @daledah to be paid $125 via Upwork
Contributor+: @mollfpr to be paid $125 via NewDot Manual Request
Upwork job here

@RachCHopkins
Copy link
Contributor

@daledah I have sent you another proposal!

@rohit9625
Copy link
Contributor

I just saw the job on upwork but after reading the comments, I am unsure if it's fixed now or not. Could anyone please clarify?

Copy link

melvin-bot bot commented Sep 9, 2024

📣 @rohit9625! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@daledah
Copy link
Contributor

daledah commented Sep 14, 2024

@daledah I have sent you another proposal!

Thank you @RachCHopkins I have accepted

@RachCHopkins
Copy link
Contributor

Sorry for the confusion @rohit9625 - that was me trying to get a fresh offer to the person who'd already fixed the issue.

Contributor has been paid, the contract has been completed, and the Upwork post has been closed.

@rohit9625
Copy link
Contributor

Sorry for the confusion @rohit9625 - that was me trying to get a fresh offer to the person who'd already fixed the issue.

No problem, Thanks :)

@garrettmknight
Copy link
Contributor

$125 approved for @mollfpr

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. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review
Projects
No open projects
Status: Done
Development

No branches or pull requests

8 participants