Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.34k stars 2.77k forks source link

[$250] Wallet empty state has disabled "Add bank account" button for new, unvalidated accounts #48041

Open m-natarajan opened 3 weeks ago

m-natarajan commented 3 weeks ago

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: 9.0.25-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 Expensify/Expensify Issue URL: Issue reported by: @shawnborton Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1724687808309139

Action Performed:

  1. Sign up a new public domain account
  2. Click on avatar > Wallet
  3. Click on enable wallet

    Expected Result:

    Step 2 and 3"Add bank account" should be enabled

Actual Result:

"Add bank account" is disabled and grayed out For the new unvalidated account, we'd mimic something like this where we just ask you to verify your account:

Workaround:

unknown

Platforms:

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

Screenshots/Videos

CleanShot 2024-08-26 at 11 57 03@2x CleanShot 2024-08-26 at 11 55 25@2x CleanShot 2024-08-26 at 11 57 40@2x Snip - (2) New Expensify - Google Chrome (3) Snip - (2) New Expensify - Google Chrome (2)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019c85c6a0fbfa60c9
  • Upwork Job ID: 1831260528939127027
  • Last Price Increase: 2024-09-04
  • Automatic offers:
    • jjcoffee | Reviewer | 103880851
Issue OwnerCurrent Issue Owner: @jjcoffee
melvin-bot[bot] commented 3 weeks ago

