You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Version Number:**1.4.6-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Launch app
Tap profile icon
Tap Workspaces
Tap on a Workspace
Tap Bank account
Tap "connect online with plaid"
Expected Result:
When user taps "connect online with plaid", single spinner loading in the page must be shown
Actual Result:
When user taps "connect online with plaid", double spinner can be seen in the page loading for few seconds
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Please re-state the problem that we are trying to solve in this issue.
Android-BA-Tapping connect online with plaid shows 2 spin circles loading
What is the root cause of that problem?
The problem is related to the display of components
Since they can be displayed simultaneously
There are cases when the condition for the ActivityIndicator and the condition for PlaidLink(At the beginning PlaidLink loader appears) are fulfilled simultaneously
What changes do you think we should make in order to solve the problem?
As for me instead of using && for each condition, we can refactor this component to use if / else since we expect to see only one of three components (Adding opposite conditions so as not to display components look like smell code )
So that when we have PlaidLink available, other conditions will not be met (Including display of the ActivityIndicator)
My idea looks something like this
if (Boolean(token) && !bankName) {
return <PlaidLink />;
}
if (plaidDataErrorMessage) {
return <Text/>;
}
if (lodashGet(plaidData, 'isLoading')) {
return <ActivityIndicator />;
}
What alternative solutions did you explore? (Optional)
We can always disable the loader by changing the values of ONYXKEYS.PLAID_DATA when PlaidLink is available. For this we can use onLoad prop for PlaidLink (But for this we need to add a new prop onLoad and pass it from AddPlaidBankAccount )
Please re-state the problem that we are trying to solve in this issue.
Android-BA-Tapping connect online with plaid shows 2 spin circles loading
What is the root cause of that problem?
The first loader is ours and the second loader is Plaid Link's loader . We can not hide the Plaid link's loader and so that we should hide or custom loader when Plaid link's window displays
What changes do you think we should make in order to solve the problem?
We can change this line to following {lodashGet(plaidData, 'isLoading') && !(Boolean(token) && !bankName) && ( to hide our custom loader when the Plaid link window becomes visible
What alternative solutions did you explore? (Optional)
We can update ONYXKEYS.PLAID_DATA in useEffect function of PlaidLink component by setting isLoading key to false
Please re-state the problem that we are trying to solve in this issue.
Android-BA-Tapping connect online with plaid shows 2 spin circles loading
What is the root cause of that problem?
The first loading is our custom loader and the second is coming from PlaidLink which can't be hidden.
What changes do you think we should make in order to solve the problem?
We need to initialize a new state called isPlaidLinkLoaded. We will show our custom loader only when lodashGet(plaidData, 'isLoading') is true and isPlaidLinkLoaded is false.
To determine the current state of PlaidLink, we can use the event emitted from the onEvent function. When event === 'OPEN' || event === 'TRANSITION_VIEW', we will set isPlaidLinkLoaded to true. We also need to perform a cleanup function.
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@akinwale] The PR that introduced the bug has been identified. Link to the PR:
[@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
Not a regression. This is a specific case that was not handled in the code.
[@akinwale] Determine if we should create a regression test for this bug.
[@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression test steps
Launch the Expensify app on Android
Tap on the profile picture and navigate to Workspaces
Select any workspace without a bank account, or create a new workspace if none exist
Select Bank account
Tap "Connect online with Plaid"
Verify that only one loading indicator is displayed during the loading process
Activity
[-]Android-BA-Tapping connect online with plaid shows 2 spin circles loading[/-][+][$500] Android-BA-Tapping connect online with plaid shows 2 spin circles loading[/+]melvin-bot commentedon Nov 30, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0196db5598b3527ce7
melvin-bot commentedon Nov 30, 2023
Triggered auto assignment to @twisterdotcom (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Nov 30, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Nov 30, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (
External)ZhenjaHorbach commentedon Nov 30, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Android-BA-Tapping connect online with plaid shows 2 spin circles loading
What is the root cause of that problem?
The problem is related to the display of components
Since they can be displayed simultaneously
There are cases when the condition for the ActivityIndicator and the condition for PlaidLink(At the beginning PlaidLink loader appears) are fulfilled simultaneously
App/src/components/AddPlaidBankAccount.js
Lines 188 to 227 in ee7d5dc
And that's why we see 2 loaders
What changes do you think we should make in order to solve the problem?
As for me instead of using
&&for each condition, we can refactor this component to useif/elsesince we expect to see only one of three components (Adding opposite conditions so as not to display components look like smell code )So that when we have
PlaidLinkavailable, other conditions will not be met (Including display of the ActivityIndicator)My idea looks something like this
What alternative solutions did you explore? (Optional)
We can always disable the loader by changing the values of
ONYXKEYS.PLAID_DATAwhen PlaidLink is available. For this we can useonLoadprop forPlaidLink(But for this we need to add a new proponLoadand pass it fromAddPlaidBankAccount)shahinyan11 commentedon Nov 30, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Android-BA-Tapping connect online with plaid shows 2 spin circles loading
What is the root cause of that problem?
The first loader is ours and the second loader is Plaid Link's loader . We can not hide the Plaid link's loader and so that we should hide or custom loader when Plaid link's window displays
What changes do you think we should make in order to solve the problem?
We can change this line to following
{lodashGet(plaidData, 'isLoading') && !(Boolean(token) && !bankName) && (to hide our custom loader when the Plaid link window becomes visibleWhat alternative solutions did you explore? (Optional)
We can update
ONYXKEYS.PLAID_DATAinuseEffectfunction of PlaidLink component by settingisLoadingkey to falseKrishna2323 commentedon Nov 30, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Android-BA-Tapping connect online with plaid shows 2 spin circles loading
What is the root cause of that problem?
The first loading is our custom loader and the second is coming from
PlaidLinkwhich can't be hidden.What changes do you think we should make in order to solve the problem?
We need to initialize a new state called
isPlaidLinkLoaded. We will show our custom loader only whenlodashGet(plaidData, 'isLoading')is true andisPlaidLinkLoadedis false.To determine the current state of
PlaidLink, we can use the event emitted from theonEventfunction. Whenevent === 'OPEN' || event === 'TRANSITION_VIEW', we will setisPlaidLinkLoadedto true. We also need to perform a cleanup function.Result
plaid_loader_demo.mp4
36 remaining items
melvin-bot commentedon Jan 3, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
twisterdotcom commentedon Jan 4, 2024
@Beamanator and @akinwale - is this correct? If so, I can pay out once #33890 is deployed at $250 instead.
twisterdotcom commentedon Jan 4, 2024
Hmm actually, @marcaaron removed the deployblocker. I'm going to pay this out as normal.
Payment Summary:
@akinwale paid $500 here (Reviewer)
@ZhenjaHorbach paid $500 here (Contributor)
twisterdotcom commentedon Jan 4, 2024
Just waiting on @akinwale to complete the checklist.
[-][HOLD for payment 2024-01-02] [$500] Android-BA-Tapping connect online with plaid shows 2 spin circles loading[/-][+][Awaiting checklist completion] [$500] Android-BA-Tapping connect online with plaid shows 2 spin circles loading[/+]twisterdotcom commentedon Jan 8, 2024
Bump @akinwale
akinwale commentedon Jan 8, 2024
Not a regression. This is a specific case that was not handled in the code.
Regression test steps
Do we agree 👍 or 👎?