[No QA] Optimize ExpenseReportListItemRow - Split ActionCell into smaller components#83079
[No QA] Optimize ExpenseReportListItemRow - Split ActionCell into smaller components#83079jmusial wants to merge 1 commit intoExpensify:mainfrom
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9712947112
ℹ️ 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".
| style={[styles.w100, shouldDisablePointerEvents && styles.pointerEventsNone]} | ||
| isLoading={isLoading} | ||
| success | ||
| isDisabled={shouldDisablePointerEvents} |
There was a problem hiding this comment.
Preserve offline disablement for non-pay action buttons
This branch now enables the generic action button whenever pointer events are allowed, but it no longer checks network state. In the previous implementation these non-pay actions were disabled offline, and onPress still routes into handleActionButtonPress for actions like submit/approve/export, which depend on server-side writes. In offline scenarios this regresses UX by presenting actionable controls that cannot complete successfully in real time.
Useful? React with 👍 / 👎.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Nice! This is looking good! Let's mark it as ready for review! |
|
Can we get it tested against a really high traffic account? |
Explanation of Change
Move pay-specific hooks out of ActionCell into PayActionCell
The original
ActionCellcalled all pay-related hooks unconditionally at the component top level —useReportWithTransactionsAndViolations,usePolicy,useOnyx(BANK_ACCOUNT_LIST),useOnyx(chatReport), andcanIOUBePaid(×2) — for every row in the search results, even rows with aVIEW,SUBMIT, orAPPROVEaction.These hooks are now scoped to
PayActionCell, which only mounts for rows whereaction === 'pay'. This removes several Onyx subscriptions and computations per non-PAY row.Perf improvement
For the the whole
Home->ReportsnavFor

ExpenseReportListItemRowComponentThe improvement should be visible everywhere where
ActionCellwas used. Not onlyReportsMethodology
Measured on account with 10 reports with in different
CONST.SEARCH.ACTION_TYPES.Times are avg between 5 measurements for before and after.
[No QA] added as this is just a refactor.
Fixed Issues
$ #82428
PROPOSAL:
Tests
ReportspageOffline tests
N/A
QA Steps
N / A
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
MacOS: Chrome / Safari