Triggered auto assignment to @miljakljajic (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.

daledah commented 3 weeks ago

Edited by proposal-police: This proposal was edited at 2024-08-27 17:11:58 UTC.

Proposal

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

Wallet empty state has disabled "Add bank account" button for new, unvalidated accounts

What is the root cause of that problem?

New Feature

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

  1. Create new translation key for 'This feature requires you to validate your account' and 'Validate your account'
  2. We should build new component VerifyAccountPage using ValidateCodeForm component like ContactMethodDetailsPage with header and message we define in step 1
  3. Add new route for this page like ROUTES.VERIFY_ACCOUTNT_PAGE
  4. We should remove this condition

https://github.com/Expensify/App/blob/d4d1c0cf1ff50ebe4b7cc7934f932ed723eeea06/src/pages/settings/Wallet/PaymentMethodList.tsx#L324

  1. When the user is not validated, we will navigate to the verify account page. Update onPress function here
  onPress={()=>{
      if(!isUserValidated){
          Navigation.navigate(ROUTES.VERIFY_ACCOUTNT_PAGE.getRoute(currentUserPersonalDetails.login ?? ''));
          return;
      }
      onPress();
  }}

What alternative solutions did you explore? (Optional)

NA

cretadn22 commented 3 weeks ago

Edited by proposal-police: This proposal was edited at 2024-08-27 17:13:03 UTC.

Proposal

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

Wallet empty state has disabled "Add bank account" button for new unvalidated accounts

What is the root cause of that problem?

New refactor

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

  1. Remove the isUserValidated condition from two places

https://github.com/Expensify/App/blob/d4d1c0cf1ff50ebe4b7cc7934f932ed723eeea06/src/pages/settings/Wallet/PaymentMethodList.tsx#L324

https://github.com/Expensify/App/blob/d4d1c0cf1ff50ebe4b7cc7934f932ed723eeea06/src/pages/EnablePayments/AddBankAccount/SetupMethod.tsx#L55

  1. If the user clicks the button and is not validated, they will be redirected to the SETTINGS_CONTACT_METHOD_DETAILS page. Additionally, the backTo parameter needs to be updated and adopt into the ContactMethodDetailsPage.

In SETTINGS_CONTACT_METHOD_DETAILS, we add a note to that explains why we need to validate for that particular feature like this: "This feature requires you to validate your account" as suggested https://github.com/Expensify/App/issues/48041#issuecomment-2313076530. We need a condition to determine when to display this note, so it won't be shown in every case. We can choose to display the note based on the backTo parameter

Output:

https://github.com/user-attachments/assets/20b6281e-1dd1-431a-84f2-d09612a41a4a

What alternative solutions did you explore? (Optional)

Optionally, we can also show an announcement to the user with two choices: either navigating to SETTINGS_CONTACT_METHOD_DETAILS, and sign in again

4
Krishna2323 commented 3 weeks ago

Proposal

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

Wallet empty state has disabled "Add bank account" button for new, unvalidated accounts

What is the root cause of that problem?

Improvement

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

What alternative solutions did you explore? (Optional)

https://github.com/user-attachments/assets/96b61cbf-6e08-4f2c-bfa0-ed85b7650737

Krishna2323 commented 3 weeks ago

Proposal Updated

shawnborton commented 3 weeks ago

@Krishna2323 rather than throwing an error modal, I was thinking we could show the validate UI in the RHP.

shawnborton commented 3 weeks ago

Actually looks like @cretadn22 already proposed that.

Krishna2323 commented 3 weeks ago

@shawnborton, I thought it would be odd to directly push users to the validate page without providing any information. That's why I suggested showing a modal.

shawnborton commented 3 weeks ago

I think it would be simpler if we just added some text in that RHP view that explains why we need to validate for that particular feature.

cretadn22 commented 3 weeks ago

I think it would be simpler if we just added some text in that RHP view that explains why we need to validate for that particular feature.

We can present the user with an announcement offering two options: either go to SETTINGS_CONTACT_METHOD_DETAILS and sign in again, or provide additional explanation. This approach could also be used in other places

4
shawnborton commented 3 weeks ago

I think we should do something simple like this, where we basically have a little line that says "This feature requires you to validate your account" and then we show the validate form, something like this: CleanShot 2024-08-27 at 12 55 19@2x

cc @Expensify/design in case you have any additional thoughts.

daledah commented 3 weeks ago

Updated proposal

base on this comment

daledah commented 3 weeks ago

Actually looks like @cretadn22 already proposed that.

@shawnborton my proposal is first and @cretadn22's proposal is same as mine

cretadn22 commented 3 weeks ago

Updated proposal

dannymcclain commented 3 weeks ago

I like what you're proposing Shawn. Keeps you in the flow and doesn't derail you, but still gets you to validate.

trjExpensify commented 3 weeks ago

Samesies! ^^

dubielzyk-expensify commented 3 weeks ago

Dig it. Would it be a bit clearer if we have the header say "Validate your account" instead of the email address?

daledah commented 3 weeks ago

updated proposal

shawnborton commented 3 weeks ago

@dubielzyk-expensify yeah totally agree with that, I just grabbed a quick example from the contact methods flow since that is the only spot (I think?) that has this kind of in-product account validation thus far.

melvin-bot[bot] commented 2 weeks ago

@miljakljajic Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] commented 2 weeks ago

@miljakljajic Still overdue 6 days?! Let's take care of this!

melvin-bot[bot] commented 2 weeks ago

Job added to Upwork: https://www.upwork.com/jobs/~019c85c6a0fbfa60c9

melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External)

miljakljajic commented 2 weeks ago

@shawnborton whose proposal are we going with here? I'll get them assigned

shawnborton commented 2 weeks ago

I think that would be @jjcoffee's decision right?

jjcoffee commented 2 weeks ago

Hmm I'm not sure if I agree with navigating to the contact details page here. We wouldn't normally reuse a page for a different purpose, but rather the components in the page (ValidateCodeForm in this case). I think navigating to a completely different route also will cause issues; if you refresh after tapping Add bank account, for example, you'd lose your place (the central pane would switch in the background to the profile screen).

I think I'd be more in favour of adding a ValidateCodeForm either in a new page or maybe as the first step of the add bank account flow (only if you aren't validated of course!).

daledah commented 2 weeks ago

