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

Keyboard for email in close account #13557

Merged
merged 3 commits into from
Dec 15, 2022
Merged

Conversation

sketchydroide
Copy link
Contributor

@sketchydroide sketchydroide commented Dec 13, 2022

Details

The keyboard needs to be of the keyboar type on the close account screen for the contact

Fixed Issues

$ #13489

Tests

  1. Go to settings > security > close account
  2. Click on default contact method
  3. Verify that you see the email keyboard (it needs to have the @ symbol visible)
  • Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

Same as tests

  • 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:
    • 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 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 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
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android

@sketchydroide sketchydroide self-assigned this Dec 13, 2022
@sketchydroide sketchydroide marked this pull request as ready for review December 13, 2022 16:42
@sketchydroide sketchydroide requested a review from a team as a code owner December 13, 2022 16:42
@sketchydroide
Copy link
Contributor Author

lint is failing, on the script itself, I see no reason for this to fail otherwise

@melvin-bot melvin-bot bot requested review from dangrous and rushatgabhane and removed request for a team December 13, 2022 16:43
@melvin-bot
Copy link

melvin-bot bot commented Dec 13, 2022

@rushatgabhane @dangrous 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]

dangrous
dangrous previously approved these changes Dec 13, 2022
Copy link
Contributor

@dangrous dangrous left a comment

Choose a reason for hiding this comment

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

Looks good! Not sure what that linter check is about since it doesn't seem related...

@sketchydroide
Copy link
Contributor Author

Looks good! Not sure what that linter check is about since it doesn't seem related...

I don't think it is, it started breaking after I fixed the first issue (the "" aded automaticaly for the imports), and now it keeps breaking in the script 🤷🏼

@rushatgabhane
Copy link
Member

rushatgabhane commented Dec 15, 2022

can't review because i cannot login. i've sent my ip for whitelisting

@dangrous
Copy link
Contributor

@rushatgabhane I can take care of the checklist and screenshots tomorrow AM if you're still having issues!

@rushatgabhane
Copy link
Member

yes please that'd be great

@sketchydroide sketchydroide requested review from aimane-chnaif and removed request for rushatgabhane December 15, 2022 14:37
@sketchydroide
Copy link
Contributor Author

sorry @rushatgabhane changing the C+ as @aimane-chnaif already has the ip whitelisted

@rushatgabhane
Copy link
Member

no worries, im traveling so my ip keeps changing hehe @sketchydroide

Copy link
Contributor

@aimane-chnaif aimane-chnaif left a comment

Choose a reason for hiding this comment

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

I suggest to add autoCorrect={false}, similar to login email input

autoCorrect={false}

It doesn't make sense that email should be auto-corrected.

autocorrect.mp4

@sketchydroide
Copy link
Contributor Author

sketchydroide commented Dec 15, 2022

I think that is a good suggestion, I like it.
Alhtough I think you added it to the wrong file that we were testing I made changes to the closeAccountPage.js :D
Edited, I now see what you meant

@sketchydroide
Copy link
Contributor Author

done @aimane-chnaif

@aimane-chnaif
Copy link
Contributor

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:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • 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.

Screenshots/Videos

Web web
Mobile Web - Chrome
mchrome.mp4
Mobile Web - Safari
msafari.mp4
Desktop desktop
iOS
ios.mp4
Android
android.mp4

Copy link
Contributor

@aimane-chnaif aimane-chnaif 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

@sketchydroide
Copy link
Contributor Author

@arosiclair feel free to merge

Copy link
Contributor

@dangrous dangrous left a comment

Choose a reason for hiding this comment

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

Great catch on the autocorrect @aimane-chnaif !

@dangrous dangrous merged commit 79a3d62 into main Dec 15, 2022
@dangrous dangrous deleted the afonseca_change_keyboard_type branch December 15, 2022 18:20
@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 815.979 ms → 837.905 ms (+21.925 ms, +2.7%)
runJsBundle 190.133 ms → 199.438 ms (+9.304 ms, +4.9%)
regularAppStart 0.014 ms → 0.015 ms (+0.000 ms, +2.8%)
nativeLaunch 10.125 ms → 10.094 ms (-0.031 ms, ±0.0%)
Show details
Name Duration
TTI Baseline
Mean: 815.979 ms
Stdev: 33.944 ms (4.2%)
Runs: 771.9780949999113 780.1996039999649 782.1940890001133 783.5548759999219 788.6349609999452 789.1845869999379 792.2751050000079 792.327667000005 792.4034869999159 793.3534230000805 795.2739470000379 796.3673080001026 797.5814849999733 801.1022449999582 801.7460469999351 804.5898400000297 808.4863640000112 810.4889950000215 817.4232059998903 819.7810609999578 826.5677960000467 827.1472599999979 829.5841580000706 836.4334309999831 844.0267670000903 850.5769470001105 875.3625570000149 876.0112749999389 881.6254600000102 913.092878999887

