-
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: group conversation header display 5 participants #38568
Conversation
@dragnoir Can you plz add short summary in the Details section |
I am seeing all participants in the header for the group chat in smaller screen platforms. @dragnoir can you check that |
@Pujan92 fixed. |
src/libs/GroupChatUtils.ts
Outdated
@@ -7,7 +7,7 @@ import * as ReportUtils from './ReportUtils'; | |||
* Returns the report name if the report is a group chat | |||
*/ | |||
function getGroupChatName(report: OnyxEntry<Report>): string | undefined { | |||
const participants = report?.participantAccountIDs ?? []; | |||
const participants = report?.participantAccountIDs?.slice(0, 5) ?? []; |
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.
getGroupChatName
function is called at multiple places, so we can't directly apply the slice here as it will affect the other places(eg. OptionRowLHN, ReportSettings). That creates a discrepancy in web and mobile LHN titles.
I think we can add an optional parameter something like shouldApplyLimit
in this function and use it from HeaderView
.
cc: @deetergp
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.
Good catch @Pujan92, that sounds like a good solution.
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.
@Pujan92 on it
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.
@Pujan92 done
Reviewer Checklist
Screenshots/Videos |
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!
1 minor issue I noticed is that the group report name in the header gets changed based on the first limited App/src/libs/GroupChatUtils.ts Lines 9 to 10 in b5df48f
@deetergp Is that fine or do we need to find the solution here? Screen.Recording.2024-03-22.at.00.23.34.mov |
🚀 Deployed to staging by https://github.com/deetergp in version: 1.4.56-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.56-8 🚀
|
Details
This PR allows a maximum of 5 participants to be displayed on the header of a group chat.
Fixed Issues
$ #38052
PROPOSAL: #38052 (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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop