Skip to content

Update CONTRIBUTING.md - #14221

Merged
MariaHCD merged 3 commits into
mainfrom
mallenexpensify-patch-1
Jan 13, 2023
Merged

MariaHCD merged 3 commits into
mainfrom
mallenexpensify-patch-1

Conversation

@mallenexpensify

@mallenexpensify mallenexpensify commented Jan 11, 2023 •

Copy link
Copy Markdown
Contributor

Updated line 61 with

If the PR causes a regression within 7 days of being deployed to production, contributors are not eligible for the 50% bonus.

From https://expensify.slack.com/archives/C02NK2DQWUX/p1673019883851039?thread_ts=1672977133.010699&cid=C02NK2DQWUX

Details

Fixed Issues

$ GH_LINK N/A small CONTRIBUTING.md update.
PROPOSAL: GH_LINK_ISSUE(COMMENT)

Tests

Verify line 61 is added and states

If the PR causes a regression within 7 days of being deployed to production, the bonus timeline restarts from the initial hire date.

  • 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

Updated line 61 with
>If the PR causes a regression within 7 days of being deployed to production, the bonus timeline restarts from the initial hire date. 

From https://expensify.slack.com/archives/C02NK2DQWUX/p1673019883851039?thread_ts=1672977133.010699&cid=C02NK2DQWUX
@mallenexpensify
mallenexpensify requested a review from a team as a code owner January 11, 2023 03:25
@melvin-bot
melvin-bot Bot requested review from MariaHCD and removed request for a team January 11, 2023 03:26
@melvin-bot

melvin-bot Bot commented Jan 11, 2023

Copy link
Copy Markdown

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

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

I just have one small suggestion!

Comment thread contributingGuides/CONTRIBUTING.md Resolved
@MariaHCD

MariaHCD commented Jan 11, 2023 •

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

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

Co-authored-by: Maria D'Costa <maria@expensify.com>
@mallenexpensify

Copy link
Copy Markdown
Contributor Author

Thanks for the catch @MariaHCD!

@mallenexpensify

Copy link
Copy Markdown
Contributor Author

@MariaHCD please hold on moving forward, I think we want to update the text to

If the PR causes a regression within 7 days of being deployed to production, contributors are not eligible for the 50% bonus.

Checking here

@mallenexpensify mallenexpensify changed the title Update CONTRIBUTING.md [HOLD] Update CONTRIBUTING.md Jan 12, 2023
Updated line 62 to "If the PR causes a regression within 7 days of being deployed to production, contributors are not eligible for the 50% bonus. "
@mallenexpensify

Copy link
Copy Markdown
Contributor Author

@MariaHCD I needed to update the line. I did so via "Files Changed", is that right? I also updated the OP, the new line (in the same spot as the old) is

If the PR causes a regression within 7 days of being deployed to production, contributors are not eligible for the 50% bonus.

Taking off hold

@mallenexpensify mallenexpensify changed the title [HOLD] Update CONTRIBUTING.md Update CONTRIBUTING.md Jan 12, 2023

@MariaHCD MariaHCD 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!

Screenshot 2023-01-13 at 11 40 16 AM

Just a small tip for any future PRs that alter .md files, you can preview your change(s) by going to Files changed > View file:

Screenshot 2023-01-13 at 11 40 23 AM

@MariaHCD
MariaHCD merged commit 5338abd into main Jan 13, 2023
@MariaHCD
MariaHCD deleted the mallenexpensify-patch-1 branch January 13, 2023 07:42
@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
App start TTI 660.014 ms → 688.304 ms (+28.289 ms, +4.3%)
Open Search Page TTI 595.133 ms → 609.853 ms (+14.720 ms, +2.5%)
App start runJsBundle 179.839 ms → 190.500 ms (+10.661 ms, +5.9%)
App start regularAppStart 0.020 ms → 0.015 ms (-0.006 ms, -28.2%) 🟢
App start nativeLaunch 19.581 ms → 19.033 ms (-0.547 ms, -2.8%)
Show details
Name Duration
App start TTI Baseline
Mean: 660.014 ms
Stdev: 31.514 ms (4.8%)
Runs: 613.3372200001031 617.640667000087 624.7373929999303 625.1316420000512 628.0736630000174 633.5058969999664 634.6983179999515 642.2539629999083 643.3122239999939 644.8918500000145 645.3828789999243 645.7590020000935 646.28072099993 647.203804000048 648.6101140000392 648.6578190000728 650.9010970001109 651.570982000092 664.4884520000778 671.0067869999912 677.491786000086 678.9816330000758 682.0801939999219 685.3547879999969 685.7392480000854 687.4433790000621 689.08625199995 718.9027080000378 719.9563519998919 747.9468300000299

