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

Immediate reportAction editing with ArrowUp #14530

Merged
merged 1 commit into from
Jan 25, 2023
Merged

Conversation

roryabraham
Copy link
Contributor

@roryabraham roryabraham commented Jan 24, 2023

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/169078

Tests (web/desktop only)

  1. Send a message
  2. Very quickly after sending the message, press ArrowUp
  3. Verify that you are now editing your last sent message.
  4. Make an edit, send it, and verify that it works.
  • Verify that no errors appear in the JS console

Offline tests

  1. Go offline
  2. Send a message
  3. Press ArrowUp
  4. Verify that you are now editing your last sent message.
  5. Make an edit and save it.
  6. Come back online. Verify that the app ends up showing the last version of the message you sent. (it will flash the first version of the message, but that's a separate problem)

QA Steps

Same as tests and Offline Tests.

  • 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
      • 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 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
Web.mov
Mobile Web - Chrome
screen-20230124-182120.mp4
Mobile Web - Safari
RPReplay_Final1674613018.MP4
Desktop
desktop.mov
iOS
RPReplay_Final1674614670.MP4
Android
screen-20230124-183744.mp4

@roryabraham roryabraham requested a review from a team as a code owner January 24, 2023 23:33
@roryabraham roryabraham self-assigned this Jan 24, 2023
@melvin-bot melvin-bot bot requested review from marcochavezf and mollfpr and removed request for a team January 24, 2023 23:34
@melvin-bot
Copy link

melvin-bot bot commented Jan 24, 2023

@mollfpr @marcochavezf 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]

@roryabraham
Copy link
Contributor Author

@mollfpr @marcochavezf Since this PR is on HOLD, please don't begin testing and review until after the other PR is merged. After that, I'll merge main back into this branch and this PR will be much smaller and ready for review and testing. I'll ping you both when it's ready

@roryabraham roryabraham changed the title [HOLD] Immediate reportAction editing with ArrowUp Immediate reportAction editing with ArrowUp Jan 25, 2023
@roryabraham
Copy link
Contributor Author

@mollfpr @marcochavezf This is off hold and ready for review

@mollfpr
Copy link
Contributor

mollfpr commented Jan 25, 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
14530.Web.Offline.mov
14530.Web.Online.mov
Mobile Web - Chrome
14530.mWeb-Chrome.mov
Mobile Web - Safari
14530.mWeb-iOS.mp4
Desktop
14530.Desktop.mov
iOS
14530.iOS.Offline.mp4
14530.iOS.Online.mp4
Android
14530.Android.mov

Copy link
Contributor

@mollfpr mollfpr left a comment

Choose a reason for hiding this comment

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

LGTM and test wells 👍

@melvin-bot
Copy link

melvin-bot bot commented Jan 25, 2023

🎯 @mollfpr, thanks for reviewing and testing this PR! 🎉

An E/App issue has been created to issue payment here: #14547.

Copy link
Contributor

@marcochavezf marcochavezf left a comment

Choose a reason for hiding this comment

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

LGTM

@marcochavezf marcochavezf merged commit 2bd2cb9 into main Jan 25, 2023
@marcochavezf marcochavezf deleted the Rory-FixArrowUpEdits branch January 25, 2023 17:41
@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 684.998 ms → 694.041 ms (+9.043 ms, +1.3%)
App start runJsBundle 192.094 ms → 197.219 ms (+5.125 ms, +2.7%)
Open Search Page TTI 611.364 ms → 612.433 ms (+1.068 ms, ±0.0%)
App start regularAppStart 0.015 ms → 0.015 ms (+0.000 ms, +2.4%)
App start nativeLaunch 20.355 ms → 20.000 ms (-0.355 ms, -1.7%)
Show details
Name Duration
App start TTI Baseline
Mean: 684.998 ms
Stdev: 34.572 ms (5.0%)
Runs: 617.5781349986792 632.5314240008593 648.0854259990156 649.6004679985344 649.9453070014715 650.7271250002086 651.9872950017452 657.8033359982073 660.4520329982042 663.8326659984887 664.745503000915 669.4178089983761 670.246754001826 674.3867850005627 676.8633330017328 677.4018770009279 685.0323890000582 686.7174709998071 692.7042700015008 695.9603350013494 697.4316979981959 698.7204470001161 699.3091380000114 703.9963760003448 706.7959930002689 706.8032770007849 710.9907089993358 720.958452001214 726.793343000114 740.2820359990001 761.766277000308 770.0593409985304

