-
Notifications
You must be signed in to change notification settings - Fork 3k
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 system account chat to be listed in LHN, fix chat icons #41290
Conversation
e1e223b
to
feb523c
Compare
Popped a hold in the title as per here: https://expensify.slack.com/archives/C036QM0SLJK/p1715360388894099?thread_ts=1715336603.190319&cid=C036QM0SLJK |
…account-cleanups2
…ify/App into francois-system-account-cleanups2
…account-cleanups2
@techievivek 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] |
|
||
// For 1:1 chat, we don't want to include currentUser as participants in order to not mark 1:1 chats as having multiple participants | ||
const participants = Object.keys(report?.participants ?? {}) | ||
.map(Number) | ||
.filter((accountID) => accountID !== session?.accountID || !isOneOnOneChat) | ||
.filter((accountID) => accountID !== session?.accountID || (!isOneOnOneChat && !isSystemChat)) |
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.
Shouldn't this be (!isOneOnOneChat || !isSystemChat)
?
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.
No, because !isOneOnOneChat
will always be true
for the systemChat, so we'd always end up including the current user in the participants list.
Reviewer Checklist
Screenshots/VideosAndroid: NativeN/A Android: mWeb ChromeScreen.Recording.2024-05-31.at.8.44.07.PM.moviOS: NativeN/A The App crashes with error iOS: mWeb SafariScreen.Recording.2024-05-31.at.8.42.50.PM.movMacOS: Chrome / SafariScreen.Recording.2024-05-31.at.8.34.33.PM.movMacOS: DesktopScreen.Recording.2024-05-31.at.8.40.33.PM.mov |
Is there something I must do for the system chat to appear? I created a new account and can only see the following: Screen.Recording.2024-05-31.at.7.57.33.PM.mov |
Also, do we need private notes here? |
BUG Screen.Recording.2024-05-31.at.8.41.07.PM.mov |
Nice, thanks for catching those!
Hmm, I'm not sure, actually. @trjExpensify @francoisl, do you have thoughts about whether or not to include private notes in this chat? |
I don't have a strong opinion on this, though I don't see a reason to hide them. |
From this PR (#35385) it seems like we don't want to display the profile page for notifications@ so why don't we just update the report welcome text as follows? |
Updated!
It's intentional that it doesn't show up in the LHN immediately but is findable by search |
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.
Working good now!
🎯 @allroundexperts, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #42962. |
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.
Looks good.
Yeah, we can skip for systems chats. This is meant mainly for chats with real users. |
✋ 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 production by https://github.com/Julesssss in version: 1.4.79-11 🚀
|
{isSystemChat && ( | ||
<Text> | ||
<Text>{translate('reportActionsView.beginningOfChatHistorySystemDM')}</Text> | ||
</Text> | ||
)} |
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.
This change caused this issue
We have implemented show default system chat message
But we din't add condition for system chat for sidebar
This Pr caused issue where restricted expensify accounts where able to be added to group chat. |
const optionsToExclude: Option[] = [{login: CONST.EMAIL.NOTIFICATIONS}]; | ||
const optionsToExclude: Option[] = []; |
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.
Details
UI fixes for the system DM
Fixes the participants list, to make sure the title of the chat is just "Expensify" and the icon is only that of notifications@
Fixed Issues
$
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 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-05-31.at.17.09.58.mov
MacOS: Desktop