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. |
| 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.
Let's use ROUTES.DESKTOP_SIGN_IN_REDIRECT here?
There was a problem hiding this comment.
@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
exitToparam is being set before deeplinking into desktop, but thatexitToparam being set todesktop-signin-redirectcauses 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
pathnamewith the expected route of/r. This correctly sets theexitToto an expected route within the navigation stack.Tests
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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