Create custom history param#62032
Conversation
|
@thesahindia 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] |
src/libs/Navigation/AppNavigator/customHistory/addCustomHistoryRouterExtension.ts
Outdated
Show resolved
Hide resolved
src/libs/Navigation/AppNavigator/customHistory/addCustomHistoryRouterExtension.ts
Outdated
Show resolved
Hide resolved
|
One of the tests is failing. |
|
@thesahindia I think it works now |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreenrecording_20250524_143915.mp4Android: mWeb ChromeScreen.Recording.2025-05-22.at.2.08.19.AM.moviOS: HybridAppScreen.Recording.2025-05-23.at.3.23.21.AM.moviOS: mWeb SafariScreen.Recording.2025-05-22.at.3.00.34.AM.movMacOS: Chrome / SafariScreen.Recording.2025-05-22.at.2.37.09.AM.movMacOS: DesktopScreen.Recording.2025-05-22.at.2.34.56.AM.mov |
|
@adamgrzybowski, could you please resolve the conflicts? |
|
@adamgrzybowski, did you test on native? It doesn't seem to be working. Screen.Recording.2025-05-22.at.12.44.01.PM.mov |
|
@thesahindia yep I forgot to add index.native.ts to the commit 😄 should work now. BTW, I noticed that the Android back button is not closing the modal. Do you think this behaviour is expected? I did a quick investigation, and it looks like this may be a regression from this PR #59997 |
|
@adamgrzybowski, could you please resolve the conflicts? |
|
@thesahindia conflicts resolved |
|
🚧 @mountiny has triggered a test app build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
@adamgrzybowski was this fixed? i think the back button should close modals |
|
@mountiny I only found the PR that introduced the bug and saw there was a discussion about reverting it. I didn't make any related changes. |
mountiny
left a comment
There was a problem hiding this comment.
Thanks Adam, changes look fine to me although it is above my head in some cases.
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Waiting for regressions 😄 |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.53-0 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.53-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.1.53-7 🚀
|
Explanation of Change
This PR is motivated by the current way of handling non route based history in the app. Directly modifying history entries may cause problems and conflicts with how react-navigation handles history.
To avoid such problems, I created
useCustomHistoryParamhook that should be used when we want to push non route based history entry that is dependent on a route param (e.g. shouldShowModal)It also creates a foundation for creating more functions and hooks that will interact with the browser history without risk of breaking internal react-navigation history logic.
Fixed Issues
$ #58264
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop