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

Update formatting per prettier #30519

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Update formatting per prettier #30519

merged 1 commit into from
Oct 27, 2023

Conversation

amyevans
Copy link
Contributor

Details

Fixed Issues

https://expensify.slack.com/archives/C03V9A4TB/p1698417435867999

Tests

None

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

None

  • 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

N/A, just a lint fix

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

@amyevans amyevans self-assigned this Oct 27, 2023
@amyevans amyevans requested a review from a team as a code owner October 27, 2023 14:44
@melvin-bot melvin-bot bot requested review from stitesExpensify and removed request for a team October 27, 2023 14:45
@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

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

@stitesExpensify
Copy link
Contributor

stitesExpensify commented Oct 27, 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: mWeb Chrome
    • iOS: Native
    • iOS: mWeb 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 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 reviewer 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

@stitesExpensify stitesExpensify merged commit 93d7191 into main Oct 27, 2023
8 of 9 checks passed
@stitesExpensify stitesExpensify deleted the amy-run-prettier branch October 27, 2023 15:04
@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 github-actions bot added the DeployBlockerCash This issue or pull request should block deployment label Oct 27, 2023
@github-actions
Copy link
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

Name Duration
App start TTI 1162.650 ms → 1225.831 ms (+63.181 ms, +5.4%) 🔴
App start runJsBundle 809.483 ms → 861.949 ms (+52.466 ms, +6.5%) 🔴
Show details
Name Duration
App start TTI Baseline
Mean: 1162.650 ms
Stdev: 39.567 ms (3.4%)
Runs: 1060.1044080001302 1098.6415849998593 1102.854877000209 1104.2164570000023 1107.210591999814 1110.7244339999743 1117.8549500000663 1121.0934060001746 1122.3278399999253 1126.1661539999768 1130.3757690000348 1130.3998639998026 1131.2415660000406 1132.5832759998739 1133.5656380001456 1134.4355259998702 1136.3111189999618 1136.7034519999288 1138.9911050000228 1140.6605369998142 1141.4624279998243 1145.447840000037 1147.8349419999868 1148.4039509999566 1149.819782000035 1149.8378559998237 1150.4136970001273 1152.4079559999518 1154.028636999894 1157.8515050001442 1161.8283370002173 1162.6660239999183 1163.8733479999937 1164.2183480001986 1164.845466000028 1166.3823170000687 1171.8841730002314 1175.058660000097 1177.0258820001036 1179.015393000096 1179.0995829999447 1180.1017880002037 1184.1381569998339 1184.8185749999247 1189.5506500001065 1189.9896829999052 1190.2283540000208 1197.7851860001683 1202.462605000008 1206.0002959999256 1206.1414319998585 1217.1326580001041 1217.3892769999802 1218.485998999793 1220.1018130001612 1224.2708029998466 1227.9404429998249 1234.2648470001295 1239.1103389998898 1249.2122269999236

Current
Mean: 1225.831 ms
Stdev: 38.217 ms (3.1%)
Runs: 1154.2213059999049 1164.3385620005429 1166.112730000168 1166.8894359990954 1170.2326740007848 1173.4332819990814 1174.2883460000157 1181.263126000762 1181.6196890007704 1182.7825910001993 1186.7063500005752 1187.4539390001446 1190.5806409996003 1190.5887770000845 1192.8350719995797 1195.0366259999573 1196.590013999492 1201.6413690000772 1202.504484999925 1202.5647519994527 1202.7760790009052 1203.2183800004423 1204.817996000871 1210.9082190003246 1217.2808870002627 1217.8869059998542 1221.3505579996854 1228.3185399994254 1229.6981210000813 1231.7220910005271 1235.309675000608 1235.5716130007058 1236.2049100007862 1237.0240950006992 1237.661050999537 1238.9607289992273 1239.4706939999014 1240.6004360001534 1243.199418000877 1245.8046339992434 1247.7689420003444 1248.1348250005394 1249.1246150005609 1251.0850310008973 1251.5877119991928 1253.665366999805 1255.7132660001516 1257.861154999584 1259.0066589992493 1261.7375559993088 1269.5333309993148 1271.7343090008944 1277.1705740001053 1277.2773710004985 1281.6108160000294 1283.6881889998913 1287.8442640006542 1295.0976500008255 1324.9345410000533
App start runJsBundle Baseline
Mean: 809.483 ms
Stdev: 30.341 ms (3.7%)
Runs: 742 763 766 768 769 770 772 774 775 777 778 781 782 782 782 784 785 792 792 796 797 797 798 798 800 801 802 802 808 810 813 814 815 815 815 818 818 819 822 822 826 826 826 826 827 830 830 830 831 832 842 843 845 847 849 849 856 864 881 895

