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

Add confirmation page #13744

Merged
merged 17 commits into from
Dec 23, 2022
Merged

Add confirmation page #13744

merged 17 commits into from
Dec 23, 2022

Conversation

Puneet-here
Copy link
Contributor

@Puneet-here Puneet-here commented Dec 20, 2022

Details

Fixed Issues

$ #13151
PROPOSAL: #13151 (comment)

Tests

  1. Go to concierge > Click call icon
  2. Fill data > Request call
  3. Verify you see a confirmation page with fireworks gif

  1. Go to settings > security
  2. Change password > Fill data > save
  3. Verify you see a confirmation page with fireworks gif

  1. Go to settings > payments > Add payment method
  2. Bank account > Fill data to add the bank account
  3. Verify you see a confirmation page with fireworks gif

  1. Import and render TransferBalancePage in some other component (for example ProfilePage, don't forget to remove the code for profile page)
  2. Return true in the if statement
    if (this.props.walletTransfer.shouldShowSuccess && !this.props.walletTransfer.loading) {
  3. Go to the page where you rendered the TransferBalancePage
  4. Verify you see a new gif for dark theme

  1. Import and render ActivateStep in some other component
  2. Go to the page where you rendered the ActivateStep
  3. Verify you see a loading gif and there's no button
  4. Make goldWallet true
    const isGoldWallet = props.userWallet.tierName === CONST.WALLET.TIER_NAME.GOLD;
  5. Verify you see the confirmation fireworks gif and a button
    Note: At ios you will see that the header is near the status bar. It is because in ActivateStep the ScreenWrapper isn't present as the parent because the parent component of ActivateStep already contains a ScreenWrapper.

  1. Go to settings > workspaces >
  2. Open a workspace > Connect bank account
  3. Choose connect manually > Fill data > Save
  4. Fill company info form and save
  5. Verify you see a new gif for dark theme (Note: you will see the loading indicator first, the gif only shows up for brief moment)
  • Verify that no errors appear in the JS console

Offline tests

No offline specific steps

QA Steps

  1. Go to concierge > Click call icon
  2. Fill data > Request call
  3. Verify you see a confirmation page with fireworks gif

  1. Go to settings > security
  2. Change password > Fill data > save
  3. Verify you see a confirmation page with fireworks gif

  1. Go to settings > payments > Add payment method
  2. Bank account > Fill data to add the bank account
  3. Verify you see a confirmation page with fireworks gif

  1. Go to settings > payments
  2. Transfer balance > go through the steps
  3. Verify you see a confirmation page with fireworks gif

  1. Go to settings > workspaces >
  2. Open a workspace > Connect bank account
  3. Choose connect manually > Fill data > Save
  4. Fill company info form and save
  5. Verify you see a new gif for dark theme (Note: you will see the loading indicator first, the gif only shows up for brief moment)
  • 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
    • 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.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
Screen.Recording.2022-12-22.at.2.03.33.AM.mov
Screen.Recording.2022-12-22.at.3.14.04.AM.mov
Screenshot 2022-12-22 at 3 16 26 AM Screenshot 2022-12-22 at 3 13 06 AM Screenshot 2022-12-22 at 3 12 56 AM Screenshot 2022-12-22 at 3 12 46 AM
Mobile Web - Chrome Screenshot 2022-12-22 at 4 16 47 AM Screenshot 2022-12-22 at 4 16 21 AM Screenshot 2022-12-22 at 4 16 09 AM Screenshot 2022-12-22 at 4 15 56 AM Screenshot 2022-12-22 at 4 17 06 AM
Mobile Web - Safari Screenshot 2022-12-22 at 3 30 51 AM Screenshot 2022-12-22 at 3 30 34 AM Screenshot 2022-12-22 at 3 30 24 AM Screenshot 2022-12-22 at 3 30 03 AM Screenshot 2022-12-22 at 3 27 46 AM
Desktop Screenshot 2022-12-22 at 3 23 38 AM Screenshot 2022-12-22 at 3 23 28 AM Screenshot 2022-12-22 at 3 23 18 AM Screenshot 2022-12-22 at 3 23 08 AM Screenshot 2022-12-22 at 3 22 58 AM
iOS Screenshot 2022-12-22 at 3 34 32 AM Screenshot 2022-12-22 at 3 34 15 AM Screenshot 2022-12-22 at 3 34 07 AM Screenshot 2022-12-22 at 3 33 58 AM Screenshot 2022-12-22 at 4 10 41 AM
Android Screenshot 2022-12-22 at 4 18 38 AM Screenshot 2022-12-22 at 4 18 27 AM Screenshot 2022-12-22 at 4 18 16 AM Screenshot 2022-12-22 at 4 18 05 AM Screenshot 2022-12-22 at 4 17 57 AM

@Puneet-here
Copy link
Contributor Author

I found a bug (not related to the PR) on pressing cross at confirmation screen of transfer balance page it navigates to the payments pages instead of closing the modal

@Puneet-here Puneet-here marked this pull request as ready for review December 21, 2022 22:52
@Puneet-here Puneet-here requested a review from a team as a code owner December 21, 2022 22:52
@melvin-bot melvin-bot bot requested review from sobitneupane and tgolen and removed request for a team December 21, 2022 22:52
@melvin-bot
Copy link

melvin-bot bot commented Dec 21, 2022

@tgolen @sobitneupane One of you needs to 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]

@sobitneupane
Copy link
Contributor

Thanks @Puneet-here. Changes are looking good. Will review it today.

@mountiny mountiny requested review from mountiny and removed request for tgolen December 22, 2022 17:09
@luacmartins luacmartins self-requested a review December 22, 2022 17:33
luacmartins
luacmartins previously approved these changes Dec 22, 2022
Copy link
Contributor

@luacmartins luacmartins left a comment

Choose a reason for hiding this comment

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

LGTM and tests well!

@mountiny
Copy link
Contributor

@shawnborton Tagging you here for a review because I am jsut a bit concerneed about the background colour on some of the gifs. For example look at this:
image

I am not sure if it was raised in other places, but I could not see it in the comments. The Hex of the gif green bg does not seem exactly the same as the app background. You can also check the screenshots in the PR body from Puneet and you can see the colour different there too.

Since the images are hosted in cloud we can update that without touching this PR. so I think it is NAB, but wanted to note this

@shawnborton
Copy link
Contributor

Good catch. I think we might have to live with this until we replace these GIFs with Lottie animations, where we will have perfectly crisp SVG animations and no background color.

@shawnborton
Copy link
Contributor

That being said, I'll flag this to Augenblick and see if they have any ideas!

@mountiny
Copy link
Contributor

Great, thanks, wanted to get a confirmation this is not a blocker 🙇

Copy link
Contributor

@sobitneupane sobitneupane left a comment

Choose a reason for hiding this comment

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

Screenshots/Videos

Web
Web_Enable_Payment.mov
Web_TransferBalance_Confirmation.mov
Web_Company_Information.mov
Web_Change_Password_Confirmation.mov
Web_Request_Call_Confirmation.mov
Web_AddPayment_Confirmation.mov
Web_Enable_Payment_Confirmatioin.mov
Mobile Web - Chrome
Chrome_Company_Information.mov
Chrome_AddPayment_Confirmation.mov
Chrome_Change_Password.mov
Chrom_Request_Call.mov
Chrome_TransferBalance_confirmation.mov
Mobile Web - Safari
Safari_ChangePassword.mov
Safari_RequestCall.mov
Desktop
Desktop_Company_Information.mov
Desktop_AddPayment_Confirmation.mov
Desktop_Change_Password_Confirmation.mov
Desktop_Request_Call_Confirmation.mov
iOS
IOS_Company_information.mov
IOS_Change_Password.mov
IOS_RequestCall.mov
IOS_Add_payment_method.mov
Android
Android_Add_payment_method.mov
Android_Company_information.mov
Android_Change_password.mov
Android_Requestcall.mov

@shawnborton
Copy link
Contributor

Nice, these look great 🎆

Copy link
Contributor

@mountiny mountiny left a comment

Choose a reason for hiding this comment

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

@Puneet-here One minor thing

@shawnborton
Copy link
Contributor

Okay we have two new gifs we can try to fix the BG issue that @mountiny spotted, @Puneet-here can you test with these locally and show us some screenshots? If these look better, I will upload to Cloudfront.

animations.zip

@Puneet-here
Copy link
Contributor Author

@shawnborton, it still doesn't match completely with the background

Screen.Recording.2022-12-23.at.2.22.13.AM.mov

@shawnborton
Copy link
Contributor

Okay no worries, appreciate you giving that a shot! I say we just keep what we have for now and we'll revisit these with Lottie down the road.

@mountiny
Copy link
Contributor

Thank you for updating that, I see this is not super enforced 🙇

We are missing a checklist from @sobitneupane :/

Copy link
Contributor

@sobitneupane sobitneupane left a comment

Choose a reason for hiding this comment

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

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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Copy link
Contributor

@mountiny mountiny left a comment

Choose a reason for hiding this comment

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

Thank you guys @Puneet-here @sobitneupane 🙇

@mountiny mountiny merged commit 5459d9d into Expensify:main Dec 23, 2022
@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.

@github-actions
Copy link
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Duration
TTI 811.718 ms → 815.663 ms (+3.945 ms, ±0.0%)
nativeLaunch 9.667 ms → 9.903 ms (+0.237 ms, +2.4%)
regularAppStart 0.014 ms → 0.015 ms (+0.001 ms, +4.6%)
runJsBundle 185.645 ms → 184.625 ms (-1.020 ms, -0.5%)
Show details
Name Duration
TTI Baseline
Mean: 811.718 ms
Stdev: 43.794 ms (5.4%)
Runs: 748.12847100012 749.98244300019 753.2723399996758 757.5037930002436 761.3756130002439 767.7094780001789 769.814915000461 778.507179999724 781.7683100001886 791.2354560000822 791.8988690003753 797.3880460001528 800.098505999893 800.4654510002583 804.441042999737 804.8405170002952 806.9756370000541 808.2387150004506 814.2342259995639 815.4079750003293 819.0739949997514 825.5793789997697 839.2781480001286 842.2696200003847 844.032692999579 846.6975670000538 854.7700890004635 886.3899860000238 890.154265999794 899.8985660001636 911.823369000107

Current
Mean: 815.663 ms
Stdev: 43.826 ms (5.4%)
Runs: 752.5090570002794 755.139033999294 761.6871899999678 767.7082119993865 772.6614270005375 773.1865860000253 776.2212279997766 785.1062700003386 788.1761569995433 788.7935899998993 793.6647159997374 794.1606580000371 796.522600999102 797.5516749992967 798.1893509998918 805.8280950002372 806.5959140006453 809.5929949991405 822.4293969999999 824.1723939999938 827.1593990009278 830.8274869993329 838.824040999636 848.7601709999144 856.2598519995809 856.4966829996556 860.8537239991128 877.1761089991778 884.0215579997748 908.3540109992027 926.9145919997245
nativeLaunch Baseline
Mean: 9.667 ms
Stdev: 1.468 ms (15.2%)
Runs: 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 11 11 11 12 12 13 13

Current
Mean: 9.903 ms
Stdev: 1.593 ms (16.1%)
Runs: 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 10 10 10 10 10 11 11 11 11 11 11 12 12 12 13 14
regularAppStart Baseline
Mean: 0.014 ms
Stdev: 0.001 ms (9.6%)
Runs: 0.012045000679790974 0.01285799965262413 0.013224000111222267 0.013265000656247139 0.013306000269949436 0.013387000188231468 0.013427000492811203 0.013467999175190926 0.013590999878942966 0.013672000728547573 0.013793999329209328 0.013956000097095966 0.014161000028252602 0.014201000332832336 0.014241000637412071 0.0143630001693964 0.014403999783098698 0.014403999783098698 0.014485999941825867 0.014566999860107899 0.014607000164687634 0.014607999473810196 0.01476999931037426 0.015339999459683895 0.015786999836564064 0.01590999960899353 0.017008000053465366 0.017943999730050564 0.018228999339044094

Current
Mean: 0.015 ms
Stdev: 0.001 ms (4.7%)
Runs: 0.01371300034224987 0.013996999710798264 0.0142000000923872 0.014201000332832336 0.014322999864816666 0.01440500095486641 0.014527000486850739 0.01464799977838993 0.01464799977838993 0.014688998460769653 0.014689000323414803 0.014892999082803726 0.01493300125002861 0.01493300125002861 0.015015000477433205 0.015137000009417534 0.015178000554442406 0.015217998996376991 0.015258999541401863 0.015380999073386192 0.015502998605370522 0.015584999695420265 0.015665998682379723 0.0157880000770092 0.0157880000770092 0.015869000926613808 0.016071999445557594 0.01619499921798706 0.016276000067591667 0.016479000449180603
runJsBundle Baseline
Mean: 185.645 ms
Stdev: 18.706 ms (10.1%)
Runs: 157 162 163 163 169 170 171 171 174 177 177 178 179 181 182 182 183 183 184 185 185 189 192 196 197 207 210 211 216 223 238

Current
Mean: 184.625 ms
Stdev: 17.874 ms (9.7%)
Runs: 161 164 166 168 168 168 169 170 171 172 174 175 175 177 177 178 180 180 182 183 184 188 196 196 199 199 199 210 212 212 223 232

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @mountiny in version: 1.2.44-0 🚀

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

@mvtglobally
Copy link

@mountiny @shawnborton Can you pls validate the following steps internally? We do not have active wallet to be able to transfer. Rest steps we are QA-ing

  1. Go to settings > payments
  2. Transfer balance > go through the steps
  3. Verify you see a confirmation page with fireworks gif

@AndrewGable
Copy link
Contributor

I see fireworks on the transfer page!

Screenshot 2022-12-28 at 11 28 16 AM

Screenshot 2022-12-28 at 11 27 39 AM

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @chiragsalian in version: 1.2.44-0 🚀

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

@Santhosh-Sellavel
Copy link
Collaborator

Seems this PR caused a regression, i.e missed catching this bug where the welcome text is not centered in Spanish!

@sobitneupane
Copy link
Contributor

Thanks @Santhosh-Sellavel for linking the issue. Though the bug precedes this PR and was existent in some confirmation screens like PasswordConfirmationScreen and RequestCallConfirmationScreen, It should have been caught in this PR.

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.

9 participants