-
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
Fix for frozen UI state on desktop after redirect from 3rd party sign in #25706
Conversation
Reviewer Checklist
Screenshots/VideosWebN/A Mobile Web - ChromeN/A Mobile Web - SafariN/A Desktop25706-desktop.moviOSN/A AndroidN/A |
@cdanwards I'm not seeing the "Sign in with Google" button, is there a trick to getting it to display? Is it behind a beta or something? (Though I should be on all of them...) Also did you work with an internal engineer on this project who would have more context for the review? |
@amyevans yes! Here's the PR that merged this feature: #23673 There's a check within the Let me know if there's any other questions and @marcochavezf is the internal engineer working with us on this for context. |
src/libs/Browser/index.web.js
Outdated
@@ -72,7 +72,8 @@ function isSafari() { | |||
*/ | |||
function openRouteInDesktopApp(shortLivedAuthToken = '', email = '') { | |||
const params = new URLSearchParams(); | |||
params.set('exitTo', `${window.location.pathname}${window.location.search}${window.location.hash}`); | |||
const openingFromDesktopRedirect = window.location.pathname === '/desktop-signin-redirect'; |
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.
Let's use ROUTES.DESKTOP_SIGN_IN_REDIRECT
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.
@amyevans I added a comment to explain the check and prepended a /
, which exists on the pathname!
Congrats, that’s your 5th PR merged! 🎉 Do you know about the ContributorPlus role? It’s an opportunity to earn more in the Expensify Open Source community. Keep up the great work - thanks! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Fix for frozen UI state on desktop after redirect from 3rd party sign in (cherry picked from commit fc9378e)
🚀 Deployed to staging by https://github.com/amyevans in version: 1.3.56-14 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|
🚀 Deployed to staging by https://github.com/amyevans in version: 1.3.58-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.58-5 🚀
|
Details
Fixed Issues
$#25679
PROPOSAL:
An
exitTo
param is being set before deeplinking into desktop, but thatexitTo
param being set todesktop-signin-redirect
causes the desktop app to freeze, likely because that screen is outside of the current navigation stack.My proposal is to check if we are deeplinking to desktop after 3rd party login flow and replace the
pathname
with the expected route of/r
. This correctly sets theexitTo
to an expected route within the navigation stack.Tests
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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)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
Web
N/A
Mobile Web - Chrome
N/A
Mobile Web - Safari
N/A
Desktop
Screen.Recording.2023-08-22.at.1.35.18.PM.mov
iOS
N/A
Android
N/A