Current
Mean: 694.041 ms
Stdev: 27.550 ms (4.0%)
Runs: 648.2534300014377 650.9913539998233 654.4811960011721 657.6585539989173 659.4227660000324 660.2295500002801 669.976468000561 670.0108329989016 675.203058000654 675.3692770004272 678.2336449995637 679.6493039987981 685.4220359995961 687.8303930014372 691.0954499989748 692.9464999996126 694.2439059987664 698.5394689999521 707.6834889985621 707.7057740017772 711.2218660004437 712.8177369982004 715.2381779998541 715.5150660015643 719.4905790016055 720.6402520015836 727.3376119993627 728.4293729998171 738.4169530011714 738.828303001821 742.3849509991705
App start runJsBundle Baseline
Mean: 192.094 ms
Stdev: 19.638 ms (10.2%)
Runs: 154 168 169 171 172 172 172 174 175 179 180 182 183 184 188 192 193 193 193 197 199 200 201 202 206 209 213 220 221 221 227 237

Current
Mean: 197.219 ms
Stdev: 23.984 ms (12.2%)
Runs: 162 166 166 169 171 177 178 179 180 183 183 183 187 191 191 192 192 193 195 196 200 208 213 214 214 218 221 222 223 232 248 264
Open Search Page TTI Baseline
Mean: 611.364 ms
Stdev: 26.415 ms (4.3%)
Runs: 580.751098997891 580.8151040002704 581.4403889998794 585.6323239989579 587.0136719979346 587.1557620018721 589.6180419996381 592.688761997968 594.4669600017369 597.3239339999855 597.4417320005596 598.1888840012252 599.0191240012646 601.5013840012252 601.6070149987936 601.766601998359 604.156086999923 605.0781259983778 606.0165200009942 607.9296059980989 608.6736660003662 610.1140139997005 614.6642660014331 620.9182949997485 626.0657970011234 632.8961189985275 635.8357340022922 646.9392899982631 654.5616859979928 659.3944099992514 672.6613370031118 681.3266610018909

Current
Mean: 612.433 ms
Stdev: 18.160 ms (3.0%)
Runs: 579.5099689997733 584.0058190003037 584.1366779990494 586.9623220004141 587.29695700109 587.6685799993575 589.3703210018575 594.0555419996381 599.1458329968154 601.8167320005596 602.5179859995842 608.4921879991889 611.4313560016453 613.600912000984 614.5651450008154 615.4454349987209 616.9425869993865 618.381877001375 619.1957600004971 621.5982269980013 621.9820559993386 622.5703530013561 624.244099996984 625.3465170003474 625.516235999763 625.5643320009112 626.1610109992325 628.4892579987645 635.6210939995944 637.6573890000582 643.7726639993489 644.7747809998691
App start regularAppStart Baseline
Mean: 0.015 ms
Stdev: 0.001 ms (4.2%)
Runs: 0.013468999415636063 0.013630997389554977 0.013833999633789062 0.013916000723838806 0.01416100189089775 0.014242000877857208 0.014485999941825867 0.014485999941825867 0.014525998383760452 0.014527000486850739 0.014566998928785324 0.014566998928785324 0.01464800164103508 0.014729000627994537 0.014729999005794525 0.01477000117301941 0.01477000117301941 0.015014998614788055 0.01505500078201294 0.015096001327037811 0.015135999768972397 0.015177000313997269 0.01521800085902214 0.01521800085902214 0.015257999300956726 0.015258997678756714 0.015463002026081085 0.01550300046801567 0.01590999960899353 0.01619500294327736

Current
Mean: 0.015 ms
Stdev: 0.001 ms (5.6%)
Runs: 0.013223998248577118 0.013834003359079361 0.013996999710798264 0.014077998697757721 0.01411999762058258 0.014445003122091293 0.014485999941825867 0.01452600210905075 0.014566998928785324 0.014607999473810196 0.014689002186059952 0.014729999005794525 0.014852002263069153 0.014973998069763184 0.01521800085902214 0.01521800085902214 0.015259001404047012 0.015422001481056213 0.01550300046801567 0.015544001013040543 0.015625 0.015707001090049744 0.01586899906396866 0.01586899906396866 0.015869002789258957 0.016072001308202744 0.01619500294327736 0.016235999763011932 0.016397997736930847 0.016927000135183334
App start nativeLaunch Baseline
Mean: 20.355 ms
Stdev: 2.163 ms (10.6%)
Runs: 17 18 18 18 18 18 19 19 19 19 19 19 19 20 20 20 20 20 21 21 21 21 21 21 22 22 23 23 23 26 26

Current
Mean: 20.000 ms
Stdev: 1.949 ms (9.7%)
Runs: 18 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 23 24 26

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/marcochavezf in version: 1.2.60-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/luacmartins in version: 1.2.60-1 🚀

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

@mallenexpensify
Copy link
Contributor

@mollfpr Created this E/App issue for payment #14643

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