-
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 group chat name in share code page #40134
Conversation
@cubuspl42 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] |
@cubuspl42 I'm not sure. It's working fine on my side with different groups. Can you rerun the dev server or even |
Would you take a look at the conflicts? |
@cubuspl42 This was fixed in #40171. Also #39757 allowed custom group name. Please review the latest code changes. |
Reviewer Checklist
Screenshots/VideosMacOS: Desktop |
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 look good, thanks! I have a small question before merging.
src/libs/ReportUtils.ts
Outdated
@@ -2992,6 +2992,10 @@ function getReportName(report: OnyxEntry<Report>, policy: OnyxEntry<Policy> = nu | |||
return Localize.translateLocal('parentReportAction.deletedTask'); | |||
} | |||
|
|||
if (isGroupChat(report)) { | |||
return getGroupChatName(report?.participantAccountIDs ?? [], true, report?.reportID) ?? ''; |
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 can safely omit the
report.participantAccountIDs
here. - Passing
shouldApplyLimit = true
means that we will be truncating a name where we were previously not truncating it for the ReportSettingsPage.tsx. Is it OK?
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 can safely omit the report.participantAccountIDs here.
Agree.
we will be truncating a name where we were previously not truncating it for the ReportSettingsPage.tsx
I'm not sure the expected behavior here, I see several places truncating while some don't, but to keep the old logic and keep changes minimal, I'll leave ReportSettingsPage
as is. In other words, if we didn't want to truncate group name (currently in ReportSettingsPage
, OptionRowLHN
, GroupChatNameEditPage
and NewChatConfirmPage
), we should use getGroupChatName
directly instead of getReportName
.
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.
That sounds good to me, thanks. If we figure out that we do need the short name later it's an easy tweak.
Thanks for the changes @gijoe0295 and thanks for the testing and review @cubuspl42 🙇 |
🚀 Deployed to staging by https://github.com/marcaaron in version: 1.4.63-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
Details
Inconsistency in group chat name between report header and share code page.
Fixed Issues
$ #39316
PROPOSAL: #39316 (comment)
Tests
Offline tests
NA
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