@jjcoffee I don't think it's a big issue. In our project, we also have instances where we use shared modals. For example, on the I'm a teacher page, we reuse the Contact methods from the profile.

https://github.com/Expensify/App/blob/7aae84275eb02635a573acc6433c688651131079/src/pages/TeachersUnite/ImTeacherUpdateEmailPage.tsx#L41

jjcoffee commented 1 week ago

@daledah In that case it makes sense since the purpose is the same (adding an email address) and so we're directing the user to the page appropriate to that purpose.

Once we start talking about customising the contact details page to add text and a header that's specific to this flow, I think it doesn't really make sense to reuse the page anymore.

daledah commented 1 week ago

@jjcoffee agree with you, updated proposal

jjcoffee commented 1 week ago

Thanks @daledah, happy to go with your updated proposal!

:ribbon::eyes::ribbon: C+ reviewed

melvin-bot[bot] commented 1 week ago

Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] commented 1 week ago

Current assignee @miljakljajic is eligible for the NewFeature assigner, not assigning anyone new.

melvin-bot[bot] commented 1 week ago

:warning: It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time :warning:

melvin-bot[bot] commented 1 week ago

Triggered auto assignment to Design team member for new feature review - @dannymcclain (NewFeature)

arosiclair commented 1 week ago

Swapped this to New Feature since this isn't really a bug. @shawnborton you know what project we should tie this to?

melvin-bot[bot] commented 1 week ago

📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] commented 1 week ago

📣 @daledah You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing 📖

daledah commented 1 week ago

@jjcoffee Currently I don't have access to Expensify Slack, can you help to ask for the new translations? The phrases are: This feature requires you to validate your account and Validate your account

jjcoffee commented 1 week ago

@daledah Sure, asked on Slack. Are you waiting to be added to Slack? Maybe @miljakljajic can help get you added if so.

jjcoffee commented 1 week ago

@daledah Here you go:

EN: This feature requires you to validate your account. ES: Esta función requiere que valides tu cuenta.

EN: Validate your account. ES: Valida tu cuenta.

c3024 commented 1 week ago

Hi, we have a ValidateContactActionPage added here #48320. This is to ask for validating the primary contact every time when trying to add a secondary contact. I think the page being added in this issue is also similar, though it is meant only if the primary contact is not validated. There are few flows which need primary contact verification every time here #48541.

Is it better to use this ValidateContactActionPage and make it a common page for all these flows that require validation of the primary contact before allowing an action?

daledah commented 1 week ago

@jjcoffee what do you think about this suggestion. If we go with this suggestion I think we will need to add some new props to ValidateContactActionPage to display new header and text

jjcoffee commented 6 days ago

@c3024 Oh interesting, thanks for bringing that to our attention!

I wonder if we could be better off using ValidateCodeActionModal (added in https://github.com/Expensify/App/pull/48628) for our purposes here, as we are not adding a step in the process of adding a bank account but a one-off block to verify your account (so a modal makes more sense in my mind). I don't know if that makes a big difference to the implementation @daledah?

daledah commented 6 days ago

I have understood the discussions here and completely agree with using ValidateCodeActionModal, I will open PR soon.

miljakljajic commented 6 days ago

Apologies @daledah we've run out of single channel guest spaces in slack - are you still waiting to be added? I'll make sure you're at the top of the list

daledah commented 6 days ago

are you still waiting to be added?

@miljakljajic Hey yes, I've sent multiple emails to contributors@expensify.com on the matter but haven't received responses recently, would be great if you could help.

Thanks

daledah commented 1 day ago

Still working on this PR, i have some minor bugs. Will open tomorrow

daledah commented 23 hours ago

https://github.com/user-attachments/assets/f2ab4514-b013-40a1-a55d-c150dcbeef20

I noticed there is still one button disabled on the enable payments page, and I think it will be handled in this issue as well.

jjcoffee commented 23 hours ago

@daledah Yes good point, we do want to handle it in both places.