-
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
[$1000] Not showing loader on add bank account page #14425
Comments
Bug0 Triage ChecklistNote: see this SO for more information.
|
Job added to Upwork: https://www.upwork.com/jobs/~017a4fe2b93e051102 |
Current assignee @arielgreen is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak ( |
Triggered auto assignment to @deetergp ( |
Proposal --- a/src/components/AddPlaidBankAccount.js
+++ b/src/components/AddPlaidBankAccount.js
@@ -115,7 +115,7 @@ class AddPlaidBankAccount extends React.Component {
if (!plaidBankAccounts.length) {
return (
<FullPageOfflineBlockingView>
- {lodashGet(this.props.plaidData, 'isLoading') && (
+ {(lodashGet(this.props.plaidData, 'isLoading') || (!token && !plaidDataErrorMessage)) && (
<View style={[styles.flex1, styles.alignItemsCenter, styles.justifyContentCenter]}>
<ActivityIndicator color={themeColors.spinner} size="large" />
</View> We can also use lodash function on the above. |
We removed I think this should be put on HOLD until #13236 is deployed to staging/production. Not reproducible in
We can retest after #13236 deployed and close this issue if not reproducible. cc: @ctkochan22 @nkuoch |
Yup @aimane-chnaif, saw now that #13236 got merged only 3 hours ago. With latest main the issue is not reproducible. |
This should be fixed with the noted PRs. Can we close? |
Proposal Issue: On the read api call Soltuion: We need to update the plaidData diff --git a/src/libs/actions/Plaid.js b/src/libs/actions/Plaid.js
index 393b5bbc9..ac463b6d0 100644
--- a/src/libs/actions/Plaid.js
+++ b/src/libs/actions/Plaid.js
@@ -12,7 +12,29 @@ function openPlaidBankLogin(allowDebit, bankAccountID) {
const params = getPlaidLinkTokenParameters();
params.allowDebit = allowDebit;
params.bankAccountID = bankAccountID;
- API.read('OpenPlaidBankLogin', params);
+ API.read('OpenPlaidBankLogin', params, {
+ optimisticData: [{
+ onyxMethod: CONST.ONYX.METHOD.MERGE,
+ key: ONYXKEYS.PLAID_DATA,
+ value: {
+ isLoading: true,
+ },
+ }],
+ successData: [{
+ onyxMethod: CONST.ONYX.METHOD.MERGE,
+ key: ONYXKEYS.PLAID_DATA,
+ value: {
+ isLoading: false,
+ },
+ }],
+ failureData: [{
+ onyxMethod: CONST.ONYX.METHOD.MERGE,
+ key: ONYXKEYS.PLAID_DATA,
+ value: {
+ isLoading: false,
+ },
+ }],
+ });
} Also like other pages(IOUDetails, ...), we can use diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js
index 386eea4c3..3a6c9b557 100644
--- a/src/components/AddPlaidBankAccount.js
+++ b/src/components/AddPlaidBankAccount.js
@@ -120,8 +122,8 @@ class AddPlaidBankAccount extends React.Component {
return (
<FullPageOfflineBlockingView>
{this.props.plaidData.isLoading && (
- <View style={[styles.flex1, styles.alignItemsCenter, styles.justifyContentCenter]}>
- <ActivityIndicator color={themeColors.spinner} size="large" />
+ <View style={[styles.flex1]}>
+ <FullScreenLoadingIndicator /> Other solution will be w.r.t to onyx key |
@jatinsonijs Thanks, I pulled and now it is not reproducible. @aimane-chnaif @ctkochan22 Isn't it good practice to update the Lines 16 to 20 in 28aab08
diff --git a/src/libs/actions/Plaid.js b/src/libs/actions/Plaid.js
index 0785a1fd9..76bbd2e0f 100644
--- a/src/libs/actions/Plaid.js
+++ b/src/libs/actions/Plaid.js
@@ -13,23 +13,42 @@ function openPlaidBankLogin(allowDebit, bankAccountID) {
const params = getPlaidLinkTokenParameters();
params.allowDebit = allowDebit;
params.bankAccountID = bankAccountID;
- const optimisticData = [{
- onyxMethod: CONST.ONYX.METHOD.SET,
- key: ONYXKEYS.PLAID_DATA,
- value: {...PlaidDataProps.plaidDataDefaultProps, isLoading: true},
- }, {
- onyxMethod: CONST.ONYX.METHOD.SET,
- key: ONYXKEYS.PLAID_LINK_TOKEN,
- value: '',
- }, {
- onyxMethod: CONST.ONYX.METHOD.MERGE,
- key: ONYXKEYS.REIMBURSEMENT_ACCOUNT_DRAFT,
- value: {
- plaidAccountID: '',
- },
- }];
- API.read('OpenPlaidBankLogin', params, {optimisticData});
+ API.read('OpenPlaidBankLogin', params, {
+ optimisticData: [
+ {
+ onyxMethod: CONST.ONYX.METHOD.SET,
+ key: ONYXKEYS.PLAID_DATA,
+ value: {...PlaidDataProps.plaidDataDefaultProps, isLoading: true},
+ },
+ ],
+ successData: [
+ {
+ onyxMethod: CONST.ONYX.METHOD.MERGE,
+ key: ONYXKEYS.PLAID_LINK_TOKEN,
+ value: '',
+ },
+ {
+ onyxMethod: CONST.ONYX.METHOD.MERGE,
+ key: ONYXKEYS.PLAID_DATA,
+ value: {...PlaidDataProps.plaidDataDefaultProps},
+ },
+ ],
+ failureData: [
+ {
+ onyxMethod: CONST.ONYX.METHOD.MERGE,
+ key: ONYXKEYS.REIMBURSEMENT_ACCOUNT_DRAFT,
+ value: {
+ plaidAccountID: '',
+ },
+ },
+ {
+ onyxMethod: CONST.ONYX.METHOD.MERGE,
+ key: ONYXKEYS.PLAID_DATA,
+ value: {...PlaidDataProps.plaidDataDefaultProps, errors: {['Error Message']}},
+ },
+ ],
+ });
} Issue with the hardcoded change for demo which restricts plaid redirection as added Screen.Recording.2023-01-21.at.2.36.08.PM.mp4 |
Not overdue, seems like the issue has been fixed by #13236, since it isn't reproducible anymore. |
Closing since this is now resolved. |
@eVoloshchak @ctkochan22 Can you plz check my comment as it says loader keeps on showing in case of the error. |
@Pujan92, I've seen it, I think this is something worth reporting on Slack. It's different from our issue, since in your case spinner will be showing when it shouldn't |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Loader should be display until preparing Plaid link.
Actual Result:
Loader not showing on add bank account
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.56-0
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
Notes/Photos/Videos:
no-loader.1.mov
Recording.1334.mp4
Expensify/Expensify Issue URL:
Issue reported by: @jatinsonijs
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1674055957380549
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: