-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[HybridApp] Handle initialURL
navigation in InitialURLContextProvider
#58620
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
[HybridApp] Handle initialURL
navigation in InitialURLContextProvider
#58620
Conversation
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.
Agree, we need to move navigation out off AppNavigator
's useEffect
to handle updates that comes from OldDot properly
initialURL
navigation in InitialURLContextProvider
initialURL
navigation in InitialURLContextProvider
@youssef-lr 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.
Nice find 👍
🚧 @Julesssss has triggered a test app build. You can view the workflow run here. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
We'll have to fully test on production again. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
✋ 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/Julesssss in version: 9.1.16-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.1.16-4 🚀
|
Explanation of Change
We encountered an issue when entering the HybridApp twice with the same deeplink.
When clicking on it the first time, navigation worked fine but after navigating to another screen, putting the app in background and clicking on the same deeplink we weren't navigated to the correct place.
It's because
initialURL
didn't change and useEffect wasn't triggered.We can fix this behaviour by removing the broken useEffect and moving navigation logic to InitialURLContextProvider where we handle HybridApp urls
Fixed Issues
$ #58734
PROPOSAL:
Tests
or for iOS (because physical device is required for deeplinks testing)
Offline tests
QA Steps
Note that these might only be possible to verify on production
or for iOS (because physical device is required for deeplinks testing)
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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
Screen.Recording.Mar.19.2025.from.Marcin.Warchol.1.mp4
Android: mWeb Chrome
It won't be affected
iOS: Native
Screen.Recording.2025-03-19.at.16.39.52.mov
iOS: mWeb Safari
It won't be affected
MacOS: Chrome / Safari
It won't be affected
MacOS: Desktop
It won't be affected