-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix room mentions in editing comments #44160
Fix room mentions in editing comments #44160
Conversation
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safari0-web.mp4 |
@@ -671,6 +671,7 @@ function ReportActionItem({ | |||
shouldDisableEmojiPicker={ | |||
(ReportUtils.chatIncludesConcierge(report) && User.isBlockedFromConcierge(blockedFromConcierge)) || ReportUtils.isArchivedRoom(report) | |||
} | |||
isGroupPolicyReport={!!report?.policyID && report.policyID !== CONST.POLICY.ID_FAKE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use isReportInGroupPolicy here? See also
App/src/components/Composer/types.ts
Lines 80 to 81 in 7512346
/** Indicates whether the composer is in a group policy report. Used for disabling report mentioning style in markdown input */ | |
isGroupPolicyReport?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what is the personal
policy, but I can use it if we don't want to enable mentions there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the prop is named ...Group...
I think you're right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's pull @rlinoz here to bring clarity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But in ReportActionCompose
we set isGroupPolicyReport
like I did. Which one is correct? 🤔 I think we should have the same solution in both places
const isGroupPolicyReport = useMemo(() => !!report?.policyID && report.policyID !== CONST.POLICY.ID_FAKE, [report]); |
cc @eh2077
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I also saw it. If we go with same logic with ReportActionCompose
, then I think we can consider wrapping it into an utility method.
Let's wait a little while for @rlinoz 's input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use the same solution we did for the ReportActionCompose, the problem with using the isReportInGroupPolicy is that users who are not members of the policy but got invited to the room won't have the policy object in onyx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and tested well
I am having a hard time testing this with the reports showing as IDs, not sure what is up with that, but it is happening in main as well. |
@rlinoz I've already created a PR fixing that #44140 (comment) and it was just merged 🚀 I'll merge main in a moment |
That is great, thanks!! |
@rlinoz Please try now :) Mentions should work as expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests well, 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/rlinoz in version: 9.0.1-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.1-19 🚀
|
Details
Fixed Issues
$ #42521
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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.video.mov
MacOS: Desktop
desktop.mov