Fix - @-mentions don't work in the same message as an inline code block or a multi-line code block#52780
Conversation
|
@allgandalf Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/Videos |
|
Okay this is working great, I have some issues with my iOS build it's failing. I will update the checklist soon. @MonilBhavsar can you please confirm if the unit tests match what you originally expected ? |
|
@FitseTLT there are failing tests here |
All unrelated @allgandalf |
|
Please merge main, we cannot merge this PR with failing tests |
|
Passed |
|
I wonder if this case in the test is correct? I think the output should be
|
Yeah, `` would in itself be a block so we would need a short mention there |
allgandalf
left a comment
There was a problem hiding this comment.
Tests well on all platforms, I will wait for the unit tests to get updated and then approve
|
@FitseTLT can you please prioritize this one? |
@allgandalf @MonilBhavsar I know what you guys are trying to say. But the scope of this issue is to determine if a short mention is inside a code block or not and the logic I used is (whether it is right or wrong) exactly the logic we use for long mentions in our parser and in this case the consecutive backticks are taken as one by our parser so the short mention is still inside a code block. Even if we set it as a short mention our parser will put it inside a code block and that would be wrong here is a demo with the long mention. 2024-11-26.15-26-07.mp4 |
|
@MonilBhavsar thoughts on the ^ 💭 |
|
I think we should fix it. If users would have typed " |
@MonilBhavsar I am not saying your expectation is wrong but it is out of the scope of this issue. I can easily allow this in my shortmention regex but the final result would not match your expectation because of how we are handling the code blocks in expensify-common. That was what I was explaining above. 2024-11-26.15-26-07.mp4According to the expectation it should have returned the long mention as a mention but it parses it as part of the code block |
|
I understand what you're saying. I think we would need to update the code block parser first. Adding a wrong test does not sound good. I'll report an issue |
|
@MonilBhavsar how should we proceed here? |
|
We should hold on #53573 |
|
Still held.... |
|
PR was raised for the held on issue: |
|
asked for speedy work here |
|
@FitseTLT The other PR was merged, can you merge main into your branch and test this one |
|
bump @FitseTLT |
Thx @allgandalf Working on it 👍 |
|
@FitseTLT can you please prioritise this PR? |
|
friendly bump @FitseTLT |
|
@FitseTLT lets try to merge this one in a day or two thanks 😄 |
|
@FitseTLT can you update one platform video showing that we fixed the case we held this issue for |
@allgandalf Updated for web |
|
bump @allgandalf |
MonilBhavsar
left a comment
There was a problem hiding this comment.
Looks good, thanks!
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/MonilBhavsar in version: 9.0.91-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.91-2 🚀
|






Details
Fixed Issues
$ #52214
PROPOSAL: #52214 (comment)
Tests
Precondition: You are on private domain
some of the test cases you can test with
The output should look like:
Offline tests
Same as above
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop