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

[No QA] Ensure CREATED actions come first #14213

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

roryabraham
Copy link
Contributor

@roryabraham roryabraham commented Jan 10, 2023

Details

https://expensify.slack.com/archives/C04DC6LU2UB/p1673376559579379

Fixed Issues

$ #14211

Tests

This change is covered by automated tests. There is no easy way to test this manually AFAIK because multiple reportActions created in the same millisecond is not something that happens consistently.

  • Verify that no errors appear in the JS console

Offline tests

None.

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

Screenshots not included since this is not manually tested but covered by automated tests.

@roryabraham roryabraham self-assigned this Jan 10, 2023
@roryabraham roryabraham requested a review from a team as a code owner January 10, 2023 22:36
@melvin-bot melvin-bot bot requested review from ctkochan22 and Santhosh-Sellavel and removed request for a team January 10, 2023 22:36
@melvin-bot
Copy link

melvin-bot bot commented Jan 10, 2023

@Santhosh-Sellavel @ctkochan22 One of you needs to 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]

@chiragsalian
Copy link
Contributor

chiragsalian commented Jan 10, 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 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

@ctkochan22
Copy link
Contributor

No QA so we can just merge this correct?

@roryabraham roryabraham merged commit ea6c52c into main Jan 11, 2023
@roryabraham roryabraham deleted the Rory-ImproveReportActionsSorting branch January 11, 2023 00:15
@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
App start TTI 662.340 ms → 687.062 ms (+24.722 ms, +3.7%)
App start runJsBundle 183.097 ms → 199.156 ms (+16.059 ms, +8.8%)
App start nativeLaunch 9.400 ms → 18.897 ms (+9.497 ms, +101.0%) 🟡
Open Search Page TTI 598.207 ms → 600.173 ms (+1.966 ms, ±0.0%)
App start regularAppStart 0.014 ms → 0.020 ms (+0.006 ms, +46.9%) 🟡
Show details
Name Duration
App start TTI Baseline
Mean: 662.340 ms
Stdev: 27.426 ms (4.1%)
Runs: 599.0081960000098 617.834768999368 621.3672540001571 628.6858339998871 635.406365999952 635.9890180006623 637.6461280006915 642.6217379998416 647.3372990004718 648.5458780005574 650.5183910001069 654.7495910003781 655.09528600052 656.3597890008241 656.7296730000526 663.3278000000864 663.7369519993663 665.4222199991345 670.7701680008322 672.8146020006388 674.8038970008492 678.8787799999118 685.3906420003623 686.2975580003113 688.165250999853 689.0392540004104 691.3400120008737 692.2838380001485 697.0807099994272 701.4131819996983 723.8681879993528

Current
Mean: 687.062 ms
Stdev: 38.788 ms (5.6%)
Runs: 624.4753290005028 629.8244630005211 631.721217000857 634.5609569996595 638.3296930007637 642.1230289991945 644.241338999942 646.4086429998279 649.4183140005916 651.3627879992127 664.2214039992541 669.8707400001585 681.0178500004113 683.5283989999443 684.3291939999908 693.9353219997138 695.8119729999453 697.9232470002025 698.3338200002909 698.8915790002793 702.3979250006378 705.4239649996161 709.5956040006131 720.1357659995556 720.2438200004399 721.3708330001682 725.3755779992789 731.6387060005218 734.8158950004727 739.4486389998347 745.443670000881 769.7524219993502
App start runJsBundle Baseline
Mean: 183.097 ms
Stdev: 17.770 ms (9.7%)
Runs: 156 160 161 163 163 165 166 166 168 168 173 175 176 179 182 183 184 185 188 192 192 193 194 194 196 196 199 201 207 222 229

Current
Mean: 199.156 ms
Stdev: 29.482 ms (14.8%)
Runs: 160 163 167 167 170 171 171 174 174 176 177 178 184 186 195 198 199 201 201 201 203 204 216 216 218 220 225 228 234 260 266 270
App start nativeLaunch Baseline
Mean: 9.400 ms
Stdev: 0.952 ms (10.1%)
Runs: 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 11 11 11 11

Current
Mean: 18.897 ms
Stdev: 1.322 ms (7.0%)
Runs: 17 17 17 18 18 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 20 20 20 20 20 20 21 22 22
Open Search Page TTI Baseline
Mean: 598.207 ms
Stdev: 17.105 ms (2.9%)
Runs: 563.3092450015247 569.8083089999855 570.1043300013989 572.7889409996569 578.1530360002071 578.5435790009797 588.4977630004287 588.5073649995029 589.4263509996235 590.362914999947 593.5336109995842 595.063436999917 597.0995690003037 598.0310880001634 598.2847489994019 598.7402759995311 601.6356200017035 602.0264490004629 602.4025480002165 606.4635419994593 607.222453000024 607.254435999319 609.7704680003226 610.0319420006126 610.4087320007384 613.6811929997057 620.1128740012646 624.0755209997296 628.8933520000428 631.9711099993438

Current
Mean: 600.173 ms
Stdev: 22.531 ms (3.8%)
Runs: 564.4512130003422 566.0364180002362 570.7135419994593 574.1693530008197 576.816487999633 579.8318680003285 579.9062090013176 580.1802580002695 583.0061850007623 583.7169599998742 583.7760419994593 585.8361409995705 588.0092769991606 590.0336920004338 590.8581540007144 596.1530769988894 600.1173909995705 601.2368979994208 603.5881759990007 608.2072349991649 608.2740480005741 608.3629559986293 608.7481699995697 610.7400719989091 611.207112999633 612.6633310001343 616.7076830007136 620.9148360006511 629.94165099971 637.0570480003953 643.5192870013416 644.9827479999512 645.9348150007427
App start regularAppStart Baseline
Mean: 0.014 ms
Stdev: 0.001 ms (9.7%)
Runs: 0.01159599982202053 0.011882001534104347 0.012491000816226006 0.012655001133680344 0.012655001133680344 0.012777000665664673 0.01285799965262413 0.01285800151526928 0.012899000197649002 0.012899000197649002 0.012899000197649002 0.012899000197649002 0.013103000819683075 0.013224998489022255 0.01330600120127201 0.01355000026524067 0.01371300034224987 0.0138349998742342 0.013875000178813934 0.013916000723838806 0.014159999787807465 0.014241999015212059 0.014404000714421272 0.014404000714421272 0.014567000791430473 0.014852000400424004 0.01619499921798706 0.01619500108063221 0.016276000067591667 0.01631699874997139 0.016805000603199005

Current
Mean: 0.020 ms
Stdev: 0.002 ms (9.7%)
Runs: 0.01827000081539154 0.018473999574780464 0.018595999106764793 0.018960999324917793 0.018960999324917793 0.019042998552322388 0.019043000414967537 0.019082998856902122 0.01908300071954727 0.019124001264572144 0.019164999946951866 0.019286999478936195 0.019287001341581345 0.01948999986052513 0.01965400017797947 0.01965400017797947 0.01989699900150299 0.019897999241948128 0.019979000091552734 0.020100999623537064 0.020100999623537064 0.020792998373508453 0.02099600061774254 0.021403001621365547 0.022053999826312065 0.02278599888086319 0.023600999265909195 0.025472000241279602 0.026326000690460205

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @roryabraham in version: 1.2.53-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @Julesssss in version: 1.2.53-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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants