Open lanitochka17 opened 1 month ago
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.
@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
We think that this bug might be related to #vip-vsp
@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?
That is the word Attachment should be displayed instead of ...
@RachCHopkins Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Job added to Upwork: https://www.upwork.com/jobs/~0143efae25694044fa
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External
)
Thanks @lanitochka17
Sending a text+attachment displays text with ellipsis
In many places we use formatReportLastMessageText
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, ... https://github.com/Expensify/App/blob/5005f595661607d563d8ae3bd72e763971d9d873/src/libs/ReportUtils.ts#L1789
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.
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.
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.
true
Proposal modified to add a small detail
true
@mollfpr, @RachCHopkins Whoops! This issue is 2 days overdue. Let's get this updated quick!
@daledah Could you explain why it's only happen in native?
@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.
@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!
Triggered auto assignment to @techievivek, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
๐ฃ @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 ๐
fyi @RachCHopkins the PR for this issue led to a regression (https://github.com/Expensify/App/issues/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)
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!
@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?
@RachCHopkins I think it's ready for the payment summary. The original PR and follow-up PR were in production last month.
If you havenโt already, check out our contributing guidelines for onboarding and email contributors@expensify.com 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:
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?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/8c10f84d-4d8e-45e0-b894-d125f1c792d6
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mollfpr