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
2.99k stars 2.5k forks source link

Search - Transaction report shows multiline title for expense with multiline description #41584

Open lanitochka17 opened 2 weeks ago

lanitochka17 commented 2 weeks 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!


Version Number: 1.4.70-0 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. Go to staging.new.expensify.com
  2. Go to FAB > Submit expense
  3. Submit an expense containing multiline description and no merchant
  4. Click on the search icon
  5. If the transaction report does not show up in Search list, go to transaction thread and edit the description while maintaining multiline format

Expected Result:

The transaction report in search list will show single line title

Actual Result:

The transaction report in search list shows multiline title

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/2d457c02-a1d3-403b-8bad-7d31bc0d66a0

View all open jobs on GitHub

melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @kevinksullivan (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 commented 2 weeks ago

@kevinksullivan 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 commented 2 weeks ago

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

nkdengineer commented 2 weeks ago

Proposal

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

The transaction report in search list shows multiline title

What is the root cause of that problem?

In HeaderView or LHN, we use DisplayNames component to show to report name and it used ReportUtils.formatReportLastMessageText function to replace all break line to space character.

https://github.com/Expensify/App/blob/2f5173c9c0f041967acfbdf9581ce52327623fa6/src/components/DisplayNames/DisplayNamesWithTooltip.tsx#L59

But in UserListItem, we don't do this so the bug happens in the finder page. https://github.com/Expensify/App/blob/2f5173c9c0f041967acfbdf9581ce52327623fa6/src/components/SelectionList/UserListItem.tsx#L122

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

We should do the same way as we do here to replace all line break when display the title of UserListItem

text={ReportUtils.formatReportLastMessageText(Str.removeSMSDomain(item.text ?? ''))}

https://github.com/Expensify/App/blob/2f5173c9c0f041967acfbdf9581ce52327623fa6/src/components/SelectionList/UserListItem.tsx#L122

What alternative solutions did you explore? (Optional)

NA

melvin-bot[bot] commented 1 week ago

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

melvin-bot[bot] commented 1 week ago

@kevinksullivan Eep! 4 days overdue now. Issues have feelings too...

kevinksullivan commented 1 week ago

Hm I am not experiencing this error @lanitochka17 . The search result shows as one line, even when I Am I misunderstanding?

image image
lanitochka17 commented 1 week ago

@kevinksullivan Need to create two transactions.

https://github.com/Expensify/App/assets/78819774/66b21a26-4a15-4119-b3ee-7b196398e682

melvin-bot[bot] commented 5 days ago

@kevinksullivan Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] commented 4 days ago

@kevinksullivan Huh... This is 4 days overdue. Who can take care of this?

melvin-bot[bot] commented 3 days ago

@kevinksullivan Still overdue 6 days?! Let's take care of this!

melvin-bot[bot] commented 2 days ago

@kevinksullivan Still overdue 6 days?! Let's take care of this!

melvin-bot[bot] commented 1 day ago

@kevinksullivan this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!