-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2023-06-21] [$1000] Chat - Italic _@here_
is not displayed as mention
#19857
Comments
Triggered auto assignment to @conorpendergrast ( |
Bug0 Triage Checklist (Main S/O)
|
@kbecciv It is showing like this, the expected behaviour is italic |
@sethraj14 When you enter: |
Compare |
Job added to Upwork: https://www.upwork.com/jobs/~019d06a47c69e1d4cd |
Current assignee @conorpendergrast is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
Triggered auto assignment to @hayata-suenaga ( |
@here
is not displayed as mention
@here
is not displayed as mention_@here_
is not displayed as mention
ProposalPlease re-state the problem that we are trying to solve in this issue.Italic What is the root cause of that problem?Now
We use What changes do you think we should make in order to solve the problem?Including
Resultmac_chrome_19857.mp4What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Italic What is the root cause of that problem?The root cause of this issue is from the regex of here mention /[`.a-zA-Z]?@here\b(?![^<]*(<\/pre>|<\/code>|<\/a>))/gm The above regex needs to match a word boundary after keyword What changes do you think we should make in order to solve the problem?As we consider composer input as markdown and the underscore character
So, we can also use below new regex /[`.a-zA-Z]?@here(?=_\b|\b)(?![^<]*(<\/pre>|<\/code>|<\/a>))/gm to replace the current one, which will not need to modify the replacement method. Below demo video Screen.Recording.2023-06-04.at.8.48.02.AM.movuses the regex of combined solution from the proposal of the other issue(I think we can fix them separately but including it here just to demonstrate relevant unit test cases) to not parse here mention for input like The regex of the combined solution is /[`.a-zA-Z]?@here(?=_\b|\b)(?!((?:(?!<a).)+)?<\/a>|[^<]*(<\/pre>|<\/code>))/gm Below code snippet will be helpful for testing test('Test for @here mention example', () => {
const testCases = [
"@here",
"_@here_",
"`@here`",
"```@here```",
"[@here](google.com)",
"[_@here_](google.com)",
"[*@here*](google.com)",
"[~@here~](google.com)",
"@here_123",
"@here_abc",
"@here123",
"@hereabc",
"@here abc",
"@here*",
"@here~",
"@here#",
"@here`",
"@here@",
"@here$",
"@here^",
"@here(",
]
console.log(testCases.map(t => `${t}\t=> ${parser.replace(t)}`).join('\n'));
}); Output will be like @here => <mention-here>@here</mention-here>
_@here_ => <em><mention-here>@here</mention-here></em>
`@here` => <code>@here</code>
```@here``` => <pre>@here</pre>
[@here](google.com) => <a href="https://google.com" target="_blank" rel="noreferrer noopener">@here</a>
[_@here_](google.com) => <a href="https://google.com" target="_blank" rel="noreferrer noopener"><em>@here</em></a>
[*@here*](google.com) => <a href="https://google.com" target="_blank" rel="noreferrer noopener"><strong>@here</strong></a>
[~@here~](google.com) => <a href="https://google.com" target="_blank" rel="noreferrer noopener"><del>@here</del></a>
@here_123 => @here_123
@here_abc => @here_abc
@here123 => @here123
@hereabc => @hereabc
@here abc => <mention-here>@here</mention-here> abc
@here* => <mention-here>@here</mention-here>*
@here~ => <mention-here>@here</mention-here>~
@here# => <mention-here>@here</mention-here>#
@here` => <mention-here>@here</mention-here>`
@here@ => <mention-here>@here</mention-here>@
@here$ => <mention-here>@here</mention-here>$
@here^ => <mention-here>@here</mention-here>^
@here( => <mention-here>@here</mention-here>( What alternative solutions did you explore? (Optional)N/A |
Thanks for your proposal @s-alves10, but your proposed regex doesn't seem to handle |
@allroundexperts Thanks for checking proposals! Below is that regex test result comparing on test cases provided in my proposal FYI
Based on the test above my proposal covers 3 more test cases
@getusha Hope you don’t mind my testing above as I just did it as requested by the C+ team 🙏 |
Proposal@allroundexperts |
ah I didn't see the commnet assigning @eh2077 |
📣 @eh2077 You have been assigned to this job by @hayata-suenaga! |
@allroundexperts @hayata-suenaga The PR Expensify/expensify-common#544 for expensify-common is ready. Please help to review it at your convenience, thanks! |
Looks like the second PR is under review |
Hired @allroundexperts and @eh2077 via Upwork |
_@here_
is not displayed as mention_@here_
is not displayed as mention
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.27-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-06-21. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Here are the items from the checklist.
|
@conorpendergrast hi, will I get a reporting bonus here as I reported it earlier #19857 (comment)? |
@bernhardoj Yes, thank you for highlighting that |
Offer sent to @bernhardoj. Paid and ended contract for @eh2077 and @allroundexperts |
Regression test issue created: https://github.com/Expensify/Expensify/issues/294092 |
Hi @conorpendergrast , thanks for checking the payment! Can we apply for speed bonus for this issue as we got the two PRs merged within 3 working days(based on the local time)? Here's the timeline FYI Assigned: Jun 6, 2023 at 9:30 PM GMT+8 |
I agree. From our internal process:
|
@bernhardoj paid and contract ended Aaaand we're done! Thanks for playing, see you next time |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Issue found when executing PR #19610
Action Performed:
_@here_
and sendExpected 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?
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
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
The text was updated successfully, but these errors were encountered: