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] Escaping all instances backslash #13644

Merged
merged 3 commits into from
Dec 15, 2022
Merged

Conversation

chiragsalian
Copy link
Contributor

Details

TIL replace only replaces one instance of the string captured. I updated it to use //g to capture multiple instances.

Fixed Issues

None
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:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • 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

@chiragsalian chiragsalian self-assigned this Dec 15, 2022
@chiragsalian chiragsalian marked this pull request as ready for review December 15, 2022 22:15
@chiragsalian chiragsalian requested a review from a team as a code owner December 15, 2022 22:16
@melvin-bot melvin-bot bot requested review from stitesExpensify and removed request for a team December 15, 2022 22:16
@melvin-bot
Copy link

melvin-bot bot commented Dec 15, 2022

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

Copy link
Contributor

@luacmartins luacmartins left a comment

Choose a reason for hiding this comment

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

LGTM!

@luacmartins
Copy link
Contributor

luacmartins commented Dec 15, 2022

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:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • 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 the changes affect GH actions only!

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

@luacmartins luacmartins merged commit e4daa15 into main Dec 15, 2022
@luacmartins luacmartins deleted the chirag-deploy-fix-5 branch December 15, 2022 22:19
@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
TTI 806.782 ms → 830.231 ms (+23.449 ms, +2.9%)
nativeLaunch 10.000 ms → 10.032 ms (+0.032 ms, ±0.0%)
regularAppStart 0.013 ms → 0.015 ms (+0.001 ms, +8.5%)
runJsBundle 193.767 ms → 192.375 ms (-1.392 ms, -0.7%)
Show details
Name Duration
TTI Baseline
Mean: 806.782 ms
Stdev: 30.095 ms (3.7%)
Runs: 757.5505869998597 765.1820060000755 765.3204810000025 775.5552469999529 780.0586680001579 781.8028449998237 785.1618180000223 785.5127949998714 786.4801710001193 788.4651139997877 793.2541519999504 795.0466129998676 796.1832349998876 797.8826399999671 799.2976700002328 802.3859210000373 803.2893199999817 803.6417000000365 809.9007009998895 811.5328199998476 820.4518149998039 822.607416999992 823.1372919999994 827.5369449998252 830.8270870000124 839.555920000188 845.318682000041 855.0183390001766 876.5630250000395 878.9310110001825

Current
Mean: 830.231 ms
Stdev: 22.752 ms (2.7%)
Runs: 782.967784000095 790.5815039998852 800.8375820000656 802.9125129999593 806.1728639998473 814.3132719998248 814.6067079999484 815.7937170001678 816.2718019997701 817.3332059998065 818.5688209999353 821.2482579997741 825.1845100000501 825.2204029997811 829.7123810001649 837.1812240001746 838.6089969999157 839.7418849999085 839.8148940000683 841.0522989998572 841.4397200001404 843.9344170000404 849.4780159997754 849.7984009999782 850.4583890000358 855.1080359998159 859.1065509999171 860.5547960000113 888.6825259998441
nativeLaunch Baseline
Mean: 10.000 ms
Stdev: 1.901 ms (19.0%)
Runs: 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 11 11 11 11 12 13 13 13 14 15

Current
Mean: 10.032 ms
Stdev: 1.769 ms (17.6%)
Runs: 7 8 8 8 8 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 11 11 11 11 12 12 13 13 13 13
regularAppStart Baseline
Mean: 0.013 ms
Stdev: 0.001 ms (4.9%)
Runs: 0.012531999964267015 0.0125730000436306 0.0125730000436306 0.012614000122994184 0.012655000202357769 0.012735999654978514 0.012898999731987715 0.013021000195294619 0.013061000034213066 0.013061999808996916 0.01310200011357665 0.013264999724924564 0.0133050000295043 0.013306000269949436 0.013345999643206596 0.013387000188231468 0.013427999801933765 0.013428000267595053 0.01346899988129735 0.013509000185877085 0.013672000262886286 0.013793999794870615 0.01383400009945035 0.0138349998742342 0.013996999710798264 0.014283000025898218 0.014566999860107899 0.014606999699026346 0.014607999939471483 0.015015000011771917

Current
Mean: 0.015 ms
Stdev: 0.001 ms (6.1%)
Runs: 0.013021000195294619 0.013265000190585852 0.013427999801933765 0.013632000423967838 0.013753000181168318 0.0138349998742342 0.013875000178813934 0.013956999871879816 0.013996999710798264 0.014037999790161848 0.014037999790161848 0.014281999785453081 0.014281999785453081 0.014282000251114368 0.014322999864816666 0.014362999703735113 0.01436399994418025 0.014649000018835068 0.014769999776035547 0.0148930000141263 0.0148930000141263 0.015014000236988068 0.01509599993005395 0.015176999848335981 0.015381000004708767 0.015503000002354383 0.015542999841272831 0.015583999920636415 0.015910000074654818 0.016561000142246485 0.016764999832957983
runJsBundle Baseline
Mean: 193.767 ms
Stdev: 17.640 ms (9.1%)
Runs: 165 170 170 171 174 176 177 178 178 181 185 188 189 193 196 196 197 198 199 200 200 203 207 208 208 208 212 225 225 236

Current
Mean: 192.375 ms
Stdev: 16.445 ms (8.5%)
Runs: 162 165 167 170 171 173 174 177 181 183 186 186 188 188 192 192 194 196 197 201 201 203 204 206 207 208 208 210 211 213 216 226

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @luacmartins in version: 1.2.41-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @luacmartins in version: 1.2.41-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @yuwenmemon in version: 1.2.41-4 🚀

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.

None yet

4 participants