-
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
Add new API method SetPasswordForNewUserAndSignin #10244
Conversation
Can't we take this one off hold now that 34698 was merged yesterday? Or do we need to that PR to hit production first? |
Yes, wait till it hits production and I'll push some more changes to this PR |
34698 hit production yesterday so I'm taking this one off hold. Do you expect to have this up for review today? |
Reviewers, Suppressing cyclic dependency lint errors until we fix it. |
Looks like you modified Instead, all new API commands should use API.js, and follow our guidelines for writing new API commands. Unsure if your change is okay? Drop a note in #expensify-open-source! |
7f9d0ca
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, just a little question.
@@ -348,7 +348,7 @@ function setPassword(password, validateCode, accountID) { | |||
} | |||
|
|||
// This request can fail if the password is not complex enough | |||
Onyx.merge(ONYXKEYS.ACCOUNT, {error: response.message}); | |||
Onyx.merge(ONYXKEYS.ACCOUNT, {errors: {[DateUtils.getMicroseconds()]: response.message}}); |
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.
Can't we use Localize.translateLocal 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.
We could. One way I can think of is to map error codes with localize phrases and get the appropriate phrase when we receive the response code from the mapping. We do that for Authentication call.
But since, we're deprecating this API call soon, I think we can skip this for now.
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.
Apparently the linter disagrees with you haha - it's requiring the change...
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 your patience while I looked into testing. This makes sense to me!
This lint error is a mistake, the linter has a bug and should only be throwing if the message is a hardcoded string. So it's safe to merge without this passing and create a new issue to fix that separately. |
@dangrous @danieldoglas could you complete the PR Reviewers checklist 🙏 |
PR Reviewer ChecklistThe Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed
|
Checklist is checklisted! I'll attempt to rerun that checklist check, then will go ahead and merge either way since it IS all checked. |
@dangrous looks like this was merged without passing tests. Please add a note explaining why this was done and remove the |
As noted above - the failed test is a linting error, we'll be updating that separately. |
The lint error made the merge action here fail. I think it's mostly fine because there's an open deploy checklist open so it wouldn't have needed to be deployed to staging anyway, but can someone follow up with a PR to fix the lint issue please? |
In addition to my comments above, please do not merge PRs with failing tests. Anyone that merges main into their PRs will have issues and it will block them until the lint error is resolved (this just happened to me) |
Ack, sorry about that! Will definitely not do in the future. I didn't realize that would cause trouble outside of this specific process, and was following the comment thread above |
PR to fix the lint error - #11075 |
@dangrous that is correct! App PRs are deployed to staging when they are merged, unless the checklist is locked in which case they are deployed once a new checklist is created or the current one is unlocked. This differs for a production deploy, since the deployer is actually the App deployer. You can read more about the process here. Since you merged this PR, you technically deployed it to staging 🙌 |
🚀 Deployed to production by @luacmartins in version: 1.2.2-0 🚀
|
Is there a follow-up issue somewhere to fix the require cycle this introduced? |
Yes, here it is #11102 |
Details
SetPasswordForNewAccountAndSignin
errors
object instead of string in ACCOUNT and SESSION Onyx keysFixed Issues
https://github.com/Expensify/Expensify/issues/218819
Tests
Checkout this branch in Web-E and run newdot app
php script/notifyall.php
to get the validation linkPR 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
The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
have been tested & I retested again)/** 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
Feel free to repeat above steps for email and phone login
Screenshots
Offline
Web
Mobile Web
Desktop
Unable to test the workflow on App.
Issue and discussion
iOS
Android