-
Notifications
You must be signed in to change notification settings - Fork 3k
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 PLAID_DATA and fix plaid bankAccounts selector #11750
Conversation
418f4f0
to
b34d8c6
Compare
…cessarily when other attributes of PLAID_DATA change
b34d8c6
to
ee52b44
Compare
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 think the proposals being discussed here are probably related and would conflict with this PR.
@@ -116,9 +113,12 @@ class AddPlaidBankAccount extends React.Component { | |||
*/ | |||
selectAccount(plaidAccountID) { | |||
const selectedPlaidBankAccount = _.findWhere(this.getPlaidBankAccounts(), {plaidAccountID}); | |||
if (!selectedPlaidBankAccount) { |
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.
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.
Yep, it was a mix of several things that I fixed in this PR. Not it can't be undefined anymore.
a291186
to
4a298ca
Compare
4f1aa9e
to
5f0722f
Compare
5f0722f
to
b6e47e8
Compare
|
Review in progress:
ScreenshotsWebAdd a PBA (Plaid) Screen.Recording.2022-10-12.at.16.28.12.movAdd a VBA (Plaid) Mobile Web - ChromeScreen.Recording.2022-10-12.at.20.27.03.movMobile Web - SafariDesktopiOSScreen.Recording.2022-10-12.at.20.38.05.movAndroidScreen.Recording.2022-10-12.at.20.19.54.mov |
@marcochavezf Updated! |
@yuwenmemon I think we (author and reviewer) now should add the screenshots for all platforms |
I'll add screenshots |
Added! |
@@ -26,6 +26,8 @@ const propTypes = { | |||
/** Contains plaid data */ | |||
plaidData: plaidDataPropTypes, | |||
|
|||
selectedPlaidAccountID: PropTypes.string, |
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.
The reviewer checklist says that all props are defined accurately and each prop has a /** comment above it */, although it's under _ If a new component is created I verified that:_ so not sure if this should be a blocker or not
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.
Good catch, we should probably still do that.
@@ -31,6 +31,7 @@ const propTypes = { | |||
error: PropTypes.string, | |||
shouldShowSuccess: PropTypes.bool, | |||
isLoading: PropTypes.bool, | |||
plaidAccountID: PropTypes.string, |
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.
Maybe all these need to be documented too
@@ -76,7 +78,11 @@ class AddPersonalBankAccountPage extends React.Component { | |||
* @param {Object} values - form input values passed by the Form component |
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.
Tested both flows (PBA and VBA) on every platform, added the screenshots and videos in this comment. |
There's a missing screenshot for the |
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. I left a clean up comment and I think the test steps could be more descriptive.
}); | ||
plaidAccessToken: this.props.plaidData.plaidAccessToken, | ||
}; | ||
ReimbursementAccount.updateReimbursementAccountDraft(bankAccountData); |
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 we can clean this up later, but I don't think that we need this since Form automatically updates the draft data if we pass shouldSaveDraft
to each input
ReimbursementAccount.updateReimbursementAccountDraft(bankAccountData); | |
ReimbursementAccount.updateReimbursementAccountDraft(bankAccountData); |
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.
Refactor PLAID_DATA and fix plaid bankAccounts selector (cherry picked from commit 6f0d806)
…-11750 🍒 Cherry pick PR #11750 to staging 🍒
🚀 Cherry-picked to staging by @yuwenmemon in version: 1.2.13-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by @yuwenmemon in version: 1.2.13-5 🚀
|
Refactor PLAID_DATA and fix plaid bankAccounts selector
🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
Details
Fixed Issues
$ #11554
$ #11769
Tests
PR Review Checklist
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 */
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)PR Reviewer Checklist
The reviewer 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 */
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)QA Steps
Screenshots
Web
Add a personal bank account via Plaid
2022-10-12_21-35-54.mp4
Add a VBBA via Plaid. Make sure no error occurs
vbba.mp4
Mobile Web - Chrome
Screen.Recording.2022-10-12.at.20.27.03.mov
Mobile Web - Safari
Kapture.2022-10-12.at.16.19.05.mp4
Desktop
Kapture.2022-10-12.at.16.24.13.mp4
iOS
Kapture.2022-10-12.at.17.02.47.mp4
Android
Kapture.2022-10-12.at.17.47.30.mp4