Current
Mean: 837.905 ms
Stdev: 40.466 ms (4.8%)
Runs: 754.8727529998869 763.5855630000588 786.2772019999102 797.5082360000815 801.9577160000335 804.94022400002 806.2381029999815 806.6597140000667 811.794637999963 812.6713819999713 813.8357619999442 819.349668999901 819.5760359999258 820.8130179999862 824.0107539999299 826.5353149999864 834.331077999901 852.5485400001053 854.2922620000318 860.816545000067 862.5981139999349 864.9254290000536 867.2605999999214 868.7209819999989 876.0601689999457 877.6260579999071 885.6782619999722 886.6678289999254 888.1339589999989 889.8324009999633 934.9223410000559
runJsBundle Baseline
Mean: 190.133 ms
Stdev: 22.272 ms (11.7%)
Runs: 160 166 166 166 167 171 172 172 175 178 178 180 180 181 182 183 184 184 184 201 205 205 208 211 213 214 219 219 223 257

Current
Mean: 199.438 ms
Stdev: 19.856 ms (10.0%)
Runs: 161 172 173 177 177 178 181 184 185 191 193 194 195 195 195 195 197 201 201 203 204 205 207 209 209 215 215 219 228 237 241 245
regularAppStart Baseline
Mean: 0.014 ms
Stdev: 0.001 ms (8.0%)
Runs: 0.0125730000436306 0.012817000038921833 0.012817000038921833 0.0129399998113513 0.013020999962463975 0.013264999957755208 0.013386999955400825 0.013590999878942966 0.01359100011177361 0.013630999950692058 0.013794000027701259 0.013875999953597784 0.013916000025346875 0.013956999871879816 0.0139979999512434 0.014444999862462282 0.014526000013574958 0.014648000011220574 0.01472900016233325 0.014770000008866191 0.014771000016480684 0.014810999855399132 0.014933000085875392 0.015217999927699566 0.015299000078812242 0.015625 0.015746999997645617 0.016112999990582466 0.01611399999819696 0.016234999988228083 0.01721199997700751

Current
Mean: 0.015 ms
Stdev: 0.001 ms (7.7%)
Runs: 0.012938999803736806 0.01371199986897409 0.013793999794870615 0.013794000027701259 0.013794000027701259 0.013916000025346875 0.013956999871879816 0.013956999871879816 0.014079000102356076 0.014160000020638108 0.014160000020638108 0.014160000020638108 0.014160000020638108 0.014282000018283725 0.014282000018283725 0.014404000015929341 0.014404000015929341 0.014444999862462282 0.014445000095292926 0.014607999939471483 0.014688999857753515 0.014851999934762716 0.015421999851241708 0.015462999930605292 0.0157880000770092 0.0157880000770092 0.015868999995291233 0.015909999841824174 0.016316999914124608 0.016804999904707074 0.017170999897643924 0.018188999965786934
nativeLaunch Baseline
Mean: 10.125 ms
Stdev: 2.433 ms (24.0%)
Runs: 7 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 11 11 11 12 13 13 13 14 15 15 16

Current
Mean: 10.094 ms
Stdev: 1.990 ms (19.7%)
Runs: 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 10 10 10 10 10 11 11 11 12 12 12 12 13 13 15 15

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @dangrous in version: 1.2.41-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @dangrous in version: 1.2.41-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @yuwenmemon in version: 1.2.41-4 🚀

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

@mollfpr
Copy link
Contributor

mollfpr commented Jun 12, 2023

Hi, coming from #18836

Apparently, the iOS keyboard doesn't include round brackets for email-type keyboards, and it's blocking the user with an America phone number to complete the input validation.

@aimane-chnaif
Copy link
Contributor

At the time of this PR, phone number was not formatted so no brackets.
So I think that issue came from phone formatting PR, though the root cause is here.

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