-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
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 |
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.
Please fix conflict. This component is now migrated to TS
src/pages/ReportDetailsPage.js
Outdated
@@ -116,7 +117,7 @@ function ReportDetailsPage(props) { | |||
subtitle: participants.length, | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ((props.report.type === CONST.REPORT.TYPE.CHAT && props.report.parentReportID) || isUserCreatedPolicyRoom) { | |
if (isUserCreatedPolicyRoom || ReportUtils.isChatThread(report)) { |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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
✋ 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-01-23.at.1.17.02.PM.mov
MacOS: Desktop