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

[NoQA] From docs refactor #28627

Merged

Conversation

kowczarz
Copy link
Contributor

@kowczarz kowczarz commented Oct 2, 2023

Details

Fixed Issues

$ #25397

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 / 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 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

Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android

@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

@kowczarz kowczarz marked this pull request as ready for review October 3, 2023 12:44
@kowczarz kowczarz requested a review from a team as a code owner October 3, 2023 12:44
@melvin-bot melvin-bot bot requested review from techievivek and removed request for a team October 3, 2023 12:44
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

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

Copy link
Contributor

@luacmartins luacmartins left a comment

Choose a reason for hiding this comment

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

Changes LGTM. Let's link this PR to the appropriate issue #25397

@luacmartins
Copy link
Contributor

luacmartins commented Oct 3, 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 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

N/A readme and story changes only

Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android

@luacmartins luacmartins merged commit 5b3e9ab into Expensify:main Oct 3, 2023
14 of 15 checks passed
@OSBotify
Copy link
Contributor

OSBotify commented Oct 3, 2023

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@mountiny mountiny changed the title From docs refactor [NoQA] From docs refactor Oct 3, 2023
@OSBotify
Copy link
Contributor

OSBotify commented Oct 3, 2023

🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.77-1 🚀

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

@github-actions github-actions bot added the DeployBlockerCash This issue or pull request should block deployment label Oct 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

Performance Comparison Report 📊

Significant Changes To Duration

Name Duration
App start runJsBundle 822.379 ms → 876.781 ms (+54.402 ms, +6.6%) 🔴
App start TTI 1196.663 ms → 1250.410 ms (+53.747 ms, +4.5%)
Show details
Name Duration
App start runJsBundle Baseline
Mean: 822.379 ms
Stdev: 27.264 ms (3.3%)
Runs: 776 783 783 785 786 793 804 807 808 810 813 814 819 819 822 824 825 827 828 832 836 837 841 847 849 859 868 877 877

Current
Mean: 876.781 ms
Stdev: 30.776 ms (3.5%)
Runs: 826 830 835 839 840 841 843 847 856 858 860 866 867 869 869 872 874 875 878 879 884 894 901 904 907 908 915 918 921 923 929 929
App start TTI Baseline
Mean: 1196.663 ms
Stdev: 40.508 ms (3.4%)
Runs: 1114.914466000162 1134.8611829997972 1144.8154460000806 1151.8292319998145 1153.975424000062 1164.9312149998732 1164.9406200000085 1170.1660819998942 1172.4576420001686 1173.8859910001047 1177.5398710002191 1177.5914349998347 1180.291445999872 1181.1769409999251 1184.962086000014 1189.1378979999572 1189.8704800000414 1193.592083999887 1201.4186229999177 1208.550956999883 1213.1134100002237 1225.230398000218 1229.0185259999707 1229.8098439997993 1231.264890999999 1234.5597279998474 1235.693740000017 1245.24368399987 1252.5396250002086 1280.0557110002264 1289.1191099998541

Current
Mean: 1250.410 ms
Stdev: 41.747 ms (3.3%)
Runs: 1144.5551550001837 1188.6669239997864 1202.5086840000004 1203.9277699999511 1218.896575000137 1222.2046929998323 1223.2530390000902 1224.33367000008 1224.5220289998688 1229.2359690000303 1231.9252169998363 1239.3849920001812 1239.7342739999294 1241.4170160000212 1243.3714479999617 1244.331819999963 1244.3834529998712 1246.474276999943 1249.031531999819 1249.2972599999048 1249.6703610001132 1256.83805700019 1259.9033920001239 1268.871052000206 1276.9554860000499 1292.2595990002155 1292.859604000114 1299.740635999944 1306.4147549998015 1314.9995519998483 1335.33689900022 1347.8124859998934

Meaningless Changes To Duration

