Add layout=narrow initial param to the ModalStackNavigator#33426
Conversation
Reviewer Checklist
Screenshots/Videos |
|
@rayane-djouah Noticed a strange bug.
Screen.Recording.2024-01-02.at.9.53.42.AM.mov |
|
@rayane-djouah any updates on the bug? |
|
@getusha I think that the bug we are facing is due to the way initialParams are set by react-navigation stack. When you navigate to a screen without adding the isInRHP param, and the isInRHP parameter is automatically added as an initial parameter, it is treated as a new navigation state. This behavior is causing the need for an extra back button press to return to the previous screen. |
|
I think we might need to rename this since So I think instead of |
|
Also, I've looked into the problem you've described a bit, but I don't think we should worry about it at this time. The reason I say that is because react-navigation is not in the business of re-writing browser history (or more accurately, coercing the browser to use its version of the history rather than the native browser history). There's additional context in these comments. I think that to solve the problem, we would ultimately need react-navigation to enforce a different version of the browser history, which is something they don't want to do for now (they say it's impossible, but I think it probably is possible by implementing a custom handler for the It's not a huge deal either – I think we can agree for now that a user manually removing URL params is an edge case we don't need to worry about and which is unlikely to affect any real users. |
|
I agree we can ignore it. |
|
Updated |
roryabraham
left a comment
There was a problem hiding this comment.
Code, LGTM 👍🏼
Awaiting further review from @getusha
|
Just a Q: @roryabraham |
|
Hmmm I don't think it's really a problem, so let's just move forward |
|
✋ 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: 1.4.25-0 🚀
|
|
This was causing a deplooy blocker so to unblock the deploy we went with a straight revert https://github.com/Expensify/App/pull/34552/files |
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.25-10 🚀
|
|
This also caused another deploy blocker which we were able to fix without reverting this. There was some code looking for empty route params which was broken by this. We fixed it by looking for the presence of a specific route param rather than that they were empty. |






Details
Breaking down #31476 into several PRs as explained here
Fixed Issues
$ #30528
Tests
N/A
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.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 so 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
N/A
Android: mWeb Chrome
N/A
iOS: Native
N/A
iOS: mWeb Safari
N/A
MacOS: Chrome / Safari
N/A
MacOS: Desktop
N/A