-
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
27168 Deeplinking not working after logout #31316
27168 Deeplinking not working after logout #31316
Conversation
@narefyev91 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] |
@lukemorawski there are some issues which i see between desktop and web (seems the same issues described here #29688 (comment)) Screen.Recording.2023-11-15.at.16.22.49.movScreen.Recording.2023-11-15.at.16.24.31.mov |
@narefyev91 can't really recreate that in dev mode as pasting a url starting from |
@narefyev91
|
yup i also saw that issue already presented on main - but we need to be sure that this flow is not happened #29688 (comment) - because that were the main issues |
@narefyev91 android web video is under |
@narefyev91 ok, but shouldn't this be a separate ticket then? changes in this PR where reverted last time, because it was falsy thought that it create a regression, when in fact, that regression (that you mention in the linked comment) was already present in the code. |
@lukemorawski strange issue happened - when i just try to paste any url in the link for android mWeb - it shows me not found page - but if i rollback all your code - everything is working.... Screen.Recording.2023-11-15.at.17.26.22.mov |
Hmmm also i'm wondering - in all your videos you still use port 8082? Do you use old videos? |
web.android.working.url.change.movworks for me. Actually your video uses the old version accessing the app in the browser. Now it's done using https. And it's still running on 8082 |
yup i using new one https://10.0.2.2:8082 |
Reviewer Checklist
Screenshots/VideosWeb8mb.video-cCZ-THl8R8j1.mp4Mobile Web - Chromeandroid-web.mp4Mobile Web - Safariios-web.mp4ios-web2.mp4Desktopdesktop.mp4iOSios2.mp48mb.video-dBA-vriQC3fw.mp4Androidandroid.mp4 |
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!
🎀 👀 🎀 C+ reviewed
✋ 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 production by https://github.com/luacmartins in version: 1.4.1-13 🚀
|
This PR likely introduced this bug |
Session.waitForUserSignIn().then(() => { | ||
Navigation.waitForProtectedRoutes().then(() => { |
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.
This wait promise callback although it solves the original issue, it revealed a hidden bug #33001.
Details
This PR aims to fix a problem with deep links. When a user logs out and then tries to navigate using a deep link, the app does nothing. This is because the navigation action was dispatched before the nav tree changed. Navigation tree with all the protected routes (routes that are supposed to be accessible only by a logged in user) is rendered conditionally. After logging in, all the protected routes are rendered, but rebuilding the whole element tree takes a while.
To protect against that situation a helper method
navContainsProtectedRoutes
had been added to check if the nav state has the protected routes ready. This is done by checking if therouteNames
array in the nav state contains any of thePROTECTED_SCREENS
(a set of screen names that is available in the logged in state).This is used by the
waitForProtectedRoutes
function, that returns a Promise which waits for the nav state to be in the logged in state and resolves immediately after this happens.That is used used within the
openReportFromDeepLink
, that not only wait for the user to log in, but also now for the nav state to change.Fixed Issues
$ #27168
PROPOSAL:
Tests
same as qa steps
Offline tests
same as qa steps
QA Steps
_ open mobile app (android or ios)
npx uri-scheme open "new-expensify://settings/profile/personal-details/date-of-birth" --ios
(change to--android
if your running an android app)PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
native.android.mov
Android: mWeb Chrome
web.android.mov
iOS: Native
native.ios.mov
iOS: mWeb Safari
web.ios.mov
MacOS: Chrome / Safari
web.desktop.mov
MacOS: Desktop
native.desktop.mov