-
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
Fixes for feature: Add support for redirecting user to a target URL when they click on the magic link code #37145
Conversation
@@ -856,7 +856,7 @@ function handleExitToNavigation(exitTo: Routes | HybridAppRoute) { | |||
waitForUserSignIn().then(() => { | |||
Navigation.waitForProtectedRoutes().then(() => { | |||
const url = NativeModules.HybridAppModule ? Navigation.parseHybridAppUrl(exitTo) : exitTo; | |||
Navigation.navigate(url, CONST.NAVIGATION.TYPE.FORCED_UP); | |||
Navigation.navigate(url); |
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 fixes #36603
…s already signed in
if (exitTo){ | ||
Session.handleExitToNavigation(exitTo); | ||
return; | ||
} | ||
Navigation.goBack(); |
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.
when user is already signed in on native app, navigation to exitTo path was not performed.
This change fixes this case.
{autoAuthState === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN && isSignedIn && <JustSignedInModal is2FARequired={false} />} | ||
{autoAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED && ( | ||
{autoAuthState === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN && isSignedIn && !exitTo && <JustSignedInModal is2FARequired={false}/>} | ||
{autoAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED && !exitTo && ( |
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 fixes #36325 (comment)
…rowser, navigation was done after clicking just sign in here link
@@ -34,7 +34,7 @@ function ValidateLoginPage({ | |||
} | |||
Session.initAutoAuthState(autoAuthState); | |||
|
|||
if (isSignedIn || !login) { | |||
if (isSignedIn || (!login && !exitTo)) { |
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.
@cubuspl42 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] |
…o-a-target-url-when-they-click-on-the-magic-link-code
Going to add @allroundexperts as C+ here since he helped review the original PR #36390, thanks for quick work here @rayane-djouah. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-02-26.at.1.28.47.PM.movAndroid: mWeb ChromeScreen.Recording.2024-02-26.at.1.23.57.PM.moviOS: NativeScreen.Recording.2024-02-26.at.1.21.29.PM.moviOS: mWeb SafariScreen.Recording.2024-02-26.at.1.19.20.PM.movMacOS: Chrome / SafariScreen.Recording.2024-02-26.at.12.59.29.PM.movMacOS: DesktopScreen.Recording.2024-02-26.at.1.06.16.PM.mov |
@rayane-djouah Back button doesn't seem to work as indicated in the OP Screen.Recording.2024-02-26.at.1.19.20.PM.mov |
@allroundexperts |
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.
Works good!
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.
Thanks for the improvement.
✋ 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/techievivek in version: 1.4.44-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.44-13 🚀
|
Details
This PR is a follow up to #36390
Fixed Issues
$ #36603
PROPOSAL: N/A
Tests
?exitTo=/settings/preferences
at the end of the link.Offline tests
N/A
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 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(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label 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.Recording.2024-02-25.171843.mp4
Android: mWeb Chrome
mweb.chrome.webm
iOS: Native
ios.Recording.2024-02-25.164329.mp4
iOS: mWeb Safari
mweb.safari.Recording.2024-02-25.162910.mp4
MacOS: Chrome / Safari
web.Recording.2024-02-25.144153.mp4
MacOS: Desktop
desktop.Recording.2024-02-25.165540.mp4