-
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
fix: New users are not displayed in group name #46703
Conversation
@hoangzinh 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-08-07.at.23.00.30.android.movAndroid: mWeb ChromeScreen.Recording.2024-08-07.at.22.50.41.android.chrome.moviOS: NativeScreen.Recording.2024-08-07.at.23.03.56.ios.moviOS: mWeb SafariScreen.Recording.2024-08-07.at.23.08.02.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2024-08-07.at.22.38.41.web.movMacOS: DesktopScreen.Recording.2024-08-07.at.22.44.09.desktop.mov |
src/libs/ReportUtils.ts
Outdated
@@ -2016,22 +2017,21 @@ function buildParticipantsFromAccountIDs(accountIDs: number[]): Participants { | |||
/** | |||
* Returns the report name if the report is a group chat | |||
*/ | |||
function getGroupChatName(participantAccountIDs?: number[], shouldApplyLimit = false, report?: OnyxEntry<Report>): string | undefined { | |||
function getGroupChatName(draftParticipants?: SelectedParticipant[], shouldApplyLimit = false, report?: OnyxEntry<Report>): string | undefined { |
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 think draftParticipants
is not a good name. Do you have any other options?
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.
@hoangzinh What do you think about the variable name groupParticipants
or groupDraftParticipants
?
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.
How about participants
, then later we replace participants
by participantAccountIDs
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.
@hoangzinh i don't think participants
is a good name. And we'll get TS error here
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.
For TS error, should we rename it to participantAccountIDs
🤔
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.
@hoangzinh i updated
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.
Overal looks good, just one minor feedback
Co-authored-by: Vinh Hoang <hoangzinhvn@gmail.com>
@hoangzinh I updated. |
@stitesExpensify friendly bump |
✋ 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/stitesExpensify in version: 9.0.22-0 🚀
|
🚀 Deployed to staging by https://github.com/stitesExpensify in version: 9.0.22-1 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 9.0.22-9 🚀
|
// If we have a report always try to get the name from the report. | ||
if (report?.reportName) { | ||
return report.reportName; | ||
} | ||
|
||
// Get participantAccountIDs from participants object | ||
let participants = participantAccountIDs ?? Object.keys(report?.participants ?? {}).map(Number); | ||
let participantAccountIDs = participants?.map((participant) => participant.accountID) ?? Object.keys(report?.participants ?? {}).map(Number); |
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.
Filter the pending deleted participants to immediately reflect the change in the group name. More details here.
Details
Fixed Issues
$ #46502
PROPOSAL: #46502 (comment)
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.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov