Allow accessing the members page in a thread#34993
Conversation
|
@arosiclair 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] |
|
Weird that it didn't assign a C+. @jasperhuangg want to ask for a volunteer in #contributor-plus? |
|
Can I be? |
|
@aimane-chnaif go for it if you're able to prioritize this review, thanks |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safariweb.movMacOS: Desktop |
aimane-chnaif
left a comment
There was a problem hiding this comment.
Please fix conflict. This component is now migrated to TS
src/pages/ReportDetailsPage.js
Outdated
| isAnonymousAction: false, | ||
| action: () => { | ||
| if (isUserCreatedPolicyRoom && !props.report.parentReportID) { | ||
| if ((props.report.type === CONST.REPORT.TYPE.CHAT && props.report.parentReportID) || isUserCreatedPolicyRoom) { |
There was a problem hiding this comment.
| if ((props.report.type === CONST.REPORT.TYPE.CHAT && props.report.parentReportID) || isUserCreatedPolicyRoom) { | |
| if (isUserCreatedPolicyRoom || ReportUtils.isChatThread(report)) { |
src/pages/RoomMembersPage.js
Outdated
| shouldShow={ | ||
| _.isEmpty(props.report) || | ||
| (_.isEmpty(ReportUtils.getParentReport(props.report)) && ReportUtils.isUserCreatedPolicyRoom(props.report) && !isPolicyMember) || | ||
| (_.isEmpty(ReportUtils.getParentReport(props.report)) && (ReportUtils.isDefaultRoom(props.report) || ReportUtils.isPolicyExpenseChat(props.report))) |
There was a problem hiding this comment.
Any reason for using getParentReport instead of isChatThread?
It's possible that parent report might not exist in Onyx even if this is thread (i.e. login with deeplink to thread, without opening parent chat)
There was a problem hiding this comment.
True, I switched it to use isChatThread instead
|
@jasperhuangg kindly bump on above concerns |
|
@aimane-chnaif this is ready for another look |
|
@aimane-chnaif I think I got everything working, we can access the members page and invite/remove in all threads regardless of the parent report type now |
|
|
@jasperhuangg please merge main and fix lint |
|
@aimane-chnaif thanks, updated. |
|
@aimane-chnaif I think that's actually the behavior we want, threads in any type of report are invitable. |
Co-authored-by: Aimane Chnaif <96077027+aimane-chnaif@users.noreply.github.com>
|
ok, hope you'd cover any deploy blockers QA team is reporting since this PR might change the existing behaviors in TestRail. |
|
It's weird user who left thread is able to invite someone but maybe out of scope Screen.Recording.2024-03-12.at.5.45.06.PM.mov |
|
@srikarparsi 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] |
|
🎯 @aimane-chnaif, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #38157. |
| ((isDefaultRoom && isChatThread && isPolicyMember) || | ||
| (!isUserCreatedPolicyRoom && participants.length) || | ||
| (isUserCreatedPolicyRoom && (isPolicyMember || (isChatThread && !ReportUtils.isPublicRoom(report))))) && | ||
| !ReportUtils.isConciergeChatReport(report) |
There was a problem hiding this comment.
NAB: these conditions are super confusing and I'd be surprised if somebody doesn't break these eventually. No idea how to simplify things, but something we should consider in case we have to revisit this
There was a problem hiding this comment.
Yeah I agree, I was thinking of ways to simplify them but that would involve touching a bunch of other flows, so I elected to keep them the same for now so we could get them out sooner.
|
✋ 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/srikarparsi in version: 1.4.52-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.52-6 🚀
|


Details
We should be able to invite users to all types of chat reports that aren't DMs, default rooms, or policy expense chats (this includes threads in DMs).
We previously only allowed invites in user created rooms.
Fixed Issues
Related to https://github.com/Expensify/Expensify/issues/362613
PROPOSAL:
Tests/QA
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)/** comment above it */thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Screen.Recording.2024-01-23.at.1.17.02.PM.mov
MacOS: Desktop