Current
Mean: 861.949 ms
Stdev: 30.930 ms (3.6%)
Runs: 791 800 811 815 816 819 825 830 830 831 832 836 839 839 839 842 844 844 845 848 848 848 849 852 858 858 858 860 861 861 862 863 868 868 868 871 871 873 873 874 878 879 880 880 880 883 883 887 892 894 895 896 898 900 907 919 922 929 933

Meaningless Changes To Duration

Show entries
Name Duration
Open Search Page TTI 722.410 ms → 723.048 ms (+0.638 ms, ±0.0%)
App start nativeLaunch 21.103 ms → 21.397 ms (+0.293 ms, +1.4%)
App start regularAppStart 0.014 ms → 0.015 ms (+0.001 ms, +5.9%)
Show details
Name Duration
Open Search Page TTI Baseline
Mean: 722.410 ms
Stdev: 52.568 ms (7.3%)
Runs: 633.1668699998409 640.8107099998742 642.0165210003033 647.6121829999611 654.0404869997874 655.8168540000916 656.9992279997095 660.1477870000526 662.3290210003033 663.8536380003206 666.1122229998 670.3453370002098 670.9851480000652 676.4077560002916 677.1396079999395 681.3307300000452 684.785279000178 686.1171869998798 686.610840999987 686.791993000079 687.5072840000503 689.8211680003442 698.1355800000019 700.9345709998161 702.3858650000766 704.925904000178 708.0887449998409 711.156576000154 715.2853599996306 716.9391280002892 717.0163579997607 719.8491219999269 720.5083829998039 725.1606040000916 725.2128509995528 730.4108479996212 732.5362149998546 739.9228929998353 742.1895750002004 745.4974770001136 746.1073409998789 750.355508999899 752.6052250000648 754.6183680002578 758.8843999998644 764.3880620002747 764.5079349996522 764.7495120000094 765.1903490000404 766.728190000169 779.6835949998349 788.6665449999273 788.8981130002066 789.3206790001132 790.0341799999587 793.6200769999996 802.666300999932 805.6450199997053 809.4330239999108 840.4572350000963 853.5234779999591

Current
Mean: 723.048 ms
Stdev: 46.235 ms (6.4%)
Runs: 637.3250320013613 641.7541910000145 649.9785150010139 653.4957280009985 654.4517420008779 665.7349849995226 666.2725430000573 669.1884360015392 669.7708339989185 672.3840339984745 673.0417889989913 675.8148199990392 675.9561359994113 677.2932129986584 681.0794280003756 681.6935630012304 682.4130860008299 687.8851319998503 699.4243569988757 699.9762779995799 700.4699720013887 702.7378739994019 707.2199310008436 708.7478839997202 709.1318769995123 713.3846439998597 713.8783369995654 716.6837159991264 723.2874759994447 723.503907000646 723.8824060000479 725.422322999686 725.5219330005348 726.0800780002028 729.8544109985232 731.0996100008488 734.5812989994884 739.4146330002695 740.7780360002071 742.1363120004535 743.391235999763 744.3292239997536 745.1165369991213 746.8471279982477 748.4857180006802 752.4334309995174 753.0982670001686 759.3764650002122 768.2735599987209 770.7429610006511 771.1815189998597 777.503418000415 780.160726999864 781.0739339999855 783.0615239981562 788.7483320012689 791.9330649990588 795.2179369982332 798.1958820000291 816.2431230004877 837.7700200006366
App start nativeLaunch Baseline
Mean: 21.103 ms
Stdev: 2.123 ms (10.1%)
Runs: 18 18 18 19 19 19 19 19 19 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 21 22 22 22 22 22 22 22 22 23 23 23 23 23 24 24 24 24 25 26 27 27

