-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
useResponsiveLayout
hook 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) updatingshouldUseNarrowLayout
totrue
when the modal opens.This PR fixes that by having
useResponsiveLayout
check 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mov
mWeb.mov
MacOS: Desktop