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

Remove in-app password requirement for passwordless users #15338

Merged
merged 5 commits into from
Feb 27, 2023

Conversation

NikkiWines
Copy link
Contributor

@NikkiWines NikkiWines commented Feb 22, 2023

Details

Conditionally removes the password requirement for for in app actions when the user is on the passwordless beta.

Fixed Issues

$ (https://github.com/Expensify/Expensify/issues/261738
PROPOSAL: N/A internal

Tests

Debit Card

  1. Log into New Expensify with an account that is on the passwordless beta
  2. Navigate to Settings > Payments > Add Payment Method > Debit Card
  3. Confirm that you do not see a field for the Expensify Password in the debit card form
  4. Fill out the form with any details but use the card number 4242424242424242
  5. Confirm you can successfully add the card

Default Payment

  1. Log into New Expensify with an account that is on the expensifyWallet and passwordless betas
  2. Navigate to Settings > Payments > Add Payment Method
  3. Add either 2 personal bank accounts, a personal bank account and a debit card, or two debit cards
  4. Click on the bank account or debit card that is not the default payment method
  5. Select Make default payment method in the resulting pop up
  6. Confirm you're not prompted to enter your password
  7. Confirm your default payment method is updated

Secondary Login

  1. Log into New Expensify with an account that is on passwordless beta and does not have a secondary login
  2. Navigate to Settings > Profile > Contact Method and select whichever option does not have a login already (e.g. Phone number)
  3. Confirm the resulting view has the copy Enter your preferred phone number to send a validation link (or Enter your preferred email to send a validation link and that there is no password prompt
  4. Enter the login you want to add as a secondary login and confirm it's added in an unvalidated state successfully.
  • Verify that no errors appear in the JS console

Offline tests

No change to current behavior

QA Steps

Debit Card

  1. Log into New Expensify with an account that is on the passwordless beta
  2. Navigate to Settings > Payments > Add Payment Method > Debit Card
  3. Confirm that you do not see a field for the Expensify Password in the debit card form
  4. Fill out the form with any details but use the card number 4242424242424242
  5. Confirm you can successfully add the card

Default Payment

  1. Log into New Expensify with an account that is on the expensifyWallet and passwordless betas
  2. Navigate to Settings > Payments > Add Payment Method
  3. Add either 2 personal bank accounts, a personal bank account and a debit card, or two debit cards
  4. Click on the bank account or debit card that is not the default payment method
  5. Select Make default payment method in the resulting pop up
  6. Confirm you're not prompted to enter your password
  7. Confirm your default payment method is updated

Secondary Login

  1. Log into New Expensify with an account that is on passwordless beta and does not have a secondary login
  2. Navigate to Settings > Profile > Contact Method and select whichever option does not have a login already (e.g. Phone number)
  3. Confirm the resulting view has the copy Enter your preferred phone number to send a validation link (or Enter your preferred email to send a validation link and that there is no password prompt
  4. Enter the login you want to add as a secondary login and confirm it's added in an unvalidated state successfully.
  • Verify that no errors appear in the JS console

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 the expected offline behavior in the Offline steps 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 tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • 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 is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review 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
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • 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 */
    • 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 any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • 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.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Debit Card

web-debit-card.mov

Default Payment

web-default-payment.mov

Secondary Login

web-secondary-login.mov
Mobile Web - Chrome

Debit Card

chrome-debit-card.mov

Default Payment Method

chrome-default-payment.mov

Secondary Login

chrome-secondary-login.mov
Mobile Web - Safari

Debit Card

safari-debit-card.mp4

Default Payment Method

safari-default-payment.mp4

Secondary Login

safari-secondary-login.mp4
Desktop

Debit Card

desktop-debit-card.mov

Default Payment Method

desktop-default-payment-option.mov

Secondary Login

desktop-secondary-login.mov
iOS

Debit Card

ios-debit-card.mp4

Default Payment Method

ios-default-payment.mp4

Secondary Login

ios-secondary-login.mp4
Android

Debit Card

android-debit-card.mov

Default Payment Method

android-default-payment.mov

Secondary Login

android-secondary-login.mov

@NikkiWines NikkiWines self-assigned this Feb 22, 2023
@NikkiWines NikkiWines marked this pull request as ready for review February 23, 2023 01:54
@NikkiWines NikkiWines requested a review from a team as a code owner February 23, 2023 01:54
@melvin-bot melvin-bot bot requested review from robertjchen and removed request for a team February 23, 2023 01:54
@MelvinBot
Copy link

@robertjchen Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@NikkiWines
Copy link
Contributor Author

NikkiWines commented Feb 23, 2023

Note: My ios sim seems to show a weird UI element on the bottom of the screen for iOS and Safari testing when testing the secondary login. Just checked and on an up-to-date main, I'm seeing the same element so it doesn't appear to be tied to my changes

image

@robertjchen
Copy link
Contributor

robertjchen commented Feb 23, 2023

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • 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 included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • 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 is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review 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 other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • 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 */
    • 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 any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • 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.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Payment Flow
Screenshot 2023-02-27 at 7 19 09 PM

Mobile Web - Chrome

Having a helluva time getting my local dev working properly. In the interest of time (bigger fish to fry) going to go ahead and skip this, but am confident based on the tests performed on other platforms.

Mobile Web - Safari

Having a helluva time getting my local dev working properly. In the interest of time (bigger fish to fry) going to go ahead and skip this, but am confident based on the tests performed on other platforms.

Desktop

Payment flow
Screenshot 2023-02-27 at 8 12 13 PM

iOS

Secondary Login Validation Flow
Simulator Screen Shot - iPhone 14 - 2023-02-27 at 20 59 54

Android

Payment Flow
Screenshot_20230227_210333

Copy link
Contributor

@robertjchen robertjchen left a comment

Choose a reason for hiding this comment

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

LGTM!

@robertjchen robertjchen merged commit 9456e8c into main Feb 27, 2023
@robertjchen robertjchen deleted the nikki-dont-require-password branch February 27, 2023 13:09
@github-actions
Copy link
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

Name Duration
Open Search Page TTI 609.907 ms → 664.037 ms (+54.131 ms, +8.9%) 🔴
Show details
Name Duration
Open Search Page TTI Baseline
Mean: 609.907 ms
Stdev: 21.063 ms (3.5%)
Runs: 579.1578780000564 579.6598310000263 582.6384280000348 584.2594810000155 586.1818039999343 587.6320800001267 589.6240240000188 590.1371259998996 591.1336670001037 591.3860269999132 591.3970139999874 597.3074140001554 602.9871420001145 608.5560309998691 608.7816170000006 612.4339599998202 613.0414630000014 613.8191329999827 614.455038000131 615.8223069999367 616.701374999946 617.6135259999428 619.3894039997831 621.9058030000888 625.6604410000145 626.4123949999921 626.6399330000859 632.7419440001249 635.2080079999287 639.9318440000061 651.6172690000385 662.7828379999846

Current
Mean: 664.037 ms
Stdev: 21.308 ms (3.2%)
Runs: 621.4924319998827 626.7480059999507 627.482788000023 627.8308520000428 629.8034669999033 630.4683030000888 639.9759519998915 647.8363850000314 657.0541590000503 659.4858399999794 661.6752529998776 665.1025389998686 666.103964000009 666.9011239998508 667.5222169999033 668.6708990000188 669.0250239998568 670.6614180000033 670.7392169998493 671.378703000024 673.1195479999296 675.9110520000104 677.8836680001114 679.2737630000338 679.578288000077 681.1217859999742 681.3748380001634 683.0642909999005 689.1940510000568 689.5523680001497 695.039511000039 698.1278890001122

Meaningless Changes To Duration

Show entries
Name Duration
App start TTI 715.424 ms → 731.293 ms (+15.869 ms, +2.2%)
App start runJsBundle 202.469 ms → 206.531 ms (+4.063 ms, +2.0%)
App start regularAppStart 0.013 ms → 0.017 ms (+0.003 ms, +24.4%) 🟡
App start nativeLaunch 19.806 ms → 19.594 ms (-0.213 ms, -1.1%)
Show details
Name Duration
App start TTI Baseline
Mean: 715.424 ms
Stdev: 31.442 ms (4.4%)
Runs: 636.7695519999834 650.7455890000565 663.0491179999663 680.1964010000229 684.8347050000448 690.2629210000159 693.5775910000084 694.1619639999699 697.2665219999617 701.561359000043 702.0101479999721 704.669283999945 706.9728119999636 710.7535249999491 711.585107000079 715.8126420000335 722.7737499999348 728.7751380000263 729.5060449999291 733.3425809999462 734.5338690000353 737.814279000042 738.3627799999667 738.7220130000496 741.2963460000465 746.3167749999557 747.7324019999942 755.5330090000061 756.7952779999468 760.3066879999824 762.1026169999968

Current
Mean: 731.293 ms
Stdev: 22.940 ms (3.1%)
Runs: 679.103834999958 692.145351999905 700.5744179999456 703.3738599999342 704.6401949999854 706.1209770001005 713.0777610000223 716.1327599999495 717.9823330000509 718.5681360000744 722.3956249998882 722.4886189999525 728.5077959999908 728.5424619999249 730.3599179999437 733.7452090000734 735.7187910000794 736.6949620000087 740.979527000105 742.785816000076 743.3688819999807 748.8030789999757 750.3087430000305 750.404118000064 753.0145970000885 756.3586059999652 757.5015360000543 764.8836119999178 768.9254840000067 771.2798989999574
App start runJsBundle Baseline
Mean: 202.469 ms
Stdev: 23.242 ms (11.5%)
Runs: 153 159 174 176 180 182 184 184 186 187 190 193 194 195 198 200 201 205 205 209 215 215 215 217 218 219 226 231 239 240 241 248

Current
Mean: 206.531 ms
Stdev: 18.921 ms (9.2%)
Runs: 171 177 184 185 187 187 189 189 190 190 194 194 200 202 202 205 211 212 214 214 215 219 219 219 220 220 222 224 232 232 236 254
App start regularAppStart Baseline
Mean: 0.013 ms
Stdev: 0.001 ms (4.6%)
Runs: 0.01204399997368455 0.01261399989016354 0.012614000122994184 0.012654000078327954 0.012654999969527125 0.012694999924860895 0.01273600000422448 0.012817000038921833 0.012940000044181943 0.013061000034213066 0.0133050000295043 0.013306000037118793 0.013306000037118793 0.013387000071816146 0.013509000069461763 0.013550000032410026 0.013550000032410026 0.013590999995358288 0.013672000030055642 0.013711999985389411 0.013712999993003905 0.013752999948337674 0.013752999948337674 0.01387499994598329 0.01387499994598329 0.013915999908931553 0.014038000022992492 0.014078000094741583 0.014118999941274524 0.014444999862462282 0.014810999971814454

Current
Mean: 0.017 ms
Stdev: 0.001 ms (6.8%)
Runs: 0.014850999927148223 0.015055000083521008 0.015137000009417534 0.015176999848335981 0.015706999925896525 0.015746999997645617 0.015828000148758292 0.015829000156372786 0.015868999995291233 0.016112999990582466 0.016235999995842576 0.016275999834761024 0.01639799983240664 0.016398000065237284 0.016398000065237284 0.01647999999113381 0.016682999907061458 0.01672299997881055 0.01688600005581975 0.01692699990235269 0.016927000135183334 0.01704900013282895 0.017170999897643924 0.017293999902904034 0.017333999974653125 0.017577999969944358 0.017903000116348267 0.018148000119253993 0.018596000038087368 0.019286999944597483 0.0195720000192523
App start nativeLaunch Baseline
Mean: 19.806 ms
Stdev: 1.991 ms (10.1%)
Runs: 17 17 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 20 20 20 20 20 20 21 21 22 22 22 23 25 25

Current
Mean: 19.594 ms
Stdev: 1.966 ms (10.0%)
Runs: 18 18 18 18 18 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 19 20 21 21 21 21 22 22 22 23 24 25

@github-actions github-actions bot added the DeployBlockerCash This issue or pull request should block deployment label Feb 27, 2023
@github-actions
Copy link
Contributor

@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker.

@robertjchen
Copy link
Contributor

Don't see how that could be the case, maybe this needs the latest changes from main?

@NikkiWines
Copy link
Contributor Author

Yeah agreed, this doesn't seem like it would've introduced anything like that for the search page 🤔

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/robertjchen in version: 1.2.77-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/robertjchen in version: 1.2.77-0 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Mar 2, 2023

🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.2.77-4 🚀

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
DeployBlockerCash This issue or pull request should block deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants