-
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
Android-BA-Tapping connect online with plaid shows 2 spin circles loading #32641
Android-BA-Tapping connect online with plaid shows 2 spin circles loading #32641
Conversation
@akinwale Plus a little explanation I added a loader inside PlaidLink |
@ZhenjaHorbach With the loader inside PlaidLink, on destkop and web, two loaders are displayed when PlaidLink is active. Only one loader should be displayed in this scenario. See the included video. 32641-web.mp4 |
Hello ) #32685 But I'm keeping an eye on this bug But from the other side, we have the same bug on the main |
@ZhenjaHorbach Thank you for your response. Could you please test with the solution in the accepted proposal from the referenced issue and show a video with the fix? If only one loader is displayed, then we do not have to wait for the other PR to be ready and I can go ahead to approve this one. Thanks. |
@akinwale |
@akinwale Screen.Recording.2023-12-19.at.17.13.17.mov |
Reviewer Checklist
Screenshots/VideosAndroid: Native32641-android-native.webmAndroid: mWeb ChromeiOS: Native32641-ios-native.mp4iOS: mWeb Safari32641-ios-safari.mp4MacOS: Chrome / Safari32641-web.mp4MacOS: Desktop32641-desktop.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.
if (plaidDataErrorMessage) { | ||
return <Text style={[styles.formError, styles.mh5]}>{plaidDataErrorMessage}</Text>; | ||
} | ||
|
||
if (lodashGet(plaidData, 'isLoading')) { |
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 one thing I'm slightly worried about here... is this way, we'll never be able to show the error message AND a loading indicator at the same time, right? Where previously we could... Can we make sure this doesn't cause any regressions?
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.
Since we expect only one state from the backend
-isLoader (Loader)
-bankName (PlaidLink)
-Error (Text error)
I'm not sure that such cases are possible
Lines 51 to 80 in 990815f
optimisticData: [ | |
{ | |
onyxMethod: Onyx.METHOD.MERGE, | |
key: ONYXKEYS.PLAID_DATA, | |
value: { | |
isLoading: true, | |
errors: null, | |
bankName, | |
}, | |
}, | |
], | |
successData: [ | |
{ | |
onyxMethod: Onyx.METHOD.MERGE, | |
key: ONYXKEYS.PLAID_DATA, | |
value: { | |
isLoading: false, | |
errors: null, | |
}, | |
}, | |
], | |
failureData: [ | |
{ | |
onyxMethod: Onyx.METHOD.MERGE, | |
key: ONYXKEYS.PLAID_DATA, | |
value: { | |
isLoading: false, | |
}, | |
}, | |
], |
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.
hmm those are just optimistic loading states though, i could see a situation where an error happens and we want to try again so we set isLoading
again, right?
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.
@Beamanator @ZhenjaHorbach that's what I was pointing out, even if we have an error message we will only show the loader because the loader is inside PlaidLink component and we will always show the PlaidLink, and if we show the error then we can't retry because the PlaidLink component will not be rendered.
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 get the state for showing components from plaidData
If we have at the moment optimisticData we show loader
If we have at the moment successData we show plaidData (The loader that is located inside the web plaidLink is associated with that the component we use requires initialization )
If we have the moment failure we show error text
And if we will get error when plaidLink is open we will skip token and hide plaidLink but show error text
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.
oh wait ya i see that we clear the error any time we try again so most likely they won't ever be shown at the same time
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 this will work pretty well, i can't come up with a case where we'll want to show multiple of the 3 rendered options, so let's merge!
🚀 Deployed to staging by https://github.com/Beamanator in version: 1.4.16-3 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.16-5 🚀
|
Details
Android-BA-Tapping connect online with plaid shows 2 spin circles loading
Fixed Issues
$ #32298
PROPOSAL: #32298 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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)StyleUtils.getBackgroundAndBorderStyle(theme.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
Android: Native
android.mov
Android: mWeb Chrome
android.web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios.web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov