-
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
Hide add to group button for notification and chronos account #47770
Hide add to group button for notification and chronos account #47770
Conversation
@abdulrahuman5196 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] |
// Account IDs that can't be added as a group member | ||
get NON_ADDABLE_ACCOUNT_IDS() { | ||
return [this.ACCOUNT_ID.NOTIFICATIONS, this.ACCOUNT_ID.CHRONOS]; | ||
}, |
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.
Based on this comment, we don't want the add to group button to show for Chronos too, so I created a new list here.
But, I see that on the group invite list page, we exclude all expensify accounts, including Concierge, so searching for those accounts won't show up in the invitation search list.
App/src/pages/InviteReportParticipantsPage.tsx
Lines 52 to 53 in 685bb4c
const excludedUsers = useMemo( | |
() => [...PersonalDetailsUtils.getLoginsByAccountIDs(ReportUtils.getParticipantsAccountIDsForDisplay(report, false, true)), ...CONST.EXPENSIFY_EMAILS], |
Should we hide the add to group button for all expensify accounts?
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.
Historically, people have been able to have a groupDM with Concierge for support. It's the same as emailing [email protected] with additional email addresses. That said, now we have transitioned to "Groups" where membership isn't fixed on creation (meaning, everyone else in the group can leave freely), does that cause problems and someone can end up with two Concierge DMs if that happens? 🤔 CC: @marcaaron @JmillsExpensify
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.
We ended up covering this case in the Group Chats design doc. The intended design spec should work like this.
A goal of this doc is to completely deprecate Group DMs in favor of Group Chats. In doing that, the behavior of chatting with Concierge via email will change a bit. When a user emails Concierge and CC’s another user we will create a new Group Chat instead of trying to locate an existing chat between the participants. The consequence is that some historical chat messages between these participants can exist across several different reports vs. just one. This is a case we can potentially optimize for in the future, but decided to completely deprecate the Group DM pattern for now.
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.
Got it, so in product you should be able to Add to group
Concierge still? If everyone else is removed/leaves, it'll still be a "Group" technically and not be confused with the Concierge DM?
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 everyone else is removed/leaves, it'll still be a "Group" technically and not be confused with the Concierge DM?
Removing all group members won't convert it to a DM. Leaving the group chat will remove the report.
Based on the design spec, then we should be able to add a concierge to the group. We can update the non-addable to group account list later if needed.
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 basically Group Chats are not defined by the number or makeup of their members. You can have a Group Chat with yourself as the only user. You can have a Group Chat with you and Concierge. You can remove Concierge from that chat later if you want. The 1:1 DM with Concierge will always be a 1:1 DM with Concierge though and you should not have more than 1 of those. Hope that makes sense!
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.
Great, thanks for the confirmation!
@abdulrahuman5196 we can start the review here then
…-be-added-to-group
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-08-25.at.11.35.40.PM.movAndroid: mWeb ChromeScreen.Recording.2024-08-25.at.11.37.29.PM.moviOS: NativeScreen.Recording.2024-08-25.at.11.32.30.PM.moviOS: mWeb SafariScreen.Recording.2024-08-25.at.11.34.24.PM.movMacOS: Chrome / SafariScreen.Recording.2024-08-25.at.11.23.16.PM.movMacOS: DesktopScreen.Recording.2024-08-25.at.11.24.40.PM.mov |
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.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @iwiznia
🎀 👀 🎀
C+ Reviewed
Gentle ping @iwiznia |
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.
@iwiznia is OOO. I can help with this.
✋ 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/marcaaron in version: 9.0.27-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.0.27-1 🚀
|
Details
We don't want user to be able to add notifications and chronos account to a group.
Fixed Issues
$ #43841
PROPOSAL: #43841 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
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.mp4
Android: mWeb Chrome
anroid.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4