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

Adding some helpful documentation #13746

Merged
merged 2 commits into from
Dec 20, 2022
Merged

Conversation

Luke9389
Copy link
Contributor

@Luke9389 Luke9389 commented Dec 20, 2022

Details

Fixed Issues

Slack Convo: https://expensify.slack.com/archives/C01GTK53T8Q/p1671572009309639

Tests

  • Verify that no errors appear in the JS console

Verify that the README.md includes info about Android Chrome emulator troubleshooting.

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

@Luke9389 Luke9389 self-assigned this Dec 20, 2022
@Luke9389 Luke9389 requested a review from a team as a code owner December 20, 2022 22:48
@melvin-bot melvin-bot bot requested review from tgolen and removed request for a team December 20, 2022 22:48
@melvin-bot
Copy link

melvin-bot bot commented Dec 20, 2022

@tgolen 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.

LGTM! Thanks for adding this!

@luacmartins
Copy link
Contributor

luacmartins commented Dec 20, 2022

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

N/A since it only affects the readme.

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

@luacmartins
Copy link
Contributor

Merging since it's a simple readme change

@luacmartins luacmartins merged commit 5265b5b into main Dec 20, 2022
@luacmartins luacmartins deleted the luke-add-documentation-help-site branch December 20, 2022 23:09
@OSBotify
Copy link
Contributor

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

@github-actions
Copy link
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Duration
TTI 825.958 ms → 847.822 ms (+21.864 ms, +2.6%)
runJsBundle 194.969 ms → 197.406 ms (+2.438 ms, +1.3%)
nativeLaunch 9.688 ms → 10.097 ms (+0.409 ms, +4.2%)
regularAppStart 0.015 ms → 0.015 ms (+0.001 ms, +4.7%)
Show details
Name Duration
TTI Baseline
Mean: 825.958 ms
Stdev: 36.117 ms (4.4%)
Runs: 752.6235379995778 759.8414420001209 772.1878909999505 784.7152490001172 788.4306600000709 794.479461000301 795.4100069999695 800.3077060002834 805.378216999583 807.8260540002957 817.3140289997682 818.2761960001662 824.4994909996167 824.602411000058 825.7269419999793 826.3520619999617 834.80603899993 836.5875009996817 841.0477109998465 841.5504769999534 852.4169180002064 852.6063390001655 852.7578790001571 855.5597480004653 855.8931350000203 862.5462649995461 871.7979939999059 893.929596000351 903.3053430002183

Current
Mean: 847.822 ms
Stdev: 32.685 ms (3.9%)
Runs: 793.4491870002821 797.2920519998297 804.8400130001828 805.6321259997785 808.5876879999414 810.3190710004419 818.6254190001637 820.2507939999923 829.7330299997702 830.0606570001692 832.7572809997946 834.1093250000849 834.7412630002946 837.4302110001445 840.1503189997748 841.2377690002322 852.1032309997827 856.4258059998974 858.5460280003026 858.7818419998512 862.5978730004281 864.0915790004656 870.5561979999766 872.2424240000546 874.0888409996405 880.883829000406 882.9786529997364 885.8899360001087 894.0222749998793 900.466149000451 929.5830309996381
runJsBundle Baseline
Mean: 194.969 ms
Stdev: 18.984 ms (9.7%)
Runs: 161 167 173 175 176 177 177 180 182 184 184 186 186 188 190 190 191 193 194 197 198 199 204 208 208 216 218 219 227 227 231 233

Current
Mean: 197.406 ms
Stdev: 19.370 ms (9.8%)
Runs: 173 174 178 179 180 181 181 182 183 183 184 186 187 187 189 189 190 192 194 198 198 202 208 212 212 215 217 222 222 233 242 244
nativeLaunch Baseline
Mean: 9.688 ms
Stdev: 1.895 ms (19.6%)
Runs: 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 10 10 10 11 11 11 11 11 12 12 13 14 15

Current
Mean: 10.097 ms
Stdev: 2.263 ms (22.4%)
Runs: 7 7 8 8 8 8 8 8 9 9 9 9 9 9 9 9 10 10 10 10 10 11 11 12 12 12 13 13 14 15 16
regularAppStart Baseline
Mean: 0.015 ms
Stdev: 0.001 ms (6.7%)
Runs: 0.012938999570906162 0.012939000502228737 0.0133050000295043 0.013345999643206596 0.01358999963849783 0.01358999963849783 0.013712000101804733 0.013794000260531902 0.013956999406218529 0.014038000255823135 0.014078999869525433 0.014322999864816666 0.014404000714421272 0.014444999396800995 0.014526999555528164 0.014566999860107899 0.014648000709712505 0.014729000627994537 0.0148930000141263 0.0148930000141263 0.014973999932408333 0.014973999932408333 0.015014000236988068 0.015341000631451607 0.015421000309288502 0.01566499937325716 0.015705999918282032 0.015705999918282032 0.01607299968600273 0.016195000149309635 0.0163569999858737 0.016682999208569527

Current
Mean: 0.015 ms
Stdev: 0.001 ms (6.3%)
Runs: 0.0138349998742342 0.013916000723838806 0.0139979999512434 0.014282000251114368 0.014364000409841537 0.014405000023543835 0.014485999941825867 0.014525999315083027 0.01464799977838993 0.014810999855399132 0.014810999855399132 0.014933000318706036 0.014973999932408333 0.015054999850690365 0.015177000313997269 0.015177000313997269 0.015258999541401863 0.01537999976426363 0.015461999922990799 0.015502999536693096 0.015666000545024872 0.015747000463306904 0.015828999690711498 0.015868999995291233 0.016032000072300434 0.016193999908864498 0.01660200022161007 0.01680499967187643 0.016927000135183334 0.017251999117434025 0.01766000036150217

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @luacmartins in version: 1.2.43-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @chiragsalian in version: 1.2.43-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.

3 participants