Skip to content

chore: use optionRowHeight instead of paymentMethodHeight#30486

Merged
roryabraham merged 1 commit intoExpensify:mainfrom
adhorodyski:refactor/28902/flashlist-migration
Oct 27, 2023
Merged

chore: use optionRowHeight instead of paymentMethodHeight#30486
roryabraham merged 1 commit intoExpensify:mainfrom
adhorodyski:refactor/28902/flashlist-migration

Conversation

@adhorodyski
Copy link
Copy Markdown
Contributor

@adhorodyski adhorodyski commented Oct 27, 2023

Details

Fixed Issues

$ #28902
PROPOSAL: N/A

Tests

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

  • 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: mWeb Chrome
    • iOS: Native
    • iOS: mWeb 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 the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • 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 grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is 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
    • If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
    • 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 code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • 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 the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • 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

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

@adhorodyski adhorodyski marked this pull request as ready for review October 27, 2023 10:16
@adhorodyski adhorodyski requested a review from a team as a code owner October 27, 2023 10:16
@melvin-bot melvin-bot bot requested review from narefyev91 and removed request for a team October 27, 2023 10:16
@melvin-bot
Copy link
Copy Markdown

melvin-bot bot commented Oct 27, 2023

@narefyev91 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]

@narefyev91
Copy link
Copy Markdown
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:
    • 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 the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • 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 grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is 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 code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • 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
web.mov
Mobile Web - Chrome
android-web.mov
Mobile Web - Safari
ios-web.mov
Desktop
desktop.mov
iOS
ios.mov
Android
andoid.mov

Copy link
Copy Markdown
Contributor

@narefyev91 narefyev91 left a comment

Choose a reason for hiding this comment

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

LGTM!
🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot requested a review from roryabraham October 27, 2023 12:12
Copy link
Copy Markdown
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

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

Thanks!

@roryabraham roryabraham merged commit 3865284 into Expensify:main Oct 27, 2023
@OSBotify
Copy link
Copy Markdown
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 github-actions bot added the DeployBlockerCash This issue or pull request should block deployment label Oct 27, 2023
@github-actions
Copy link
Copy Markdown
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

Name Duration
App start TTI 1176.780 ms → 1255.489 ms (+78.709 ms, +6.7%) 🔴
App start runJsBundle 805.350 ms → 878.534 ms (+73.184 ms, +9.1%) 🔴
Show details
Name Duration
App start TTI Baseline
Mean: 1176.780 ms
Stdev: 29.619 ms (2.5%)
Runs: 1120.9787630001083 1127.4623159999028 1128.0968909999356 1129.3202459998429 1132.5897929999046 1133.3210149998777 1133.7123850001954 1139.6113660000265 1145.4639079999179 1146.0498629999347 1146.5299909999594 1151.1000290000811 1151.6593590001576 1157.5125919999555 1158.290374000091 1158.9172809999436 1159.624423999805 1161.4046720000915 1163.0755420001224 1164.3024539998733 1164.369657999836 1165.993773000082 1166.2175759999081 1168.6726999999955 1171.6664419998415 1175.6896480000578 1178.3280520001426 1178.792053999845 1180.5619910000823 1181.1247820002027 1182.5933059998788 1182.7296159998514 1183.582841000054 1186.0031260000542 1186.5436709998176 1187.4738540002145 1187.6498690000735 1188.1360490000807 1189.75347399991 1190.637037999928 1193.0866290000267 1196.4785020002164 1196.969986999873 1198.2086600000039 1198.2096899999306 1198.3325020000339 1201.2695369999856 1204.816581999883 1211.6298489999026 1218.811063000001 1219.0190269998275 1219.047509000171 1222.8703820002265 1227.5901000001468 1233.6339119998738 1254.1865220000036

