-
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
Fix inconsistent thread in group chat name on the details page and LHN #48046
Changes from 3 commits
52f838d
acc115b
32f3257
379d8b1
07987e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -246,7 +246,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD | |||||||||||||||||
|
||||||||||||||||||
const shouldShowLeaveButton = ReportUtils.canLeaveChat(report, policy); | ||||||||||||||||||
|
||||||||||||||||||
const reportName = ReportUtils.isDeprecatedGroupDM(report) || isGroupChat ? ReportUtils.getGroupChatName(undefined, false, report) : ReportUtils.getReportName(report); | ||||||||||||||||||
const reportName = ReportUtils.getReportName(report); | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know why we don't check for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I notice the default return too and it actually apply the limit by default. Lines 3774 to 3781 in 8c69c58
I don't think there is a way to create a deprecated group anymore. The only way to test it by opening the old existing deprecated group DM. I have one here and using the logic from web.mp4If we change it using this PR, the details title will show all the participants with a limit too. web.mp4There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I haven't investigated it yet, but I notice it happens too without this PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to investigate it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the investigations, but that fix still not works fine in all places, let's keep it to fix separately here #47803. I just wanted to confirm it is not a regression from our PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've reverted the commit. Lmk if I misunderstood it. |
||||||||||||||||||
|
||||||||||||||||||
const additionalRoomDetails = | ||||||||||||||||||
(isPolicyExpenseChat && !!report?.isOwnPolicyExpenseChat) || ReportUtils.isExpenseReport(report) || isPolicyExpenseChat || isInvoiceRoom | ||||||||||||||||||
|
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.
Can you explain how this can fix the inconsistent in name while the inconsistent is at the name beginning not at the end?
For example the current name is
name3, name4, name5, name6, ...
. how.slice(0, 5)
can fix it toname1, name2, name3, name4, name5, ...
?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.
Also, The issue is not fixed
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.
Note
getDisplayNamesWithTooltips
use sort method but getgetReportName
is notApp/src/libs/ReportUtils.ts
Lines 2387 to 2396 in 0f26b8a
It looks LHN and header use
getDisplayNamesWithTooltips
and details page usegetReportName
, I just try editgetReportName
and the only title was changed is details title. So we may need different fix for deprecated group 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.
Since
getDisplayNamesWithTooltips
sorts the array by name, it's possible the account in index 5-9 has a "smaller" name.Slicing it to 5 will make sure the account list will be the same between
getDisplayNamesWithTooltips
andgetReportName
.True,
getDisplayNamesWithTooltips
is used in LHN and header so there is a tooltip for each account.Should we sort in getReportName too? Or should we remove the sort from
getDisplayNamesWithTooltips
?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 we should sort the both, but I prefer fixing it separately here #47803. I just wanted to confirm it is not a regression from our PR