Current
Mean: 688.304 ms
Stdev: 40.692 ms (5.9%)
Runs: 620.2475660000928 626.0730049998965 638.8583909999579 639.9362880000845 643.8631619999651 651.9100929999258 653.0631679999642 655.2809939999133 656.3881600000896 658.605387999909 658.9063629999291 664.9770470000803 675.4974469998851 681.5340160001069 684.5817179998849 687.051320000086 691.9087960000616 691.989849000005 693.8792880000547 701.6743139999453 708.0164930000901 708.2325279999059 708.5219769999385 709.6018119999208 711.6873459999915 719.2984970000107 719.441874000011 724.271880999906 726.9213990001008 728.1620549999643 790.0717499998864 795.2600249999668
Open Search Page TTI Baseline
Mean: 595.133 ms
Stdev: 20.274 ms (3.4%)
Runs: 560.6191820001695 564.7200519999024 571.8610030000564 576.699300999986 578.7856040000916 579.5531009999104 579.7665610001422 580.6792399999686 581.2661129999906 582.8328050000127 583.076253999956 584.0942389999982 586.7400720000733 588.8350009999704 590.5220950001385 590.7500809999183 591.3728840001859 594.691163000185 597.2692879999522 597.5369469998404 600.6624760001432 601.5233149998821 605.4933680000249 605.4956469999161 607.3291829999071 609.4135750001296 609.6102710000705 626.456664999947 639.7781580002047 639.9207359999418 641.7700200001709

Current
Mean: 609.853 ms
Stdev: 14.119 ms (2.3%)
Runs: 577.9440919999033 586.1831869999878 587.0891110000666 592.8654789999127 594.4595950001385 596.8530689999461 598.2802329999395 598.3440759999212 599.8122970000841 602.4756679998245 603.4848639999982 603.7395830000751 605.2281909999438 607.6245929999277 608.4477939999197 608.9242350000422 610.9953209999949 611.3815919999033 613.5039879998658 614.2207039999776 614.5328779998235 614.7810470000841 615.2112630000338 616.3994950000197 617.0363360000774 617.6006259999704 622.2807620000094 623.4453939998057 627.9788820000831 628.4870609999634 629.5918779999483 636.1899010001216 639.7594809997827
App start runJsBundle Baseline
Mean: 179.839 ms
Stdev: 17.782 ms (9.9%)
Runs: 150 160 160 163 163 164 167 167 168 169 170 171 171 172 173 173 173 176 179 183 183 186 188 196 196 198 204 204 205 221 222

Current
Mean: 190.500 ms
Stdev: 19.503 ms (10.2%)
Runs: 164 164 167 170 170 172 173 173 174 175 176 176 180 184 185 187 187 191 192 194 194 202 202 203 203 204 209 215 225 225 225 235
App start regularAppStart Baseline
Mean: 0.020 ms
Stdev: 0.002 ms (8.1%)
Runs: 0.017496999818831682 0.017699999967589974 0.01774100004695356 0.018309999955818057 0.01835100003518164 0.018432999961078167 0.018798999954015017 0.019286999944597483 0.019409000175073743 0.019694000016897917 0.019775999942794442 0.019776000175625086 0.01997800008393824 0.019979000091552734 0.020060000009834766 0.020060000009834766 0.020304000005126 0.020345000084489584 0.02042700001038611 0.02066999999806285 0.020711000077426434 0.02115899999625981 0.021198999835178256 0.021444000070914626 0.021972000133246183 0.02225799998268485 0.02250099997036159 0.022908999817445874 0.02347800019197166 0.023641000036150217

Current
Mean: 0.015 ms
Stdev: 0.001 ms (6.1%)
Runs: 0.013224000111222267 0.013264999957755208 0.013346000108867884 0.013427000027149916 0.013427999801933765 0.013630999950692058 0.013630999950692058 0.013752999948337674 0.013753999955952168 0.014079000102356076 0.014079000102356076 0.014201000100001693 0.01432300009764731 0.014362999936565757 0.014405000023543835 0.014445000095292926 0.014607000164687634 0.014648000011220574 0.0147299999371171 0.014730000169947743 0.014973999932408333 0.015217999927699566 0.015298999845981598 0.015339999925345182 0.015585000161081553 0.015787999844178557 0.0157880000770092 0.01582799991592765 0.015870000002905726 0.016438000136986375
App start nativeLaunch Baseline
Mean: 19.581 ms
Stdev: 1.897 ms (9.7%)
Runs: 17 17 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 20 20 20 20 20 20 20 21 21 21 22 23 24 25

Current
Mean: 19.033 ms
Stdev: 1.354 ms (7.1%)
Runs: 17 18 18 18 18 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 19 20 20 20 20 20 21 21 22 23

@OSBotify OSBotify mentioned this pull request Jan 13, 2023
13 tasks done
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by @MariaHCD in version: 1.2.54-0 🚀

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

@mallenexpensify

Copy link
Copy Markdown
Contributor Author

Thanks @MariaHCD !

@OSBotify

Copy link
Copy Markdown
Contributor

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

3 participants