App: [HOLD for payment 2023-06-21] [$1000] Chat - Italic `_@here_` is not displayed as mention

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Issue found when executing PR https://github.com/Expensify/App/pull/19610

Action Performed:

  1. Go to NewDot
  2. Open any chat
  3. Type _@here_ and send

Expected Result:

@here should be displayed as mention (and italic)

Actual Result:

@here is displayed as italic text, no mention

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.20.1

Reproducible in staging?: yes

Reproducible in production?: yes

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://platform.applause.com/services/links/v1/external/b2bad9b73d47f0eef1ff081f07bd1016aee711c6236b656eabc7617f11b1cbcd

Screenshot 2023-05-31 at 17 31 14

Expensify/Expensify Issue URL:

Issue reported by: @bernhardoj

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1685027189525539

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019d06a47c69e1d4cd
  • Upwork Job ID: 1663843746285133824
  • Last Price Increase: 2023-05-31

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 49 (37 by maintainers)

Most upvoted comments

Offer sent to @bernhardoj.

Paid and ended contract for @eh2077 and @allroundexperts

Here are the items from the checklist.

  1. Offending PR https://github.com/Expensify/expensify-common/pull/532
  2. Commented on the PR https://github.com/Expensify/expensify-common/pull/532/files#r1233141987
  3. I don’t think there needs to be a checklist change here since this involved good regex knowledge of the reviewer / contributor in order to be caught.
  4. I think that we should add this to our regression tests. Test steps in the issue description look good for the regression test.

@eh2077 my regex also handles the cases you posted above please check my comment

dding 0-9 inside it will also prevent matching invalid mention like @here1212

@allroundexperts here is the full regex for testing

[`.a-zA-Z]?@here(?![^<_\s]*(<\/pre>|<\/code>|<\/a>|_?[a-zA-Z0-9]))
Screenshot 2023-06-03 at 7 06 03 AM

@bernhardoj paid and contract ended Bonus paid to @eh2077 and @allroundexperts.

Aaaand we’re done! Thanks for playing, see you next time

I agree. From our internal process:

Note: If the contributor/c+ work was done within the speed bonuses but only merged later on due to internal engineering delays we can still pay out the speed bonus. As an example: if the PR is approved by c+ within the 3 days and internal engineer doesn’t approve+merge until the 4th day then typically the speed bonus should still apply. If you’re unsure ask in #bug-zero.