refactor getSortedSections getWelcomeMessage and getAlternateText to use policy from useOnyx#84017
Conversation
…use policy from useOnyx
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@DylanDylann 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] |
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required.
|
@DylanDylann Kindly bump |
|
Please merge new main to remove the duplicated code change |
| {showChatPreviewLine = false, forcePolicyNamePreview = false}: PreviewConfig, | ||
| isReportArchived: boolean | undefined, | ||
| currentUserLogin: string, | ||
| policy?: OnyxEntry<Policy>, |
There was a problem hiding this comment.
Please add a comment noting that the optional operator will be removed in the next PR as part of the refactor (note to leave the issue link)
| if ((!report?.policyName && !parentReport?.policyName && !hasPolicies && isEmptyObject(policies)) || isEmptyObject(report)) { | ||
| if ((!report?.policyName && !parentReport?.policyName && isEmptyObject(policies) && isEmptyObject(allPolicies)) || isEmptyObject(report)) { |
There was a problem hiding this comment.
In the next PR, I think we can remove policies params
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-03-09.at.23.31.35.mov |
|
@dukenv0307 Minor comments. The rest looks fine |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #66415 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
@dukenv0307 opss, we have a failed test |
|
@DylanDylann it's a flaky test, i just merged main to trigger the test again |
|
cc @tgolen For review |
|
🚧 @tgolen has triggered a test Expensify/App build. You can view the workflow run here. |
|
🚀 Deployed to staging by https://github.com/tgolen in version: 9.3.34-0 🚀
|
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.34-2 🚀
|
Explanation of Change
Fixed Issues
$ #66415
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-03-03.at.17.54.40.mov