Current
Mean: 1255.489 ms
Stdev: 42.290 ms (3.4%)
Runs: 1168.6195699999807 1184.786669000052 1193.7176429999527 1196.0375510000158 1197.9958920000354 1198.2480750000104 1199.5745040000184 1202.6970580000198 1207.1806830000132 1211.1297179999528 1217.9919470000314 1219.1016410000157 1221.4536279999884 1222.0568709999789 1222.0929829999804 1224.1289760000072 1224.1905040000565 1224.6929389999714 1227.9475730000995 1230.1799119999632 1234.837038999889 1239.9069720000261 1244.42167099996 1248.9055439999793 1250.692211000016 1251.2226739999605 1252.7231799999718 1253.9107359999325 1255.8104049999965 1256.7081539999926 1257.774126000004 1258.7974179999437 1267.6554610000458 1269.110869999975 1271.7896199999377 1271.8357770000584 1272.6031540000113 1273.855351000093 1274.615122999996 1278.555136000039 1278.7161409999244 1279.497607999947 1279.5923329999205 1280.5399510000134 1283.7644650000148 1284.8367360000266 1292.8285709999036 1296.9265449999366 1300.9347830000333 1306.017317000078 1306.5062819999876 1311.9166369999293 1312.6326959999278 1321.646191000007 1341.5962720001116 1347.0208829999901 1358.35255099996
App start runJsBundle Baseline
Mean: 805.350 ms
Stdev: 30.617 ms (3.8%)
Runs: 738 756 756 758 764 766 766 770 772 773 774 774 777 777 780 780 781 785 787 789 792 794 797 800 800 801 804 804 805 805 805 807 807 810 812 814 816 817 818 819 819 823 824 824 824 825 829 832 832 833 834 838 838 839 840 846 847 851 879 894

Current
Mean: 878.534 ms
Stdev: 41.524 ms (4.7%)
Runs: 781 785 788 809 814 817 824 834 837 840 843 843 846 848 854 860 862 865 866 869 873 874 876 876 877 878 878 879 880 880 881 885 886 888 889 890 890 893 894 897 897 897 897 900 903 903 908 911 914 916 921 924 930 943 951 957 966 968

Meaningless Changes To Duration

Show entries
Name Duration
Open Search Page TTI 691.362 ms → 713.596 ms (+22.234 ms, +3.2%)
App start regularAppStart 0.014 ms → 0.015 ms (+0.001 ms, +7.2%)
App start nativeLaunch 22.271 ms → 20.537 ms (-1.734 ms, -7.8%)
Show details
Name Duration
Open Search Page TTI Baseline
Mean: 691.362 ms
Stdev: 33.837 ms (4.9%)
Runs: 635.4992680000141 647.2286789999343 648.3342689997517 648.5614420003258 651.0676679997705 651.1746829999611 652.7612310000695 652.9966230001301 653.5537930000573 654.5842699999921 655.4123539999127 659.5097659998573 661.1646730001085 663.3667810000479 668.7828779998235 669.519328000024 670.5997319999151 671.2928470000625 671.3741059997119 671.6041259998456 671.7856850000098 671.96875 671.9984540003352 672.3774009998888 674.9214269998483 677.7236739997752 678.3185220002197 685.156942000147 686.7095139999874 689.423014999833 690.3246659999713 692.500163000077 693.3867599996738 697.9243570002727 700.0916340001859 701.021891000215 702.3079429999925 704.3549000001512 705.3900150000118 705.6118979998864 707.3289799997583 707.787313000299 710.1965739997104 710.4495439999737 710.7976079997607 714.0513920001686 714.4627690003254 715.1547039998695 718.0983080002479 720.3803309998475 736.3769530002028 736.9116219999269 741.8519290001132 742.7299810000695 766.8092040000483 768.508911000099 771.7734789997339 773.6672370000742

