Repository navigation
[CP Staging] Fix Search back button on mWeb and report opening in Search - #51032
Conversation
|
@rayane-djouah 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-10-17.at.5.51.06.PM.movAndroid: mWeb ChromeScreen.Recording.2024-10-17.at.5.47.51.PM.moviOS: NativeiOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-10-17.at.17.45.34.mp4MacOS: Chrome / SafariScreen.Recording.2024-10-17.at.5.41.16.PM.movMacOS: DesktopScreen.Recording.2024-10-17.at.5.41.36.PM.mov |
|
@luacmartins all yours! |
…h-fixes [CP Staging] Fix Search back button on mWeb and report opening in Search (cherry picked from commit 20b85d5) (CP triggered by luacmartins)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.0.50-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.50-8 🚀
|
| isVisible={isSearchRouterDisplayed} | ||
| popoverAnchorPosition={{right: 6, top: 6}} | ||
| fullscreen | ||
| shouldHandleNavigationBack={Browser.isMobileChrome()} |
There was a problem hiding this comment.
Coming from #58946. Base on how shouldHandleNavigationBack works?
App/src/components/Modal/index.tsx
Lines 50 to 53 in 8deddfa
- pushed an empty history state and listen for
popstateto catch the device back button has clicked - remove this history state on model hide.
There is a problem when the modal contains items can do navigation like items on SearchRouter, it will navigate without removing the empty history state which causes an issue (user need to click device back button twice to go back). And we work on a fix for it here #61297
Details
This PR fixes two bugs, because they were quite small.
shouldHandleNavigationBackprop fromModal. I used the same pattern as found inEmocjiPickerwhere we set this value forBrowser.isMobileChrome()Report.navigateToAndOpenReportFixed Issues
$ #50973
$ #50982
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
back button behavior
rec-backbutton-andr.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
clicking on new user
rec-openreport-web.mp4
MacOS: Desktop