Support switching between transactions without transaction threads using arrows in the header#69648
Conversation
…ing arrows in the header
…transactions # Conflicts: # src/components/SelectionList/Search/TransactionGroupListItem.tsx
|
@hungvu193 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] |
| const backTo = Navigation.getActiveRoute(); | ||
| const nextThreadReportID = nextParentReportAction?.childReportID; | ||
| const navigationParams = {reportID: nextThreadReportID, backTo}; | ||
| e?.preventDefault(); |
There was a problem hiding this comment.
NAB make this the first line of the callback
| const transactionThreadReport = createTransactionThreadReport(parentReport, nextParentReportAction); | ||
| navigationParams.reportID = transactionThreadReport?.reportID; | ||
| } | ||
| requestAnimationFrame(() => Navigation.navigate(ROUTES.SEARCH_REPORT.getRoute(navigationParams), {forceReplace: true})); |
There was a problem hiding this comment.
Why did you wrap the navigation in requestAnimationFrame? Can you add a comment explaining why?
There was a problem hiding this comment.
Added comment in 536cd4d
Overall I added requestAnimationFrame to have the space for the optimistic Onyx updates to be written.
…transactions # Conflicts: # src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-10-15.at.22.23.36.movAndroid: mWeb ChromeScreen.Recording.2025-10-15.at.22.15.09.moviOS: HybridAppScreen.Recording.2025-10-15.at.22.11.32.moviOS: mWeb SafariScreen.Recording.2025-10-15.at.21.45.22.movMacOS: Chrome / SafariChrome.movMacOS: DesktopDesk.movScreen.Recording.2025-10-15.at.18.11.03.mov |
|
✋ 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/roryabraham in version: 9.2.32-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.32-6 🚀
|
| // to display prev/next arrows in RHP for navigation | ||
| const sortedSiblingTransactionReportIDs = getThreadReportIDsForTransactions(reportActions, sortedTransactions); | ||
| setActiveTransactionThreadIDs(sortedSiblingTransactionReportIDs).then(() => { | ||
| const sortedSiblingTransactionIDs = sortedTransactions.map((transaction) => transaction.transactionID); |
There was a problem hiding this comment.
Coming from #77286 where we are unable to navigate using the arrows for expenses added to a report (either using the Duplicate option or adding an expense from another account) after an expense has been opened. The solution is to dynamically update when activeTransactionIDs changes, rather than only on opening the RHP.
Explanation of Change
Fixed Issues
$ #67887
PROPOSAL: N/A
Tests
noOptimisticTransactionThreadsbetaOffline tests
Same, as in the Tests section
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same, as in the Tests section
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
Android: Native
android.mp4
Android: mWeb Chrome
android_web.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios_web.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4