Repository navigation
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 |
danieldoglas
left a comment
There was a problem hiding this comment.
LGTM, just a little question.
|
|
||
| // 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.
Can't we use Localize.translateLocal here?
There was a problem hiding this comment.
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.
Apparently the linter disagrees with you haha - it's requiring the change...
dangrous
left a comment
There was a problem hiding this comment.
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
SetPasswordForNewAccountAndSigninerrorsobject 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.phpto get the validation linkPR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */displayNamepropertythisproperly 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)PR Reviewer Checklist
The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarhave been tested & I retested again)/** comment above it */displayNamepropertythisproperly 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)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