Current
Mean: 713.596 ms
Stdev: 36.787 ms (5.2%)
Runs: 636.613688999787 653.4128420001362 656.7337650000118 661.5432949999813 666.5033369997982 668.0924889999442 669.6886800001375 670.3426920000929 673.4484860000666 676.2085779998451 677.2267259999644 678.131876999978 678.3640950000845 684.0858559999615 687.5026860001963 688.9823409998789 691.3192959998269 691.576864000177 694.7985439999029 694.8099779998884 695.3291829999071 695.7771809999831 697.9481200000737 699.4514980001841 699.928549000062 701.2422279999591 702.3670249998104 703.2876790000591 704.411540000001 706.9028730001301 706.9302570000291 709.079061999917 713.333578000078 718.0871590001043 719.1964930000249 720.9170330001507 722.987712000031 723.1746830001939 723.8632819999475 724.2342530000024 726.4842530000024 728.8236899999902 728.9033610001206 729.0378430001438 729.8219410001766 738.037760999985 739.2125250000972 741.4530849999283 743.2583419999573 746.192260999931 746.2250980001409 748.8719489998184 755.9229739999864 756.5983890001662 766.01367200003 774.0920009999536 776.2469899998978 781.1360269999132 790.0908619998954 793.7043459999841 801.4175619999878
App start regularAppStart Baseline
Mean: 0.014 ms
Stdev: 0.001 ms (5.2%)
Runs: 0.012858000118285418 0.013142999960109591 0.01318400027230382 0.013264999957755208 0.013346000108867884 0.01334700034931302 0.013426999561488628 0.013427000027149916 0.013427999801933765 0.013427999801933765 0.0134680001065135 0.013508999953046441 0.013509000185877085 0.01358999963849783 0.01359100011177361 0.013672000030055642 0.013753000181168318 0.013753000181168318 0.013876000419259071 0.013916000025346875 0.013957000337541103 0.013996999710798264 0.01399700017645955 0.0139979999512434 0.014038000255823135 0.014078999869525433 0.01411899970844388 0.014119000174105167 0.014160000020638108 0.014241000171750784 0.014241999946534634 0.014241999946534634 0.014281999785453081 0.014282000251114368 0.014283000025898218 0.014322999864816666 0.01436399994418025 0.014403999783098698 0.014404000248759985 0.014567000325769186 0.014607999939471483 0.014730000402778387 0.014771000016480684 0.014810999855399132 0.01501399977132678 0.015015000011771917 0.015056000091135502 0.015096000395715237 0.015136000234633684 0.015137000009417534 0.015218000393360853 0.015381000004708767 0.01554399961605668 0.015625 0.015949999913573265 0.015951000154018402

Current
Mean: 0.015 ms
Stdev: 0.001 ms (6.4%)
Runs: 0.013142999960109591 0.013589999987743795 0.013875999953597784 0.013956999871879816 0.01395700010471046 0.014200999983586371 0.014242000062949955 0.014282000018283725 0.014282000018283725 0.014282000018283725 0.014282000018283725 0.01432300009764731 0.01436399994418025 0.01436399994418025 0.014445000095292926 0.01456699997652322 0.01456699997652322 0.014607999939471483 0.014689000090584159 0.014689000090584159 0.014689000090584159 0.014730000053532422 0.014850999927148223 0.014851999934762716 0.014892000006511807 0.014973999932408333 0.015014000004157424 0.015015000011771917 0.01509599993005395 0.015176999848335981 0.015176999964751303 0.015176999964751303 0.015177000081166625 0.01525900000706315 0.01525900000706315 0.015298999845981598 0.01546200003940612 0.015542999957688153 0.015625 0.015625 0.01566499995533377 0.015706000151112676 0.015706999925896525 0.015746999997645617 0.015828999923542142 0.015909999958239496 0.016112999990582466 0.016153999837115407 0.01615400006994605 0.016275999951176345 0.01631700003053993 0.016398000065237284 0.01651999994646758 0.016642999835312366 0.016682999907061458 0.016765000065788627 0.01688600005581975 0.01692699990235269 0.017293000011704862 0.01774100004695356
App start nativeLaunch Baseline
Mean: 22.271 ms
Stdev: 2.803 ms (12.6%)
Runs: 18 19 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 21 21 21 21 21 22 22 22 22 22 22 22 22 22 23 23 24 24 24 24 25 25 26 26 26 27 27 27 27 28 28 28 29

Current
Mean: 20.537 ms
Stdev: 1.487 ms (7.2%)
Runs: 18 18 18 19 19 19 19 19 19 19 19 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 21 21 21 21 22 22 22 22 22 22 22 23 23 23 23 23 23 24

@github-actions
Copy link
Copy Markdown
Contributor

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

@roryabraham
Copy link
Copy Markdown
Contributor

No way this has any impact on performance. Unfortunately we're seeing some false positives on these performance regression tests

@OSBotify
Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 1.3.93-0 🚀

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

@OSBotify
Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.93-1 🚀

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

@OSBotify
Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 1.3.94-0 🚀

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

1 similar comment
@OSBotify
Copy link
Copy Markdown
Contributor

OSBotify commented Nov 1, 2023

🚀 Deployed to staging by https://github.com/roryabraham in version: 1.3.94-0 🚀

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

@OSBotify
Copy link
Copy Markdown
Contributor

OSBotify commented Nov 2, 2023

🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.94-2 🚀

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