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

Disable google places auto complete scroll #14543

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

bernhardoj
Copy link
Contributor

@bernhardoj bernhardoj commented Jan 25, 2023

Details

Google places auto complete use VirtualizedList internally but always show maximum of 5 items. It is not scrollable on another platform except for iOS. So, we want to disable the scroll capability to make it consistent with other platforms.

Fixed Issues

$ #14312
PROPOSAL: #14312 (comment)

Tests

  1. Go to Workspace => Connect Bank Account => Connect Manually => Enter valid information for first 2 steps.
  2. At step 3, tap on Personal Address, type some text to make the auto complete address dropdown appears, try to scroll inside the dropdown
  3. Verify the whole page is scrolled, not the dropdown
  • Verify that no errors appear in the JS console

Offline tests

  1. Go to Workspace => Connect Bank Account => Connect Manually => Enter valid information for first 2 steps.
  2. At step 3, tap on Personal Address, type some text to make the auto complete address dropdown appears, try to scroll inside the dropdown
  3. Verify the whole page is scrolled, not the dropdown

QA Steps

  1. Go to Workspace => Connect Bank Account => Connect Manually => Enter valid information for first 2 steps.
  2. At step 3, tap on Personal Address, type some text to make the auto complete address dropdown appears, try to scroll inside the dropdown
  3. Verify the whole page is scrolled, not the dropdown
  • 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.
  • 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.2023-01-24.at.17.54.24.mov
Mobile Web - Chrome
329313.t.mp4
Mobile Web - Safari
Screen.Recording.2023-01-24.at.20.00.56.mov
Desktop
Screen.Recording.2023-01-24.at.18.10.11.mov
iOS
Screen.Recording.2023-01-24.at.19.50.19.mov
Android
329310.t.mp4

@bernhardoj bernhardoj requested a review from a team as a code owner January 25, 2023 05:18
@melvin-bot
Copy link

melvin-bot bot commented Jan 25, 2023

Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers!

@melvin-bot melvin-bot bot requested review from aimane-chnaif and johnmlee101 and removed request for a team January 25, 2023 05:18
@melvin-bot
Copy link

melvin-bot bot commented Jan 25, 2023

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

@aimane-chnaif
Copy link
Contributor

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

Screenshots/Videos

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

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.

Looks good and tests well.
All yours @johnmlee101

Copy link
Contributor

@johnmlee101 johnmlee101 left a comment

Choose a reason for hiding this comment

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

Went through the steps, looks great and scrolls as expected!

@johnmlee101 johnmlee101 merged commit 1a985e6 into Expensify:main Jan 26, 2023
@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
App start TTI 688.055 ms → 718.591 ms (+30.537 ms, +4.4%)
App start runJsBundle 185.161 ms → 200.742 ms (+15.581 ms, +8.4%)
App start nativeLaunch 19.567 ms → 20.258 ms (+0.691 ms, +3.5%)
App start regularAppStart 0.015 ms → 0.018 ms (+0.003 ms, +23.7%) 🟡
Open Search Page TTI 616.783 ms → 607.387 ms (-9.396 ms, -1.5%)
Show details
Name Duration
App start TTI Baseline
Mean: 688.055 ms
Stdev: 24.904 ms (3.6%)
Runs: 637.4310490004718 639.9156250003725 647.5075519997627 664.6046820003539 664.8652420006692 672.5618580002338 674.8076120000333 675.2714900001884 675.8403830006719 678.74122299999 681.5968190003186 682.2714520003647 682.4591690003872 682.7406559996307 684.1772920005023 689.2186530008912 693.5710339993238 694.4913829993457 695.1126329991966 698.374430000782 701.0776509996504 702.4315150007606 703.7965370006859 707.2576909996569 708.6190159991384 708.7427210006863 723.3505770005286 727.1638290006667 755.5856330003589

Current
Mean: 718.591 ms
Stdev: 24.399 ms (3.4%)
Runs: 675.4801620002836 680.2318029999733 684.5021400004625 685.2642080001533 688.2675870005041 700.5069750007242 700.8133930005133 700.886717999354 701.5711519997567 703.9507040008903 705.8815960008651 708.1765069998801 714.5205639991909 715.5148610007018 715.9751490000635 717.2633979991078 718.0612870007753 719.6292339991778 723.4993789996952 723.9423140008003 726.4292520005256 728.9092209991068 729.7191300000995 730.2452530004084 738.1906550005078 743.5274110008031 744.5072489995509 750.352739000693 764.2259400002658 766.4555009994656 769.828688999638
App start runJsBundle Baseline
Mean: 185.161 ms
Stdev: 17.559 ms (9.5%)
Runs: 159 165 167 168 169 171 173 174 174 174 175 176 177 177 177 179 181 183 185 186 190 193 194 194 199 201 201 203 210 227 238

