refactor: Remove deprecated report name functions in ReportUtils (Part 3)#83031
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@eVoloshchak 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] |
src/pages/media/AttachmentModalScreen/routes/report/ReportAvatarModalContent.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dccd14f189
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
sosek108
left a comment
There was a problem hiding this comment.
This PR looks goot to me. There is one comment from Codex, but this part is handled in another PR. We still need to confirm if the mentioned code is used at all
|
@MelvinBot, merge main and resolve conflicts |
|
Merged
|
|
@MelvinBot, This branch has conflicts that must be resolved, merge main, resolve conflicts, and push the new commit here |
Resolved conflicts in 7 files by keeping the new ReportNameUtils.getReportName(report, reportAttributes) API while incorporating main's structural changes (e.g., useMappedPersonalDetails in ReportWelcomeText). Co-authored-by: Eugene Voloshchak <eVoloshchak@users.noreply.github.com>
|
Merged
|
|
@MelvinBot, some checks are failing |
- Fix import ordering in RoomInvitePage.tsx (Prettier) - Remove canBeMissing option from useOnyx calls in RoomMembersPage.tsx and ReportAvatarModalContent.tsx (removed from useOnyx API on main) Co-authored-by: Eugene Voloshchak <eVoloshchak@users.noreply.github.com>
|
Fixed the two PR-related failing checks:
Unrelated failure: The |
Reviewer Checklist
Screenshots/Videos |
neil-marcellini
left a comment
There was a problem hiding this comment.
Overall, the code looks good. I do think we should hold based on this comment, because otherwise this pull request could create a regression.
|
@mohammadjafarinejad The PR this was held on has merged, so let's merge main and then I think we can move this forward. |
|
@neil-marcellini Ready for re-review. |
neil-marcellini
left a comment
There was a problem hiding this comment.
Good to go, thank you.
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @neil-marcellini has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.3.34-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.34-2 🚀
|






Explanation of Change
Migrates component call sites from the deprecated
ReportUtils.getReportNametoReportNameUtils.getReportName, passingreportAttributes(viauseReportAttributeshook) as the second argument to ensure computed report names are returned correctly.Changed Files
Fixed Issues
$ #76852
PROPOSAL:
Tests
1. Open a report and verify the report name displays correctly in the header (
AvatarWithDisplayName)2. Open a report and verify the welcome message shows the correct report name (
ReportWelcomeText)3. Open a room's invite page and verify the report name appears correctly in the header (
RoomInvitePage)4. Open a room's members page and verify the report name appears in the subtitle (
RoomMembersPage)5. Open the share code page for a report and verify the title shows the correct report name (
ShareCodePage)6. Open a trip chat and verify the current chat name pre-fills correctly on the edit name page (
TripChatNameEditPage)7. Open a report avatar and verify the header title shows the correct report name (
ReportAvatarModalContent)8. Verify archived reports still show the
(archived)suffix in all of the above locations(archived)is appended to the report name in every location aboveOffline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mp4
iOS: Native
ios.mp4
MacOS: Chrome / Safari
web.mp4