[CP Staging] Search bottom-up if a component is in a narrow modal navigator#43074
Conversation
|
@ 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] |
|
@ 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-06-05.at.07.08.03.android.movAndroid: mWeb ChromeScreen.Recording.2024-06-05.at.07.02.32.android.chrome.moviOS: NativeScreen.Recording.2024-06-05.at.07.10.04.ios.moviOS: mWeb SafariScreen.Recording.2024-06-05.at.07.11.50.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2024-06-05.at.07.00.27.web.movMacOS: DesktopScreen.Recording.2024-06-05.at.07.04.33.desktop.mov |
|
@Julesssss 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] |
mountiny
left a comment
There was a problem hiding this comment.
Looks good to me, thanks for fixing it so quickly
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…entNavigator Search bottom-up if a component is in a narrow modal navigator (cherry picked from commit 3c04b02)
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.79-11 🚀
|
Details
The problem with the previous implementation is that the
useResponsiveLayouthook was checking globally if a narrow modal was being displayed (i.e: at the top of the global navigation stack). This resulted in components underneath the modal (such as those in the central pane navigator) updatingshouldUseNarrowLayouttotruewhen the modal opens.This PR fixes that by having
useResponsiveLayoutcheck if the component calling it is a child of one of our narrow modal navigators. This is also simpler, because the navigation object from react-navigation handles recursively searching for parent navigators with a given ID.Fixed Issues
$ #43031
Tests / QA Steps
Account Settings->Profile.Status.Offline tests
n/a
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mov
mWeb.mov
MacOS: Desktop