Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import ValidateCodeActionModal from '@components/ValidateCodeActionModal';
import useLocalize from '@hooks/useLocalize';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import {getEarliestErrorField, getLatestError, getLatestErrorField} from '@libs/ErrorUtils';
import {getEarliestErrorField, getLatestError, getLatestErrorField, getMicroSecondOnyxErrorWithTranslationKey} from '@libs/ErrorUtils';
import getPlaidDesktopMessage from '@libs/getPlaidDesktopMessage';
import {REIMBURSEMENT_ACCOUNT_ROUTE_NAMES} from '@libs/ReimbursementAccountUtils';
import WorkspaceResetBankAccountModal from '@pages/workspace/WorkspaceResetBankAccountModal';
Expand Down Expand Up @@ -219,8 +219,12 @@ function VerifiedBankAccountFlowEntryPoint({
)}
{shouldShowContinueSetupButton === true ? (
<OfflineWithFeedback
errors={getLatestError(errors)}
errors={
reimbursementAccount?.maxAttemptsReached ? getMicroSecondOnyxErrorWithTranslationKey('connectBankAccountStep.maxAttemptsReached') : getLatestError(errors)
}
errorRowStyles={styles.mt2}
shouldShowErrorMessages
canDismissError={!reimbursementAccount?.maxAttemptsReached}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Expensify/design what do you think about this change? This is making the error persistent and not allowing you to dismiss it. I'd argue that you can dismiss the error after you've seen it, then that is on you because you saw it and dismissed it. The error will still be presented when they try to setup the bank account again on a different screen.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I don't feel too strongly. Normally we allow users to dismiss the error, although in this case, if you dismiss the error, the buttons would still be disabled which might feel weird right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think I would keep it there as not dismissable. What makes it so that you can log in again though?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for adding a bank account. So in this case, we're showing an error because they've already failed too many times to add a bank account, and their next step is to reach out to Concierge.

If they dismiss the error, they can go through the flow again but then they'll hit the same error page. I think in that case, making it non dismissable is fine since the outcome is the same, right?

onClose={resetReimbursementAccount}
>
<MenuItem
Expand Down