Current
Mean: 21.397 ms
Stdev: 2.117 ms (9.9%)
Runs: 18 18 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 21 22 22 22 22 22 22 22 22 22 23 23 23 23 23 24 24 24 24 26 26 26 27 27
App start regularAppStart Baseline
Mean: 0.014 ms
Stdev: 0.001 ms (4.7%)
Runs: 0.012898999731987715 0.013061999808996916 0.013062000274658203 0.01310200011357665 0.013143000192940235 0.013183999806642532 0.0133050000295043 0.013387000188231468 0.013549999799579382 0.01358999963849783 0.013590999878942966 0.013590999878942966 0.013631000183522701 0.013671000022441149 0.013711999636143446 0.013711999636143446 0.013753000181168318 0.013793999794870615 0.01383400009945035 0.0138349998742342 0.013874999713152647 0.013875000178813934 0.013916000258177519 0.014037999790161848 0.014038000255823135 0.014038000255823135 0.014078999869525433 0.014078999869525433 0.014078999869525433 0.014119000174105167 0.014119999948889017 0.014160000253468752 0.0142000000923872 0.014240999706089497 0.014241000171750784 0.014281999785453081 0.014322999864816666 0.014322999864816666 0.01436399994418025 0.014444999862462282 0.014444999862462282 0.014485999941825867 0.014566999860107899 0.014607999939471483 0.014607999939471483 0.014648000244051218 0.014689000323414803 0.0147299999371171 0.014892000239342451 0.014973999932408333 0.015054999850690365 0.015054999850690365 0.015055000316351652 0.015298999845981598 0.01537999976426363 0.015463000163435936 0.015503000002354383 0.015585000161081553

Current
Mean: 0.015 ms
Stdev: 0.001 ms (7.6%)
Runs: 0.012939998880028725 0.013060998171567917 0.013426998630166054 0.013426998630166054 0.013589998707175255 0.013631001114845276 0.013671999797224998 0.013671999797224998 0.0138349998742342 0.013875000178813934 0.013915998861193657 0.013916000723838806 0.013996999710798264 0.0139979999512434 0.014038000255823135 0.014160001650452614 0.014201000332832336 0.014201000332832336 0.014242000877857208 0.014322999864816666 0.01448499970138073 0.014527000486850739 0.014527000486850739 0.014566998928785324 0.014649000018835068 0.014649000018835068 0.014689000323414803 0.014851000159978867 0.014852000400424004 0.01505499891936779 0.015135999768972397 0.015135999768972397 0.015137000009417534 0.015137000009417534 0.015177000313997269 0.015217998996376991 0.015298999845981598 0.015298999845981598 0.01533999852836132 0.015421001240611076 0.015463000163435936 0.015502998605370522 0.015625 0.015625 0.016071999445557594 0.016112999990582466 0.016114000231027603 0.016234999522566795 0.016276000067591667 0.016316000372171402 0.01643899828195572 0.016439000144600868 0.016560999676585197 0.016642998903989792 0.016682999208569527 0.01672299951314926 0.017537999898195267 0.01822900027036667

@github-actions
Copy link
Contributor

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

@amyevans amyevans removed the DeployBlockerCash This issue or pull request should block deployment label Oct 27, 2023
@amyevans
Copy link
Contributor Author

Lies

@OSBotify
Copy link
Contributor

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

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

@OSBotify
Copy link
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
Contributor

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

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

1 similar comment
@OSBotify
Copy link
Contributor

OSBotify commented Nov 1, 2023

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

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

@OSBotify
Copy link
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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants