-
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 Plaid triggered again on selector bank accounts page after coming back from offline #17136
Conversation
/** | ||
* @returns {Boolean} | ||
*/ | ||
hasPlaidBankData() { |
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 hasPlaidData
is better name. If fails, no bank data but just error.
if ((this.props.receivedRedirectURI && this.props.plaidLinkOAuthToken) | ||
|| !_.isEmpty(lodashGet(this.props.plaidData, 'bankAccounts')) | ||
|| !_.isEmpty(lodashGet(this.props.plaidData, 'errors'))) { | ||
if ((this.props.receivedRedirectURI && this.props.plaidLinkOAuthToken) || this.hasPlaidBankData()) { |
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 am not sure why this.props.receivedRedirectURI && this.props.plaidLinkOAuthToken
is needed here.
If needed, it means that this can be true even if no plaid data, and this should be added as well in componentDidUpdate
which is the reason why I selected @situchan's proposal.
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.
If we're not sure about it, I recommend we should not add it until we know it. Otherwise, let's say this.props.receivedRedirectURI && this.props.plaidLinkOAuthToken
is true but no plaid data like you said. What is user seeing in the screen now? Maybe a black screen. I think it's bad UX than we let user redo Plaid again.
I think the most important thing in this case is we need to ensure it has either bank accounts or error so user can know what to do next.
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.
@grgia what are your thoughts on this?
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.
@grgia Just in case you miss this one, do you have any opinion on this? Basically I can replicate conditions we have in componentDidAmount, but I'm afraid that it would lead to strange behavior that I mentioned above. So to be safe, I would like to keep it clean as possible. We can back and update this condition if we find a case that doesn't work.
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.
bump for speed up
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 that we should keep the this.props.receivedRedirectURI && this.props.plaidLinkOAuthToken
checks
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 have addressed your feedbacks @grgia @0xmiroslav
if ((this.props.receivedRedirectURI && this.props.plaidLinkOAuthToken) | ||
|| !_.isEmpty(lodashGet(this.props.plaidData, 'bankAccounts')) | ||
|| !_.isEmpty(lodashGet(this.props.plaidData, 'errors'))) { | ||
if ((this.props.receivedRedirectURI && this.props.plaidLinkOAuthToken) || this.hasPlaidBankData()) { |
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 that we should keep the this.props.receivedRedirectURI && this.props.plaidLinkOAuthToken
checks
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.mp4Mobile Web - Safarimsafari.MP4Desktopdesktop.moviOSAndroidandroid.mp4 |
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 🎉
@grgia all you!
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!
✋ 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/grgia in version: 1.3.0-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.0-2 🚀
|
Details
Fixed Issues
$ #15861
PROPOSAL: #15861 (comment)
Tests
Note: If you want to test Plaid login in dev/staging, you can enable
Use Staging Server
in Setting > PreferencesOffline tests
Same as above
QA Steps
Same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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-04-07.at.22.39.58.-.web-1080.mp4
Mobile Web - Chrome
Screen.Recording.2023-04-07.at.23.14.08.-.android.chrome.-.1080.mp4
Mobile Web - Safari
Screen.Recording.2023-04-07.at.23.27.45.-.ios.safari.-.1080.mp4
Desktop
Screen.Recording.2023-04-07.at.22.55.41.-.desktop.-.1080.mp4
iOS
Screen.Recording.2023-04-07.at.23.30.30.-.ios.-.1080.mp4
Android
Screen.Recording.2023-04-07.at.23.03.29.-.android.1080.mp4