[CP Staging] Fix crash when opening context menu#54832
[CP Staging] Fix crash when opening context menu#54832MonilBhavsar merged 1 commit intoExpensify:mainfrom
Conversation
|
@ikevin127 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] |
|
🚧 @puneetlath has triggered a test build. You can view the workflow run here. |
|
@ishpaul777 ready for your review |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-01-07.at.2.09.34.AM.movAndroid: mWeb ChromeScreen.Recording.2025-01-07.at.2.00.13.AM.moviOS: NativeScreen.Recording.2025-01-07.at.1.51.10.AM.moviOS: mWeb SafariScreen.Recording.2025-01-07.at.1.37.31.AM.movMacOS: Chrome / SafariScreen.Recording.2025-01-07.at.1.33.51.AM.movMacOS: DesktopScreen.Recording.2025-01-07.at.2.18.44.AM.mov |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
|
Thanks! |
[CP Staging] Fix crash when opening context menu (cherry picked from commit 4bab245) (CP triggered by puneetlath)
|
✋ 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/puneetlath in version: 9.0.81-1 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.0.81-6 🚀
|
Explanation of Change
The error occurs because
useNavigation()is being called here in components that are not descendants of aNavigationContainerTo fix this, we should get the navigator from
NavigationContextand return early if it'sundefined.Fixed Issues
$ #54827
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
Screen.Recording.2025-01-06.at.9.15.20.PM.mov
Android: mWeb Chrome
Screen.Recording.2025-01-06.at.9.18.12.PM.mov
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2025-01-06.at.21.12.54.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2025-01-06.at.21.16.47.mp4
MacOS: Chrome / Safari
Screen.Recording.2025-01-06.at.9.17.34.PM.mov
MacOS: Desktop
Screen.Recording.2025-01-06.at.9.18.57.PM.mov