Show entries
Name Duration
Open Search Page TTI 614.661 ms → 628.131 ms (+13.470 ms, +2.2%)
App start nativeLaunch 20.167 ms → 20.828 ms (+0.661 ms, +3.3%)
App start regularAppStart 0.018 ms → 0.018 ms (+0.000 ms, +0.6%)
Show details
Name Duration
Open Search Page TTI Baseline
Mean: 614.661 ms
Stdev: 25.363 ms (4.1%)
Runs: 572.6901859999634 580.6745609999634 587.9679769999348 588.4868580000475 590.7948409998789 591.500489000231 591.6030269996263 595.5693360003643 595.7942710001953 597.082438999787 598.7650150000118 600.7332359999418 602.1466879998334 607.3345949999057 607.7490650000982 608.750163000077 612.1838790001348 614.0070800003596 617.5451660002582 621.4882809999399 623.2281090002507 624.2339690001681 627.6160480002873 629.1554359998554 630.1274820002727 637.5981040000916 641.9047449999489 658.2139889998361 660.1385089997202 663.1993819996715 676.2076420001686

Current
Mean: 628.131 ms
Stdev: 22.822 ms (3.6%)
Runs: 598.3814300000668 599.2210289998911 599.4740000003949 605.1702880002558 606.4418540000916 606.5989179997705 607.3076989999972 608.1075849998742 610.5357669997029 614.5730800000019 616.1380620002747 617.3329269997776 620.993652000092 622.1419270001352 623.2787679997273 623.8341470002197 626.7449140003882 626.9296070002019 627.7574470001273 627.7976889996789 627.8013920001686 628.9240319998935 629.1582439998165 630.6486419998109 636.8797610001639 646.006713999901 653.0108650000766 661.0804030001163 667.7169599998742 669.8215330000967 672.8149820002727 687.5613609999418
App start nativeLaunch Baseline
Mean: 20.167 ms
Stdev: 1.035 ms (5.1%)
Runs: 18 19 19 19 19 19 19 19 19 20 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 21 22 22 22

Current
Mean: 20.828 ms
Stdev: 1.641 ms (7.9%)
Runs: 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 20 21 21 21 22 22 22 22 22 23 23 24 26
App start regularAppStart Baseline
Mean: 0.018 ms
Stdev: 0.001 ms (5.9%)
Runs: 0.0148930000141263 0.015829000156372786 0.016112999990582466 0.016439000144600868 0.016642000060528517 0.0166830001398921 0.016844999976456165 0.01704900013282895 0.0170499999076128 0.017090000212192535 0.017212000209838152 0.0172520000487566 0.01725299982354045 0.01749700028449297 0.017537000123411417 0.017538000363856554 0.01766000036150217 0.017740999814122915 0.017903000116348267 0.01798499980941415 0.0181470001116395 0.01822899980470538 0.018352000042796135 0.01839200034737587 0.018757999874651432 0.019003000110387802 0.01920600002631545 0.019287999719381332 0.01932699978351593

Current
Mean: 0.018 ms
Stdev: 0.001 ms (6.1%)
Runs: 0.016032000072300434 0.01615400006994605 0.01639900030568242 0.016478999983519316 0.016479999758303165 0.016561000142246485 0.01672299997881055 0.016805000137537718 0.016805000137537718 0.01696799974888563 0.0172520000487566 0.01725299982354045 0.017374000046402216 0.017374000046402216 0.017375000286847353 0.017495999578386545 0.017537999898195267 0.017659000121057034 0.017822000198066235 0.017862999811768532 0.01794400019571185 0.017985000275075436 0.018025999888777733 0.01831099996343255 0.018391999881714582 0.018432999961078167 0.018920999951660633 0.019246000330895185 0.019611999858170748 0.0197759997099638 0.020426999777555466

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

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

@luacmartins
Copy link
Contributor

I'm not sure how doc and storybook changes would have caused a performance regression in App. Removing blocker label.

@luacmartins luacmartins removed the DeployBlockerCash This issue or pull request should block deployment label Oct 3, 2023
@OSBotify
Copy link
Contributor

OSBotify commented Oct 5, 2023

🚀 Deployed to production by https://github.com/mountiny in version: 1.3.77-7 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Oct 6, 2023

🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.79-0 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Oct 9, 2023

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Oct 9, 2023

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Oct 9, 2023

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 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.

5 participants