[cp staging] Revert "Merge pull request #98611 from thelullabyy/fix-03/90366" - #99675
Conversation
|
@thelullabyy 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] |
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bac6c8af8d
ℹ️ 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".
| @@ -578,17 +574,6 @@ function Search({ | |||
|
|
|||
| const isTransactionItem = isTransactionListItemType(item); | |||
| const backTo = Navigation.getActiveRoute(); | |||
There was a problem hiding this comment.
Restore carousel seeding for flat expense searches
When a user opens a transaction from a flat Spend/Expenses search, onSelectRow now navigates without populating or clearing TRANSACTION_THREAD_NAVIGATION_TRANSACTION_IDS; no other caller seeds the carousel for this branch. Consequently the transaction RHP either has no previous/next navigation or can reuse stale IDs left by another flow, so seed the current ordered transaction IDs before opening the result.
Useful? React with 👍 / 👎.
| const prevNextTransactionsSelector = useCallback( | ||
| (allTransactions: OnyxCollection<OnyxTypes.Transaction>) => | ||
| [currentTransactionID, prevTransactionID, nextTransactionID].map((transactionID) => { | ||
| const key = `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}` as const; | ||
| return allTransactions?.[key] ?? snapshot?.data?.[key]; | ||
| }), | ||
| [currentTransactionID, nextTransactionID, prevTransactionID, snapshot], | ||
| [currentTransactionID, prevTransactionID, nextTransactionID].map((transactionID) => allTransactions?.[`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`]), | ||
| [currentTransactionID, nextTransactionID, prevTransactionID], |
There was a problem hiding this comment.
Retain snapshot data for grouped-search carousel siblings
When an expense is opened from a grouped search while its siblings exist only in the search snapshot—such as offline or before OpenReport hydrates them—this selector returns undefined for those sibling IDs. The buttons are still rendered from the saved ID list, but pressing one cannot resolve its transaction, parent action, or report and ultimately calls Navigation.setParams with an undefined reportID; preserve the originating snapshot and use it as the fallback for carousel resolution.
Useful? React with 👍 / 👎.
| const focusedRoute = findFocusedRoute(navigationRef.getRootState()); | ||
| if (focusedRoute?.name && (CAROUSEL_PRESERVING_SCREENS as readonly string[]).includes(focusedRoute.name)) { | ||
| if (focusedRoute?.name === SCREENS.RIGHT_MODAL.SEARCH_REPORT || focusedRoute?.name === SCREENS.TRANSACTION_DUPLICATE.DYNAMIC_REVIEW) { | ||
| return; | ||
| } | ||
| clearActiveTransactionIDs(); |
There was a problem hiding this comment.
Preserve carousel state while opening the parent report
When the transaction subtitle pushes its parent onto SEARCH_MONEY_REQUEST_REPORT or EXPENSE_REPORT, this transaction-navigation component unmounts while one of those routes is focused. Because they are no longer included in this guard, cleanup clears the active IDs; returning to the underlying expense then loses its counter and previous/next buttons. Treat those parent-report RHP routes as carousel-preserving screens.
Useful? React with 👍 / 👎.
|
🚧 JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 9.4.62-4 🚀
|
|
🤖 No help site changes required. This PR reverts #98611 (issue #90366), which was a purely visual/UX standardization of the expense report and expense headers — carousel counter ( None of this is documented at that level of detail in Why no article needs updating
Since no changes are needed, I did not open a docs PR. |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.4.62-4 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 9.4.63-0 🚀
|
|
🤖 No help site changes required. This PR reverts #98611 (issue #90366), which was a purely visual/UX standardization of the expense report and expense headers — carousel counter ( None of this is documented at that level of detail in Why no article needs updating
Since no changes are needed, I did not open a docs PR. |
Explanation of Change
This reverts commit a29eb30, reversing changes made to e49e547.
Fixed Issues
$ #99641
$ #99636
$ #99630
$ #99627
$ #99621
$ #99619
$ #99617
$ #99616
$ #99614
$ #99612
$ #99609
Tests
N/A
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
N/A
### 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