Skip to content
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

When adding a direct card feed, we link you out to the bank to authenticate while offline #55096

Open
1 of 8 tasks
m-natarajan opened this issue Jan 10, 2025 · 3 comments
Open
1 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@m-natarajan
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number:
Reproducible in staging?:
Reproducible in production?:
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @joekaufmanexpensify
Slack conversation (hyperlinked to channel name): ts_external_expensify_convert

Action Performed:

  1. Enable company cards in workspace settings
  2. Click Add cards and select any bank
  3. Select Direct and go offline
  4. Click Next

Expected Result:

Authenticate via bank mode not displayed when User is in offline

Actual Result:

Authenticate via bank mode displayed. Same result observed when you try to assign cards while offline and need to authenticate first.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
2025-01-10_12-01-43.mp4
2025-01-10_12-18-15.mp4

View all open jobs on GitHub

@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 10, 2025
Copy link

melvin-bot bot commented Jan 10, 2025

Triggered auto assignment to @twisterdotcom (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@Shahidullah-Muffakir
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

When adding a direct card feed, user can go to the next page, and the next btn is not disabled.

What is the root cause of that problem?

We did not add the FullPageOfflineBlockingView here, and button is not disabled while user is offline

return (
<ScreenWrapper
testID={SelectFeedType.displayName}
includeSafeAreaPaddingBottom={false}
shouldEnablePickerAvoiding={false}
shouldEnableMaxHeight
>
<HeaderWithBackButton
title={translate('workspace.companyCards.addCards')}
onBackButtonPress={handleBackButtonPress}
/>

What changes do you think we should make in order to solve the problem?

  1. Wrap the
    return (
    <ScreenWrapper
    testID={SelectFeedType.displayName}
    includeSafeAreaPaddingBottom={false}
    shouldEnablePickerAvoiding={false}
    shouldEnableMaxHeight
    >
    <HeaderWithBackButton
    title={translate('workspace.companyCards.addCards')}
    onBackButtonPress={handleBackButtonPress}
    />

    with FullPageOfflineBlockingView as:
  return (
        <ScreenWrapper
            testID={SelectFeedType.displayName}
            includeSafeAreaPaddingBottom={false}
            shouldEnablePickerAvoiding={false}
            shouldEnableMaxHeight
        >
            <HeaderWithBackButton
                title={translate('workspace.companyCards.addCards')}
                onBackButtonPress={handleBackButtonPress}
            />
            <FullPageOfflineBlockingView>

  1. First get the isOffline :
    const {isOffline} = useNetwork();

Then pass a new prop to the
as:
disabled = isOffline

  1. and then pass the prop to the btn here:
    <Button
    success={!shouldUseDefaultTheme}
    large

    as:
    disabled = disabled
  2. and for the Assign Card section, add one more condition as isOffline here:
    isDisabledAssignCardButton={!selectedFeedData || !!selectedFeedData?.errors}
  isDisabledAssignCardButton={!selectedFeedData || !!selectedFeedData?.errors || isOffline}

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

What alternative solutions did you explore? (Optional)

@allgandalf
Copy link
Contributor

please assign me here, Probably not open for proposals , maybe CallStack would work on this as part of project , right @mountiny ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
Status: No status
Development

No branches or pull requests

4 participants