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

[$500] [MEDIUM] Bank account - Confirm button is not disabled when offline #36484

Closed
2 of 6 tasks
lanitochka17 opened this issue Feb 14, 2024 · 12 comments
Closed
2 of 6 tasks
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Feb 14, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.41-2
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4312329
Email or phone of affected tester (no customers): [email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

Pre-requisite: the user must be logged in and have created a workspace

  1. Go to Workspace > Bank account
  2. Initiate the add BA flow until you reach the Personal info double check page
  3. Disable the internet connection

Expected Result:

The Confirm button should be grayed out and disabled

Actual Result:

Confirm button is not disabled

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6379021_1707892919841!Screenshot_1

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0116b0e762d51b88bd
  • Upwork Job ID: 1759563597209448448
  • Last Price Increase: 2024-02-19
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Feb 14, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Feb 14, 2024

Triggered auto assignment to @amyevans (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@mountiny mountiny assigned akinwale and mountiny and unassigned amyevans Feb 14, 2024
@mountiny mountiny added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Feb 14, 2024
@mountiny
Copy link
Contributor

@MrMuzyk I believe you can address it in your PR

@Swor71
Copy link
Contributor

Swor71 commented Feb 14, 2024

Hey I'm Marcin from Callstack - expert contributor group - I'd like to work on this issue

@mountiny
Copy link
Contributor

@Swor71 will address this issue this week

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Feb 19, 2024
@melvin-bot melvin-bot bot removed the Overdue label Feb 19, 2024
@melvin-bot melvin-bot bot changed the title Bank account - Confirm button is not disabled when offline [$500] Bank account - Confirm button is not disabled when offline Feb 19, 2024
Copy link

melvin-bot bot commented Feb 19, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0116b0e762d51b88bd

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 19, 2024
Copy link

melvin-bot bot commented Feb 19, 2024

Current assignee @akinwale is eligible for the External assigner, not assigning anyone new.

@mountiny mountiny removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 19, 2024
@allgandalf
Copy link
Contributor

Proposal

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

Confirm button is not disabled when offline

What is the root cause of that problem?

We show the button even when user is offline

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

Add a check in the confirm button : !isOffline

@elemanhillary
Copy link

Proposal

Please re-state the problem that we are trying to solve in this issue.
Confirm button is not disabled when offline

What is the root cause of that problem?
We show the button even when user is offline

What changes do you think we should make in order to solve the problem?
check network if is offline or not reachable to disable click events on the button

  • useNetwork hook could also be made simpler and refactored for network reachability status, here is a simple example
    NB: not including the callback function (can be added too)
import { useState, useEffect } from 'react';
import NetInfo, { NetInfoStateType } from '@react-native-community/netinfo';

interface NetworkManagerState {
  networkType: NetInfoStateType | null;
  isConnected: boolean | null;
  isInternetReachable: boolean | null;
}

const useNetworkManager = (): NetworkManagerState => {
  const [networkState, setNetworkState] = useState<NetworkManagerState>({
    networkType: null,
    isConnected: null,
    isInternetReachable: null,
  });

  useEffect(() => {
    const unsubscribe = NetInfo.addEventListener((state) => {
      setNetworkState({
        networkType: state.type,
        isConnected: state.isConnected,
        isInternetReachable: state.isInternetReachable ?? null,
      });
    });

    return () => {
      unsubscribe();
    };
  }, []);
  return networkState;
};

export default useNetworkManager;

Additional
Adjust button contraints abit as it looked cropped at the bottom

Copy link

melvin-bot bot commented Feb 19, 2024

📣 @elemanhillary! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@mountiny
Copy link
Contributor

And engineer is already assigned to this issue

@greg-schroeder greg-schroeder changed the title [$500] Bank account - Confirm button is not disabled when offline [$500] [MEDIUM] Bank account - Confirm button is not disabled when offline Feb 20, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 21, 2024
@Swor71
Copy link
Contributor

Swor71 commented Feb 21, 2024

hey, sorry for a late response to this issue, I had some technical problems with my setup.

fixed this issue along with the same cases for other substep confirmation pages here: #37025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
No open projects
Development

No branches or pull requests

7 participants