[Mentions v2] Parse <mention-report> when displaying reportAction#39906
Conversation
|
Linking to another room only seems to work from rooms, not from a normal chat. Screen.Recording.2024-04-10.at.12.07.25.mov |
|
I think we should call the renderer |
Actually @rlinoz @puneetlath When user types by hand room mention (auto complete is disabled for chats which are not in group policy) we will parse it and send to backend (parser is not aware of chat type). Will backend filtered this tag out? |
Changed 👌🏼 |
Yes, if a mention happens outside of a specific policy we will remove the tag. |
|
So if we have only optimistic version of the report action the expected behaviour would be to check if mentions are allowed in current report and if not just return null and not render it at all? |
|
I think we should strip out the tag and render as plain text if the mention is happening in a report that is not allowed. |
Just to be sure, we are going to do that in this PR right? |
|
Yeah @war-in will take care of it tommorow |
Reviewer Checklist
Screenshots/VideosAndroid: Native01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: Native03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4MacOS: Desktop06_MacOS_Desktop.mp4 |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #39545 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
@rlinoz fixed 😌 |
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 1.4.63-0 🚀
|
|
@war-in Can you verify internally, not sure if QA team can paste the code in src/pages/home/report/ReportActionsView.tsx under the PopoverReactionList (line 533)? |
|
@kbecciv As I saw that other PR's related to mentions are deployed as well, you should be able to just type the mention inside composer - sent message should contain the mention and be styled properly. |
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
|
|
||
| // eslint-disable-next-line rulesdir/prefer-early-return | ||
| Object.values(reports ?? {}).forEach((report) => { | ||
| if (report?.policyID === currentReport?.policyID && removeLeadingLTRAndHash(report?.reportName ?? '') === mentionDisplayText) { |
There was a problem hiding this comment.
Ref: #58361, we should add the condition to get the room only
Details
Fixed Issues
$ #39545
PROPOSAL:
Tests
To check the functionality paste the code in
src/pages/home/report/ReportActionsView.tsxunder thePopoverReactionList(line 533)#adminsroom3088255940953979(you probably would need to change the id to one existing on your account)Offline tests
QA Steps
To check the functionality paste the code in
src/pages/home/report/ReportActionsView.tsxunder thePopoverReactionList(line 533)#adminsroom3088255940953979(you probably would need to change the id to one existing on your account)PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso 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.-.native.mov
Android: mWeb Chrome
android.-.web.mov
iOS: Native
ios.-.native.mov
iOS: mWeb Safari
ios.-.web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov