Improve task and trip related list components performance#63686
Improve task and trip related list components performance#63686mjasikowski merged 15 commits intoExpensify:mainfrom
Conversation
|
Chat report has TaskPreview |
|
Chat report has TaskView |
|
Chat report has TripRoomReview |
|
Hey @Pujan92, @adhorodyski and @TMisiukiewicz I still need to complete recordings as part of PR checklist. But this PR is ready for initial reviews |
|
The eslint failed due to |
|
@Pujan92 @adhorodyski @TMisiukiewicz this PR is ready for next review round |
|
@hoangzinh left a couple of more comments, I think these are the last ones 🥇 |
| ({item: reportAction, index}: ListRenderItemInfo<OnyxTypes.ReportAction>) => { | ||
| return ( | ||
| <ReportActionsListItemRenderer | ||
| allReports={allReports} |
There was a problem hiding this comment.
@adhorodyski @TMisiukiewicz Isn't passing allReports to all report action children will increase the memory usage?
There was a problem hiding this comment.
I think it won't. Because it's gonna pass a reference variable (point to a same memory allocated)
|
cc @Pujan92 for review |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2025-06-12.at.17.59.17.movScreen.Recording.2025-06-12.at.18.03.52.movScreen.Recording.2025-06-12.at.18.05.04.movMacOS: Desktop |
Pujan92
left a comment
There was a problem hiding this comment.
Codewise looks good, I am yet to add recordings due to failure in builds.
|
@hoangzinh we need to resolve conflicts |
|
I resolved the conflict @Pujan92 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.1.67-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.1.67-2 🚀
|
| const {translate} = useLocalize(); | ||
| const theme = useTheme(); | ||
| const [taskReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${taskReportID}`, {canBeMissing: true}); | ||
| const taskReportID = taskReport?.reportID; |
There was a problem hiding this comment.
there was a regression #64292, if taskReport is undefined user will be redirected to no found page



Explanation of Change
Improve ReportActionsList performance by moving useOnyx connections from task and trip components up to the list level:
TaskAction.tsx=> Do nothingTaskPreview.tsx=> lift uptaskReportTaskView.tsx=> lift upparentReportTripDetailsView.tsx=> Do nothingTripRoomPreview.tsx=> lift upchatReportFixed Issues
$ #63636
PROPOSAL:
Tests
Same as QA
Offline tests
Same as QA
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Test 1: Tasks
Test 2: Trip
Precondition:
Steps
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
Screen.Recording.2025-06-10.at.09.07.01.android.mov
Android: mWeb Chrome
Screen.Recording.2025-06-10.at.09.11.55.android.chrome.mov
iOS: Native
Screen.Recording.2025-06-10.at.09.20.57.mov
iOS: mWeb Safari
Screen.Recording.2025-06-10.at.09.13.49.ios.safari.mov
MacOS: Chrome / Safari
Screen.Recording.2025-06-09.at.05.40.32.web.mov
MacOS: Desktop
Screen.Recording.2025-06-09.at.05.45.13.desktop.mov