-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix: [BYOC] - RHP closes after refreshing Transaction start date and clicking RHP back button #78800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [BYOC] - RHP closes after refreshing Transaction start date and clicking RHP back button #78800
Conversation
|
@truph01 Please ignore this one, @hungvu193 will review here as part of a follow-up from #78489. |
|
I'll review shortly |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-01-03.at.11.53.27.movAndroid: mWeb ChromeScreen.Recording.2026-01-03.at.11.53.27.moviOS: HybridAppScreen.Recording.2026-01-03.at.11.02.40.moviOS: mWeb SafariScreen.Recording.2026-01-03.at.11.01.25.movMacOS: Chrome / SafariScreen.Recording.2026-01-01.at.13.50.07.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/carlosmiceli in version: 9.2.94-0 🚀
|
…TransactionStartDateFix fix: [BYOC] - RHP closes after refreshing Transaction start date and clicking RHP back button
Explanation of Change
This PR fixes a navigation regression where the Transaction start date RHP closes entirely instead of returning to the Card Details RHP after a page refresh.
Root Cause
The
Navigation.goBack()calls inWorkspaceCompanyCardEditTransactionStartDatePage.tsxdid not specify an explicit destination. After a browser refresh, the navigation state is reconstructed from the URL using theWORKSPACE_TO_RHPrelations, which only restores the central pane (COMPANY_CARDS) – not the intermediate Card Details RHP -> whengoBack()is called without a destination, the navigator doesn't know where to return, so it closes the RHP entirely.Solution
Updated both
goBack()calls (back button handler and submit function) to explicitly navigate toROUTES.WORKSPACE_COMPANY_CARD_DETAILS.getRoute(...)with{compareParams: false}, matching the established pattern used in similar pages likeWorkspaceCompanyCardEditCardNamePage.tsxandWorkspaceCompanyCardAccountSelectCardPage.tsx.Fixed Issues
$ #78779
PROPOSAL: #78779 (comment)
Tests
Preconditions:
I. Test: Navigation after page refresh
II. Test: Save after page refresh
III. Test: Normal navigation (without refresh)
Offline tests
N/A
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))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: mWeb Chrome
android-mweb.mp4
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov