-
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
Fix Sign in- Language preference doesn't persist when user Signs in with google #26948
Conversation
@aimane-chnaif 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] |
src/libs/actions/Session/index.js
Outdated
@@ -244,7 +250,7 @@ function beginSignIn(login) { | |||
*/ | |||
function beginAppleSignIn(idToken) { | |||
const {optimisticData, successData, failureData} = signInAttemptState(); | |||
API.write('SignInWithApple', {idToken}, {optimisticData, successData, failureData}); | |||
API.write('SignInWithApple', {idToken, preferredLocale: nvpPreferredLocale}, {optimisticData, successData, failureData}); |
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 make getting preferredLocale
logic consistent with normal sign in.
So for all 3 functions, either pass as param or use static value connected with Onyx.
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 prefer "use static value connected with Onyx" for all of them. Because I don't think the preferredLocale is a part of login form. What do you think? @aimane-chnaif
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.
Agreed
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.
Updated PR and tested in local. Could you preview the PR again? Thanks
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariDesktopiOSios.movAndroid |
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.
Confirmed preferredLocale
param is passed correctly to SignInWithApple
, SignInWithGoogle
api commands.
Also verified this doesn't break current normal login flow with preferred language selected.
@bondydaa all yours!
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.
👍 thank you! I just merged the backend changes to the API layer for this, the db layer was already updated and deployed. I'm going to add to the test steps to test the things outlined the original GH and wait to merge until the API changes have been deployed so that we can then confirm everything is still working, sorry for the back and forth!
oh test steps are already correct 👍 |
no worry @bondydaa. Just in case you're busy with something higher priority, I can help to test. |
@hoangzinh please fix conflict |
Fixed conflict with the main branch + also tested current Sign-in forms as well |
cc @aimane-chnaif ^ |
@bondydaa please let us know when both internal PRs reached staging or production so we can test |
sorry for the delay here! Looks like https://github.com/Expensify/Web-Expensify/pull/38866 was deployed to both staging and production so we should be good to test this then against both/either and confirm it works as well! |
Hi @bondydaa could we only test Sign in with Google? I read the guide to test Sign in with Apple in Dev env here https://github.com/Expensify/App/blob/main/contributingGuides/APPLE_GOOGLE_SIGNIN.md#apple. It seems a bunk of complicated steps to set up it. |
yes, it's quite complicated. We can test apple after deploy to staging |
I updated recordings for testing Sign in with Google. All platforms have been uploaded, except the mweb Android. It shows a blank page after clicking Sign in with Google icon. Do you have a same experience as me? Thanks @aimane-chnaif Screen.Recording.2023-09-25.at.23.47.07.mov |
Same happens to me. Seems like mWeb requires staging test too. |
@bondydaa I think we're good to merge as we verified working on some platforms. |
awesome thank you both so much! |
✋ 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/bondydaa in version: 1.3.75-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.75-12 🚀
|
🚀 Deployed to staging by https://github.com/bondydaa in version: 1.3.76-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.76-6 🚀
|
Details
Fixed Issues
$ #26133
PROPOSAL: #26133 (comment)
Tests
Test case 1: User language preference is English
Test case 2: User language preference is Spanish
Offline tests
Could not test when network is offline
QA Steps
Same as Tests
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
Screen.Recording.2023-09-25.at.20.28.22.-.web.mp4
Mobile Web - Chrome
Mobile Web - Safari
Screen.Recording.2023-09-25.at.23.24.34.-.ios.safari.mp4
Desktop
Screen.Recording.2023-09-25.at.20.33.40.-.desktop.mp4
iOS
Screen.Recording.2023-09-25.at.23.14.40.-.ios.mp4
Android