Skip to content

Expense - Choose which description to select shown as tag when description entered with markdown #59793

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

Closed
3 of 8 tasks
jponikarchuk opened this issue Apr 8, 2025 · 11 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Reviewing Has a PR in review Weekly KSv2

Comments

@jponikarchuk
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: V9.1.24-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: #59365
Email or phone of affected tester (no customers): Slottwo1 [email protected]
Issue reported by: Applause Internal Team
Device used: Redminote 10s android 13
App Component: Money Requests

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Open a workspace chat
  3. Create 2 expenses with same amount
  4. For 1 expense, enter description with markdown eg: 4
  5. Open the expense preview
  6. Open any one expense - keep this one - review duplicates
  7. Choose which merchant to keep - select any option
  8. Choose which description to choose

Expected Result:

In review duplicate page , choose which description to choose must not be shown as tags when description entered with markdown.

Actual Result:

In review duplicate page , choose which description to choose shown as tags when description entered with markdown.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

@jponikarchuk jponikarchuk added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Apr 8, 2025
Copy link

melvin-bot bot commented Apr 8, 2025

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

@bernhardoj
Copy link
Contributor

bernhardoj commented Apr 8, 2025

Proposal

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

Descirption review duplicates option shown as HTML tag.

What is the root cause of that problem?

This happens after we save the description as an HTML tag. We show the description as it is.

const options = useMemo(
() =>
compareResult.change.description?.map((description) =>
!description?.comment
? {text: translate('violations.none'), value: ''}
: {
text: description.comment,
value: description.comment,
},
),

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

We can convert the HTML to either text or markdown.

text: Parser.htmlToMarkdown(description.comment),
Image

or

text: Parser.htmlToText(description.comment),
Image

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A

@daledah
Copy link
Contributor

daledah commented Apr 8, 2025

Dupe of #59733 and I'm implementing a fix in #59328
Oh wait, I just realized this is another component so it's not a dupe. But since the RCA are basically the same, cc @mountiny should we fix this as well?

@joekaufmanexpensify
Copy link
Contributor

Yeah, if this is the same issue in a different place, I think it makes sense to fix in the same PR.

@mountiny
Copy link
Contributor

mountiny commented Apr 8, 2025

@daledah yeah please add that to your PR

@joekaufmanexpensify
Copy link
Contributor

PR in review.

@joekaufmanexpensify joekaufmanexpensify added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 9, 2025
@joekaufmanexpensify
Copy link
Contributor

PR still in review

@suneox
Copy link
Contributor

suneox commented Apr 14, 2025

@joekaufmanexpensify I'd like to confirm the expected behavior for displaying the description when the markdown contains multiple lines.
Should we keep it as a single truncated line (as in the latest main), or display it in multiple lines?

The latest main After parse
Image Image

@joekaufmanexpensify
Copy link
Contributor

Yeah, I see we normally truncate long descriptions in this page. I don't really see a reason to change that. Feels beyond the scope of this markdown issue. Really long descriptions with duplicate expenses doesn't feel like a super common scenario.

Image

@joekaufmanexpensify
Copy link
Contributor

PR still in review

@joekaufmanexpensify
Copy link
Contributor

PR is on prod. @daledah closing this one as your payment will be handled in the original issue: #58553

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. Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants