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

[Refactor] Remove the Venmo payment option #9653

Merged
merged 10 commits into from
Jul 12, 2022
Merged

[Refactor] Remove the Venmo payment option #9653

merged 10 commits into from
Jul 12, 2022

Conversation

mountiny
Copy link
Contributor

@mountiny mountiny commented Jun 30, 2022

Details

As part of the Refactoring, we have decided to remove the Venmo payment option from the NewDot.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/216466

Tests

  • Verify that no errors appear in the JS console

To verify secondary logins locally, you should use the /script/clitools.sh validator:secondarylogin script. It might be best to add the secondary logins from OldDot

Test Set 1 - Venmo payment option removed

  1. Have 2 acocunts, Account A and Account B both with added and verified phone secondary login and paypal account added
  2. Attempt to Send money from Account A to account B
  3. Make sure the payment options do not include Venmo

image

Test Set 2 - no Venmo hints on the settings page

  1. Have an account which does not have a phone number set up
  2. Go to Settings > Profile
  3. Make sure that there is no Note written under the Add phone button number

Test Set 3 - no Venmo hints on the settings page when phone number is already set up

  1. Have an account which has phone number set up and verified
  2. Go to Settings > Profile
  3. Make sure that there is no Note written under the phone number:

image

Test Set 4 - confirm payment flows work as expected

Confirm all the payment flows (sending/requesting money) Elsewhere, Paypal and Wallet.

PR Review Checklist

Contributor (PR Author) Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • I verified there are no console errors (if there’s a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained “why” the code was doing something instead of only explaining “what” the code was doing.
    • I verified any copy / text shown in the product was added in all src/languages/* files
    • I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named “index.js”. All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • Any functional components have the displayName property
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose and it is
  • If a new CSS style is added I verified that:
    • A similar style doesn’t already exist
    • The style can’t be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.

PR Reviewer Checklist

  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • I verified there are no console errors (if there’s a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained “why” the code was doing something instead of only explaining “what” the code was doing.
    • I verified any copy / text shown in the product was added in all src/languages/* files
    • I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named “index.js”. All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • Any functional components have the displayName property
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn’t already exist
    • The style can’t be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.

QA Steps

  • Verify that no errors appear in the JS console

Screenshots

The settings page - Phone is set up and no note is shown:
image

Web

image

Mobile Web

image

Desktop

image

iOS

image

image

Android

@mountiny mountiny requested a review from a team as a code owner June 30, 2022 22:10
@mountiny mountiny self-assigned this Jun 30, 2022
@mountiny mountiny removed the request for review from a team June 30, 2022 22:10
@melvin-bot melvin-bot bot requested a review from Luke9389 June 30, 2022 22:10
@mountiny
Copy link
Contributor Author

mountiny commented Jul 1, 2022

Asked in Slack if we would like to remove the Notes in Settings page when user does not have phone number setup since they mention Venmo. We will remove them and new notes can be added in future as a positive motivation to add phone number.

I have removed all the code related to Venmo as far as I know. I havent been able to test yet though and get screenshots, gonan have to do that later so.

@mountiny
Copy link
Contributor Author

mountiny commented Jul 4, 2022

Just having some problems with set up when trying to test locally so I can get screenshots. But hopefully should be resolved tomorrow

@mountiny mountiny changed the title [WIP] [Refactor] Remove the Venmo payment option [Refactor] Remove the Venmo payment option Jul 5, 2022
@mountiny
Copy link
Contributor Author

mountiny commented Jul 5, 2022

@Luke9389 Tested and it should be all fine. I have just been having some problems with the android emulator, I will add screens tomorrow but there is no reason it should not work there.

@mountiny mountiny requested a review from Julesssss July 5, 2022 23:37
@mountiny
Copy link
Contributor Author

mountiny commented Jul 5, 2022

Adding you Jules for a review as we work on this mini design doc together.

@mountiny
Copy link
Contributor Author

mountiny commented Jul 6, 2022

I am having problems running the Android locally. I dont think that should be a blocker though

@Justicea83
Copy link
Contributor

I learnt the android build is broken, #9649 (comment)

@mountiny
Copy link
Contributor Author

mountiny commented Jul 6, 2022

Might be related to it, but I don't think this is it for me, I have intel and I haven't run the Android emulator in a while and it is giving me some weird errors, but havent prioritized fixing it.

@mountiny
Copy link
Contributor Author

mountiny commented Jul 7, 2022

@Luke9389 @Julesssss @Justicea83 Updated, thanks for having another look!

Copy link
Contributor

@Luke9389 Luke9389 left a comment

Choose a reason for hiding this comment

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

Quick Q

src/components/IOUConfirmationList.js Show resolved Hide resolved
@mountiny
Copy link
Contributor Author

bumping @Julesssss @Justicea83

Copy link
Contributor

@Julesssss Julesssss left a comment

Choose a reason for hiding this comment

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

I only reviewed the code and tested web, as I was just CC'd and not a reviewer. But it looks good to me 👍

It took me a while to find the secondary login validator. Maybe you could add it to the instructions: /script/clitools.sh validator:secondarylogin

Screenshot 2022-07-12 at 12 55 03

@mountiny
Copy link
Contributor Author

Good point, thanks @Julesssss! Will update. I am going to self-merge now as we got two reviews :shipit:

@mountiny mountiny merged commit 046a8b6 into main Jul 12, 2022
@mountiny mountiny deleted the vit-killVenmoOption branch July 12, 2022 12:02
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @mountiny in version: 1.1.83-1 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@isagoico
Copy link

@mountiny Hey! We have some regression TCs that involve Venmo payments. These will be blocked with this change. Just wanted to double confirm with you that those can be removed from the regression run before taking action.

@mountiny
Copy link
Contributor Author

Correct, any tests related to Venmo flow in NewDot can be removed. Thank you very much! @isagoico

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @chiragsalian in version: 1.1.84-13 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants