-
Notifications
You must be signed in to change notification settings - Fork 3k
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] Fix for push notifications in HybridApp on Android #46090
[HybridApp] Fix for push notifications in HybridApp on Android #46090
Conversation
maxTimeoutRef.current = setTimeout(() => { | ||
Log.info('[HybridApp] Forcing transition due to unknown problem', true); | ||
setStartedTransition(true); | ||
setExitTo(ROUTES.HOME); | ||
}, 3000); |
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.
I guess we can look into the underlying problem later. Is 3 seconds good enough to reliably solve this problem though?
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.
It's just a security measure that @mateuuszzzzz already wanted to introduce for some edge cases. The worst thing that will happen is that a user will see some transitioning between screens which we wanted to cover, though 😄
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.
Hmm yes I think we only want to add a setTimeout
as a last resort, is there nothing else we can do here?
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.
I was thinking about it, but I wanted to keep it to make sure we never get a "bootsplash got frozen" situation. I tried to play with state, but I think this is the safest from the UX perspecitve anyways. Also, it won't any additional re-renders/state changes.
I'm not 100% happy with this solution either, but for now I think we can stay with it. When we have some bandwidth in the future I think we can return to this issue to solve it in a cleaner way.
@Julesssss Does this require C+ review? If so, then how to test it? |
This will need to be tested internally. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
Conflicts |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To Duration
Show details
Meaningless Changes To DurationShow entries
Show details
|
@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker. |
If these are results for pure NewDot, this PR should have no impact on performance - we return early if it's not a HybridApp, therefore we shouldn't get to the |
🚀 Deployed to staging by https://github.com/AndrewGable in version: 9.0.15-0 🚀
|
@AndrewGable @Julesssss What notifications should we be checking? |
@staszekscp Should we test chat notifications in the Hybrid app? |
I think more work may be needed here. I had HybridApp crash in the background earlier today while on the latest beta, in response to receiving a push notification: https://expensify.slack.com/archives/C049HHMV9SM/p1722542477949449 |
going to check this off so as not to block deploy though |
🚀 Deployed to production by https://github.com/roryabraham in version: 9.0.15-9 🚀
|
cc: @AndrewGable @Julesssss
Details
The PR fixes wrong behaviour of navigation after selecting a push notification. Before the code was less reliable - probably because of usage of
isNavigationReady
promise. That could be the reason why somenavigate
callbacks could be triggered in wrong moment inrelease
configuration. As result user wouldn't be able to end up on correct screen.There is an additional part for the PR in
Mobile-Expensify
repo.Fixed Issues
$ #42379
PROPOSAL: N/A
Tests
Offline tests
QA Steps
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
w_525a888e9061af10633b10b6d174f92ab86dd00d-2024-07-24.06_53_56.834.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop