-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Refactor] PreferredLocale_Update
#9650
Conversation
PreferredLocale_Update
PreferredLocale_Update
I was not able to test it in android because of this error. As soon as that is solved I'll add the video here too |
PreferredLocale_Update
PreferredLocale_Update
HOLD removed, but still can't run Android to upload the videos. |
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 PR should be on HOLD until the Web-E PR here is deployed to production.
PreferredLocale_Update
PreferredLocale_Update
PreferredLocale_Update
PreferredLocale_Update
Now it's off HOLD! |
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 and works well
]; | ||
|
||
API.write('UpdatePreferredLocale', { | ||
value: locale, |
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.
NAB, kind of odd that there is an API parameter called value
? 😄 Curious whether it should be more specific but definitely would not block on this comment.
@marcaaron looks like this was merged without passing tests. Please add a note explaining why this was done and remove the |
Tests passed afaict. |
I think the issue is that this PR wasn't up-to-date with main. So we double imported API in |
Ok, got it, thanks! Maybe we can make it so that no PR can be merged if it's behind main? That seems like a good idea. cc @roryabraham if you know how to do that with your GH action 🥷 skills. |
There is a GitHub setting we could turn on that forces a PR to be up-to-date with main in order to merge it, but we historically haven't turned that on because it could cause sometimes-unnecessary delays, particularly with our global team. So instead we have a GitHub Action that runs lint and tests on main whenever a PR is merged. If they fail, as happened in this case, then:
However, GitHub has a new feature called merge queues that might be able to solve this in a better way, where instead of merging a PR, you would add it to a queue to be merged. The queue processes pull requests by merging into a temporary copy of main, running whatever tests + lint we want, and then the PR is only merged to main for real if everything passes. And then it does the same for the next PR in the merge queue. Would need to test it a bit but it seems cool. |
🚀 Deployed to staging by @marcaaron in version: 1.1.81-0 🚀
|
🚀 Deployed to production by @roryabraham in version: 1.1.82-5 🚀
|
Linked with https://github.com/Expensify/Web-Expensify/pull/34182
Details
Refactoring method PreferredLocale_Update to new standards.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/211819
Tests
PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
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)PR Reviewer Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followed/** comment above it */
displayName
propertythis
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)QA Steps
[DEV ONLY]
From login page:
Click on the drop down for languages
Change it to Spanish/English
It should change without issues
[PRODUCTION]
Sign in
Go to Settings > Preferences
Change language
Check that the request for

api?command=UpdatePreferredLocale
was successfulYour preferred language should change without any issues.
Verify that no errors appear in the JS console
Screenshots
Web
video_correto.mov
Mobile Web
mobile-web-ios.mov
Desktop
desktop.mov
iOS
ios.mov
Android