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

Account for markdown using debounced comment counter #15501

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

redstar504
Copy link
Contributor

Details

Combined with #14752, this PR completes the synchronisation of comment length counting with the backend.

An overview of the changes are:

  1. Include the markdown transformation in the getCommentLength function.
  2. Defer counting until there is a 500ms break in typing to avoid performance issues.
  3. Abstract the logic to a pure component so calculating occurs once per pause when the comment changes.

When comment length is exceeded, the ExceededCommentLength component calls setExceededCommentLength on the parent composer components. This applies the state hasExceededMaxCommentLength to the composer which in turn displays the red borders and prevents the message from being sent.

Fixed Issues

$ #14268
PROPOSAL: #14268 (comment)

Tests

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

Use the following sequence of *b* characters for completing each test:

*b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b*

Test 1 - Attempt sending MD that exceeds the limit

  1. Paste the above *b* characters into the composer and remove any surrounding backticks and spaces.
  2. Confirm that the comment exceeds the limit and is not sendable.

Test 2 - Attempt sending MD that does not exceed the limit

  1. Paste the *b* characters into the composer and remove any surrounding backticks and spaces.
  2. Confirm that the comment counter displays as 15012, and that the length is exceeded.
  3. Remove one *b* sequence from the comment. The comment should now be sendable.
  4. Send the comment and confirm that the delivered message consists only of b characters formatted in bold.

Test 3 - Confirm composer counts the HTML length of the Markdown:

  1. Paste the *b* sequence above into the composer and remove any surrounding backticks and spaces.
  2. Add additional *b* characters.
  3. Confirm that for each additional *b* sequence, the character counter increases by 18.

Test 4 - Confirm comment is not counted until a break in typing (debounce functionality):

  1. Paste the *b* characters above into the composer and remove any surrounding backticks and spaces.
  2. Continue typing a sentence, or add several characters of your choosing without pausing.
  3. Pause and observe that the character counter only updates after you stop.
  4. Continue typing, and confirm that the character counter only updates after a pause in typing.

Repeat the above tests for editing a comment. Confirm that comments exceeding the limit cannot be sent by pressing enter, or by clicking the send button.

  • 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.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
web.mp4
Mobile Web - Chrome
android_chrome.mp4
Mobile Web - Safari
ios_safari.mp4
Desktop
mac_native.mp4
iOS
ios_native.mp4
Android
android_native.mp4

@redstar504 redstar504 requested a review from a team as a code owner February 25, 2023 19:55
@melvin-bot melvin-bot bot requested review from aimane-chnaif and francoisl and removed request for a team February 25, 2023 19:55
@MelvinBot
Copy link

@francoisl @aimane-chnaif 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]

@aimane-chnaif
Copy link
Contributor

Code looks good to me and tests well on all various cases.
Optional: it would be good to add automated test for getCommentLength function in ReportUtilsTest.

@redstar504
Copy link
Contributor Author

redstar504 commented Feb 28, 2023

@aimane-chnaif Thank you. I am not certain that getCommentLength is a valuable test target. If we add tests for verifying that specific markdown equates to specific lengths, they would need to be updated as the markdown parser changes. If we mocked the parser we would really just be testing the length function.

@aimane-chnaif
Copy link
Contributor

When html length reaches threshold:

max.html.length.mov

When text length reaches threshold:

max.text.length.mov

For user experience, it's a bit odd when exceed on smaller length, not exceed on larger length.
It would be useful to add edge cases in unit test to explain why this happens.
But this is just my suggestion. Adding automated test is of course not required for this job.

@aimane-chnaif
Copy link
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
web.mov
Mobile Web - Chrome
mchrome.mov
Mobile Web - Safari
msafari.mp4
Desktop
desktop.mov
iOS
ios.mp4
Android
android.mov

Copy link
Contributor

@aimane-chnaif aimane-chnaif 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 tests well 🎉
All yours @francoisl

@redstar504
Copy link
Contributor Author

redstar504 commented Feb 28, 2023

@aimane-chnaif I did notice that case as well. When you append text to the last *b* character without a space, the last character no longer becomes formatted due to how the parser works. Therefore the comment will fall under the limit.