Current
Mean: 200.742 ms
Stdev: 23.436 ms (11.7%)
Runs: 166 171 173 173 177 179 180 184 184 186 189 189 192 192 193 196 198 199 201 203 209 210 211 215 215 222 234 234 238 252 258
App start nativeLaunch Baseline
Mean: 19.567 ms
Stdev: 1.359 ms (6.9%)
Runs: 17 18 18 18 18 18 19 19 19 19 19 19 19 19 19 19 19 20 20 20 20 20 20 21 21 21 21 22 22 23

Current
Mean: 20.258 ms
Stdev: 1.934 ms (9.5%)
Runs: 17 18 18 18 18 19 19 19 19 19 19 19 19 20 20 20 20 20 20 20 21 21 21 22 22 22 22 23 24 24 25
App start regularAppStart Baseline
Mean: 0.015 ms
Stdev: 0.001 ms (3.9%)
Runs: 0.01354999840259552 0.013590998947620392 0.013631999492645264 0.013996999710798264 0.013996999710798264 0.0139979999512434 0.014241000637412071 0.014444999396800995 0.01448499970138073 0.014485999941825867 0.014525998383760452 0.014567000791430473 0.014567000791430473 0.014649000018835068 0.014649000018835068 0.014689000323414803 0.014770999550819397 0.014770999550819397 0.014812000095844269 0.01493300125002861 0.01505499891936779 0.01505500078201294 0.015096001327037811 0.015217998996376991 0.015300000086426735 0.015381000936031342 0.015420999377965927 0.015502998605370522 0.01550300046801567 0.01550300046801567

Current
Mean: 0.018 ms
Stdev: 0.002 ms (9.5%)
Runs: 0.015422001481056213 0.015502998605370522 0.015828000381588936 0.016276000067591667 0.01660200022161007 0.01672299951314926 0.01676500029861927 0.01700800098478794 0.017089998349547386 0.017090000212192535 0.017253000289201736 0.017374999821186066 0.017496999353170395 0.017741000279784203 0.017741000279784203 0.017741000279784203 0.017862999811768532 0.01794400066137314 0.018309999257326126 0.01839200034737587 0.0185139998793602 0.0185139998793602 0.018596000969409943 0.019531000405550003 0.0197759997099638 0.020059999078512192 0.020385999232530594 0.020547999069094658 0.020670000463724136 0.02103699930012226 0.022909000515937805
Open Search Page TTI Baseline
Mean: 616.783 ms
Stdev: 29.591 ms (4.8%)
Runs: 567.5004070010036 571.9338789992034 584.895345998928 586.9892579987645 590.1403809990734 590.9275720007718 593.5149739999324 595.5043540000916 595.6110849995166 596.5577400010079 597.1269530002028 600.8994139991701 606.1037190016359 608.0407720003277 609.1751309987158 610.6024580001831 611.2465410009027 613.23584099859 613.9119060002267 616.0952150002122 616.5286860000342 620.5091559998691 629.2058509998024 635.0541179999709 637.503866000101 638.5396730005741 652.9544680006802 656.5280360002071 657.8194989990443 667.9990650005639 669.7164310012013 694.6683760005981

Current
Mean: 607.387 ms
Stdev: 17.671 ms (2.9%)
Runs: 572.0710859987885 581.4821779988706 585.7124430015683 586.3555909991264 586.8736990001053 589.6669110003859 589.6838790010661 595.0812180005014 598.1946619991213 599.4551599994302 599.5861820001155 599.7809659987688 599.8514409996569 601.6215420011431 603.8994549997151 605.359172001481 607.7951260004193 608.7561850007623 609.5002440009266 609.7035730015486 610.6120200008154 610.8625900000334 611.0099689997733 615.6382650006562 615.6471349988133 616.7490240000188 620.9137370008975 621.906780000776 624.4488529991359 627.578125 640.1195480003953 646.0139969997108 651.8238120004535

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/johnmlee101 in version: 1.2.60-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/luacmartins in version: 1.2.60-1 🚀

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.

4 participants