(Part 2) Remove Onyx.connect() for the key: ONYXKEYS.PERSONAL_DETAILS_LIST in src/libs/actions/Report.ts#88624
(Part 2) Remove Onyx.connect() for the key: ONYXKEYS.PERSONAL_DETAILS_LIST in src/libs/actions/Report.ts#88624lorretheboy wants to merge 7 commits intoExpensify:mainfrom
Conversation
|
@parasharrajat 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] |
|
Hey @parasharrajat, I am having a build issue with android native, I will upload the recording for android native once it is resolved |
| const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED); | ||
| const [isSelfTourViewed] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector}); | ||
| const [betas] = useOnyx(ONYXKEYS.BETAS); | ||
| const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST); |
There was a problem hiding this comment.
Do we need the whole collection? It is very expensive. Can you use a selector?
There was a problem hiding this comment.
I've updated to use the usePersonalDetails which is more optimized for re-rendering case
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
| const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED); | ||
| const [isSelfTourViewed] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector}); | ||
| const [betas] = useOnyx(ONYXKEYS.BETAS); | ||
| const personalDetails = usePersonalDetails(); |
There was a problem hiding this comment.
I still think we are overdoing it. We just need to subscribe to the report owner and chat participants for the function.
Can you subscribe to those individually?
There was a problem hiding this comment.
And then navigateToConciergeChatAndDeleteReport should be further refactored to pass 3 new params for these instead of the whole personalDetails collection.
Explanation of Change
Fixed Issues
$ #73656
PROPOSAL: #73656 (comment)
Tests
Test 01:
Test 02:
Test 03:
Offline 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))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
Screen.Recording.2026-04-27.at.22.07.24.mov
iOS: Native
Screen.Recording.2026-04-27.at.22.02.34.mov
iOS: mWeb Safari
Screen.Recording.2026-04-27.at.21.58.47.mov
MacOS: Chrome / Safari
Screen.Recording.2026-04-27.at.02.29.07.mov