Since this is how the back-end would see the length as well, this is logical, however I agree it should be documented to not raise an issue later. I am unsure if a unit test would be the right place. Perhaps it could be documented in test rail after we define the regression steps. I will defer to @francoisl.

Copy link
Contributor

@francoisl francoisl left a comment

Choose a reason for hiding this comment

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

Works well, thanks!

@@ -402,6 +402,7 @@ const CONST = {
SHOW_LOADING_SPINNER_DEBOUNCE_TIME: 250,
TOOLTIP_SENSE: 1000,
TRIE_INITIALIZATION: 'trie_initialization',
COMMENT_LENGTH_DEBOUNCE_TIME: 500,
Copy link
Contributor

Choose a reason for hiding this comment

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

Usually I like to include the unit for time constants (e.g. append _MS) to make it clear, but we already don't do it for the other constants above, so not blocking on this.

import PropTypes from 'prop-types';
import {debounce} from 'lodash';
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, in the rest of the codebase I see that we use UnderscoreJS's debounce function, not the one from lodash. AFAICT they must be pretty much the same though.

@francoisl francoisl merged commit 5674cb1 into Expensify:main Feb 28, 2023
@MelvinBot
Copy link

Congrats, that’s your 5th PR merged! 🎉 Do you know about the ContributorPlus role? It’s an opportunity to earn more in the Expensify Open Source community. Keep up the great work - thanks!

@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

Name Duration
Open Search Page TTI 600.313 ms → 670.210 ms (+69.897 ms, +11.6%) 🔴
Show details
Name Duration
Open Search Page TTI Baseline
Mean: 600.313 ms
Stdev: 14.121 ms (2.4%)
Runs: 578.1375739998184 578.2458909996785 581.3792729997076 586.1343990000896 586.5469160000794 586.9770109998062 587.4172779996879 590.9244389999658 590.930949000176 591.1289470000193 591.5102949999273 591.854127000086 591.9418540000916 594.1288259997964 594.3693450000137 595.3901370000094 597.5505369999446 599.7836099998094 601.3768309997395 603.7896329998039 606.2783200000413 607.8572189998813 608.1076659997925 608.1877439999953 608.9442950002849 609.4423019997776 616.4780689999461 622.4928390001878 623.635540000163 624.7816980001517 626.4516599997878 627.8562019998208

Current
Mean: 670.210 ms
Stdev: 13.775 ms (2.1%)
Runs: 641.1724049998447 645.07865400007 645.7527259998024 648.6117759998888 651.7392170000821 656.4731439999305 660.1529549998231 661.0322679998353 662.3620199998841 666.8047290001996 666.8964439998381 669.3363040001132 670.1333419997245 671.5487469998188 671.7563080000691 672.4286710000597 674.6695150001906 675.7483319998719 676.6586919999681 676.9387209997512 678.2028000000864 678.8802899997681 680.0275889998302 680.2652590000071 682.0212000003085 683.73514899984 684.4202069998719 686.6846519997343 693.1472579999827 693.6226399997249

Meaningless Changes To Duration

Show entries
Name Duration
App start TTI 704.195 ms → 728.104 ms (+23.909 ms, +3.4%)
App start runJsBundle 193.194 ms → 204.031 ms (+10.838 ms, +5.6%)
App start nativeLaunch 19.300 ms → 19.367 ms (+0.067 ms, ±0.0%)
App start regularAppStart 0.014 ms → 0.015 ms (+0.001 ms, +5.2%)
Show details
Name Duration
App start TTI Baseline
Mean: 704.195 ms
Stdev: 27.720 ms (3.9%)
Runs: 657.1487850002013 661.3068349999376 662.6508410000242 663.6036950000562 678.3918550000526 679.9701379998587 681.6064900001511 684.7332879998721 688.492796999868 689.4637299999595 689.9581829998642 693.467784000095 693.7972829998471 696.6137520000339 702.0599719998427 703.096644999925 703.7098059998825 707.9497859999537 710.9490009997971 712.414340000134 716.2179040000774 717.0822709999047 717.3978740000166 719.849882000126 722.7327629998326 725.2336940001696 728.9740129997954 745.4644149998203 746.8574009998702 752.9959789998829 775.8630800000392

Current
Mean: 728.104 ms
Stdev: 30.842 ms (4.2%)
Runs: 668.7571040000767 683.0521329999901 694.2621419997886 696.2142300000414 700.1858250000514 704.2434550002217 705.63893500017 707.2524930001236 708.0055060000159 708.351071999874 709.0523859998211 711.7742380001582 717.041193000041 717.9959519999102 719.4283259999938 719.9170900001191 720.3171939998865 721.3832290000282 722.5911510000005 723.5524599999189 725.3788740001619 729.6319659999572 739.4616729998961 752.4754949999042 757.2477979999967 764.6959110000171 769.1001229998656 770.6356520000845 779.25916100014 779.3178710001521 784.7802749997936 788.3337940000929
App start runJsBundle Baseline
Mean: 193.194 ms
Stdev: 19.522 ms (10.1%)
Runs: 162 170 171 171 172 175 176 179 179 182 185 186 187 187 188 189 189 191 194 195 198 200 204 208 209 209 210 214 226 235 248

Current
Mean: 204.031 ms
Stdev: 25.828 ms (12.7%)
Runs: 165 172 176 176 178 179 179 180 180 185 186 187 188 194 196 201 202 206 206 208 210 213 217 221 228 229 230 233 238 240 260 266
App start nativeLaunch Baseline
Mean: 19.300 ms
Stdev: 1.130 ms (5.9%)
Runs: 18 18 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 19 19 19 20 20 20 20 21 21 21 21 21 22

Current
Mean: 19.367 ms
Stdev: 1.622 ms (8.4%)
Runs: 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 21 21 22 23 24
App start regularAppStart Baseline
Mean: 0.014 ms
Stdev: 0.001 ms (7.8%)
Runs: 0.011921999976038933 0.0125730000436306 0.0125730000436306 0.0125730000436306 0.012655000202357769 0.012736000120639801 0.012980000115931034 0.013143000192940235 0.013183000031858683 0.0134680001065135 0.013549999799579382 0.013590000104159117 0.013631000183522701 0.013631999958306551 0.0138349998742342 0.01399700017645955 0.014119000174105167 0.014119999948889017 0.014159999787807465 0.014241000171750784 0.014403999783098698 0.014444999862462282 0.014851999934762716 0.014891999773681164 0.014973999932408333 0.015055000316351652 0.015176999848335981 0.015381000004708767 0.015381000004708767 0.017090000212192535

Current
Mean: 0.015 ms
Stdev: 0.001 ms (4.9%)
Runs: 0.013021000195294619 0.013590999878942966 0.013711999636143446 0.013833999633789062 0.013916000258177519 0.014037999790161848 0.014039000030606985 0.014078000094741583 0.014078999869525433 0.014078999869525433 0.014161000028252602 0.014444999862462282 0.014485999941825867 0.014485999941825867 0.014526999555528164 0.014566999860107899 0.014649000018835068 0.014688999857753515 0.014932999853044748 0.014933999627828598 0.014973999932408333 0.014973999932408333 0.015015000011771917 0.015217999927699566 0.01525900000706315 0.01525900000706315 0.015339999925345182 0.015503000002354383 0.015542999841272831 0.01587000023573637 0.015950999688357115 0.016112999990582466

@github-actions github-actions bot added the DeployBlockerCash This issue or pull request should block deployment label Feb 28, 2023
@github-actions
Copy link
Contributor

@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker.

@redstar504
Copy link
Contributor Author

@francoisl @aimane-chnaif This looks like it is due to the calculation occurring when the page is loaded, which could
increase load time by the base time of the parser. Given that it may not be necessary to calculate the comment length upon page load, we could consider removing the calculation from componentDidMount.

@aimane-chnaif
Copy link
Contributor

@redstar504 I don't think this PR is related to this performance regression. This is now happening to all PRs recently.
https://github.com/Expensify/App/pulls?q=is%3Apr+label%3ADeployBlockerCash+is%3Aclosed

@redstar504
Copy link
Contributor Author

@aimane-chnaif Thank you for pointing that out.

@OSBotify
Copy link
Contributor

OSBotify commented Mar 2, 2023

🚀 Deployed to staging by https://github.com/francoisl in version: 1.2.78-0 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Mar 6, 2023

🚀 Deployed to production by https://github.com/mountiny in version: 1.2.78-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
DeployBlockerCash This issue or pull request should block deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants