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.98k stars 2.98k forks source link

[$250] Chat - Bold markdown gets triplicated when used as a second markdown in an emoji. #55115

Open IuliiaHerets opened 2 weeks ago

IuliiaHerets 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: 9.0.84-0 Reproducible in staging?: Yes Reproducible in production?: No Email or phone of affected tester (no customers): ibellicotest+171@gmail.com Issue reported by: Applause Internal Team Device used: Motorola MotoG60 - Android 12 - Chrome / Windows 10 - Chrome App Component: Other

Action Performed:

  1. Open the staging.new.expensify.com website.
  2. Open any chat.
  3. Compose a message with two markdowns, being the second one "Bold" and an emoji. Example: :smile
  4. Check the bold markdown behaviour with this action.

Expected Result:

Bold markdown should be displayed only once when used as a second markdown on an emoji.

Actual Result:

Bold markdown gets triplicated when used as second markdown in an emoji message.

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/1baf96f3-2bb0-4dae-9508-63d9da278825

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021881676503226665257
  • Upwork Job ID: 1881676503226665257
  • Last Price Increase: 2025-01-21
Issue OwnerCurrent Issue Owner: @sobitneupane
melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @grgia (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

melvin-bot[bot] commented 2 weeks ago

💬 A slack conversation has been started in #expensify-open-source

github-actions[bot] commented 2 weeks ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
shubham1206agra commented 2 weeks ago

@mountiny Please reopen this issue.

Skalakid commented 1 week ago

Is this issue still reproducible? Markdown syntaxes seem to work fine on the latest staging and dev

https://github.com/user-attachments/assets/d097c26f-3a9b-4e8e-828d-79d8835997c8

Skalakid commented 1 week ago

Oh I see, it occurs on the latest version of the Live Markdown

Skalakid commented 1 week ago

Hello, since the problem is serious and might be blocking another deploy, we decided to fix it by disabling splitting ranges on emojis on the web. Afterward, we will focus on enhancing the web parser to make it more bug-proof and flexible for range lengths. The more detailed info you can find in this Slack thread. Disabling this functionality on the web platform doesn't change anything because emojis styles can be fixed using CSS styles

Skalakid commented 1 week ago

Here is the PR with the fix that removes emoji splitting logic from the web and replaces it with the CSS fix. @shubham1206agra Thank you for the PR, however, there are many more cases where text is duplicated. My PR works around this so we can unblock some PRs and bump the library in the Live Markdown without generating deploy blockers.

Nevertheless, I encourage you to try to fix this issue by changing web parser logic and handling HTML structure building edge cases for situations where we have to split ranges on emojis but there are also styles like bold and inline code block. Here are some desired outcomes:

This is something that we will be working on in the future so if only you are interested feel free to submit the PR with the solution :D

melvin-bot[bot] commented 4 days ago

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

melvin-bot[bot] commented 4 days ago

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

shubham1206agra commented 4 days ago

@mountiny Maybe I am the best person to review the bump PR as I have the best context here.

Skalakid commented 4 days ago

Hello, here is the PR to NewDot and here is the PR to OldDot (we needed to update patch file name). Once both are approved we will merge them at the same time to not break anything (first NewDot and then OldDot)