Skip to content

Add label check#13726

Merged
AndrewGable merged 4 commits into
Expensify:mainfrom
staszekscp:add-label-check
Dec 28, 2022
Merged

Add label check#13726
AndrewGable merged 4 commits into
Expensify:mainfrom
staszekscp:add-label-check

Conversation

@staszekscp

Copy link
Copy Markdown
Contributor

Details

As per discussion with @AndrewGable a label check was added in order to have an opportunity to mark a PR as Ready To Build to allow building apps from it.

Fixed Issues

$ GH_LINK
PROPOSAL: GH_LINK_ISSUE(COMMENT)

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

@staszekscp staszekscp requested a review from a team as a code owner December 20, 2022 13:31
@melvin-bot melvin-bot Bot requested review from robertjchen and removed request for a team December 20, 2022 13:31
@melvin-bot

melvin-bot Bot commented Dec 20, 2022

Copy link
Copy Markdown

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

robertjchen
robertjchen previously approved these changes Dec 21, 2022

@robertjchen robertjchen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, though I think re-naming the var to match the label would help with consistency 👍

Comment thread .github/workflows/testBuild.yml Outdated
Comment thread .github/workflows/testBuild.yml Outdated

@AndrewGable AndrewGable left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agree with @robertjchen's suggestion, otherwise looks good!

@AndrewGable

AndrewGable commented Dec 28, 2022

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 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 - GitHub Actions change

@AndrewGable AndrewGable merged commit debe176 into Expensify:main Dec 28, 2022
@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

Copy link
Copy Markdown
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Duration
TTI 814.946 ms → 846.323 ms (+31.377 ms, +3.9%)
runJsBundle 186.969 ms → 197.000 ms (+10.031 ms, +5.4%)
nativeLaunch 9.806 ms → 10.531 ms (+0.725 ms, +7.4%)
regularAppStart 0.014 ms → 0.015 ms (+0.001 ms, +3.5%)
Show details
Name Duration
TTI Baseline
Mean: 814.946 ms
Stdev: 37.466 ms (4.6%)
Runs: 755.4718829998747 763.5362330004573 766.898307999596 772.6642000004649 773.9301260001957 777.5527109997347 786.5784930000082 787.8606639998034 789.0506349997595 793.3401110004634 794.8317200001329 795.1266249995679 805.319171000272 805.4706089999527 805.7642299998552 809.7555999998003 812.2128710001707 817.8946380000561 823.7030480001122 824.6617149999365 825.4680770002306 827.1806450001895 827.7603709995747 835.921653999947 841.1824629995972 846.1696020001546 847.6667409995571 867.6552020004019 881.4016019999981 881.6710909996182 919.6294309999794

Current
Mean: 846.323 ms
Stdev: 41.427 ms (4.9%)
Runs: 783.4789500003681 785.4612320000306 792.2361289998516 792.7324879998341 797.5367259997874 799.7056400002912 800.9423369998112 802.3850809996948 806.7997869998217 812.7535979999229 821.1915450002998 829.1532410001382 830.6508680004627 831.3015350000933 831.9048049999401 853.5584859997034 855.9476229995489 859.7833869997412 866.3054349999875 867.2737720003352 870.070445000194 873.2616309998557 876.4663829999045 880.8851789999753 886.8180210003629 889.4450249997899 900.7442760001868 906.4120129998773 907.9334019999951 909.2965080002323 913.5800160001963
runJsBundle Baseline
Mean: 186.969 ms
Stdev: 19.382 ms (10.4%)
Runs: 155 163 164 165 167 167 169 172 175 176 177 177 180 181 181 182 184 186 187 187 187 191 191 196 199 208 209 212 217 218 224 236

Current
Mean: 197.000 ms
Stdev: 22.091 ms (11.2%)
Runs: 165 167 168 169 177 177 177 178 179 182 186 186 189 189 190 191 194 195 198 199 199 203 207 207 209 216 224 227 233 239 242 242
nativeLaunch Baseline
Mean: 9.806 ms
Stdev: 1.490 ms (15.2%)
Runs: 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 11 11 11 11 11 12 12 13 14

Current
Mean: 10.531 ms
Stdev: 2.076 ms (19.7%)
Runs: 8 8 8 8 8 8 9 9 9 9 9 9 10 10 10 10 10 10 11 11 11 11 12 12 12 12 12 13 13 15 15 15
regularAppStart Baseline
Mean: 0.014 ms
Stdev: 0.001 ms (6.9%)
Runs: 0.012817000038921833 0.012858000583946705 0.012939000502228737 0.01318300049751997 0.013306000269949436 0.013346999883651733 0.01375299971550703 0.013875000178813934 0.013956000097095966 0.013956999406218529 0.013957000337541103 0.014078999869525433 0.014200999401509762 0.014282000251114368 0.014282000251114368 0.014485999941825867 0.014525999315083027 0.014566999860107899 0.014607999473810196 0.014688999392092228 0.014770000241696835 0.014810999855399132 0.014891999773681164 0.015054999850690365 0.015135999768972397 0.015544000081717968 0.015747000463306904 0.016112999990582466 0.016316000372171402 0.016885999590158463

Current
Mean: 0.015 ms
Stdev: 0.001 ms (5.6%)
Runs: 0.013631000183522701 0.013670999556779861 0.013915999792516232 0.013956999406218529 0.01403799932450056 0.014038000255823135 0.014120000414550304 0.014199999161064625 0.014200999401509762 0.014201000332832336 0.014201000332832336 0.014281999319791794 0.014770999550819397 0.014852000400424004 0.014933000318706036 0.014973999932408333 0.015054999850690365 0.015095999464392662 0.015096000395715237 0.015177999623119831 0.015217999927699566 0.015381000004708767 0.015584000386297703 0.015625 0.015666000545024872 0.015868999995291233 0.016071999445557594 0.016193999908864498 0.016276000067591667 0.0163569999858737 0.016439000144600868

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by @AndrewGable in version: 1.2.46-0 🚀

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

@OSBotify

OSBotify commented Jan 2, 2023

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by @roryabraham in version: 1.2.46-0 🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants