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

Trim timezone search before comparing #15412

Merged
merged 1 commit into from
Feb 23, 2023
Merged

Trim timezone search before comparing #15412

merged 1 commit into from
Feb 23, 2023

Conversation

Gonals
Copy link
Contributor

@Gonals Gonals commented Feb 23, 2023

Details

Fixed Issues

$ #15365

Tests

  1. Open Settings > Profile > TimeZone
  2. Type Europe and see the europe zones are shown.
  3. Add a trailing space and confirm they still show
  • Verify that no errors appear in the JS console

Offline tests

None

QA Steps

Same as 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.
  • 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 Screenshot 2023-02-23 at 4 33 03 PM
Mobile Web - Chrome Screenshot 2023-02-23 at 4 42 47 PM
Mobile Web - Safari Screenshot 2023-02-23 at 4 47 11 PM
Desktop Screenshot 2023-02-23 at 4 34 39 PM
iOS Screenshot 2023-02-23 at 4 46 13 PM
Android Screenshot 2023-02-23 at 4 41 52 PM

@Gonals Gonals requested a review from a team as a code owner February 23, 2023 15:48
@Gonals Gonals self-assigned this Feb 23, 2023
@melvin-bot melvin-bot bot requested review from PauloGasparSv and Santhosh-Sellavel and removed request for a team February 23, 2023 15:49
@MelvinBot
Copy link

@Santhosh-Sellavel @PauloGasparSv 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]

@Gonals Gonals removed the request for review from Santhosh-Sellavel February 23, 2023 15:49
@Gonals
Copy link
Contributor Author

Gonals commented Feb 23, 2023

No need for C+ review on this one

@PauloGasparSv
Copy link
Contributor

PauloGasparSv commented Feb 23, 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.
  • 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 reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Web

Mobile Web - Chrome

Android Web

Mobile Web - Safari

iOS Web

Desktop

Desktop

iOS

iOS

Android

Android

Copy link
Contributor

@PauloGasparSv PauloGasparSv left a comment

Choose a reason for hiding this comment

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

LGTM!

@PauloGasparSv
Copy link
Contributor

PauloGasparSv commented Feb 23, 2023

I think something is wrong with the jest tests, it says they've been running for 2hours

image

Cancelled the workflow and re-running all jobs.

@PauloGasparSv PauloGasparSv merged commit c538383 into main Feb 23, 2023
@PauloGasparSv PauloGasparSv deleted the alberto-tz branch February 23, 2023 18:22
@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 741.451 ms → 765.483 ms (+24.032 ms, +3.2%)
App start runJsBundle 202.344 ms → 207.355 ms (+5.011 ms, +2.5%)
App start nativeLaunch 19.414 ms → 20.710 ms (+1.296 ms, +6.7%)
App start regularAppStart 0.015 ms → 0.016 ms (+0.001 ms, +5.2%)
Open Search Page TTI 623.859 ms → 617.224 ms (-6.635 ms, -1.1%)
Show details
Name Duration
App start TTI Baseline
Mean: 741.451 ms
Stdev: 31.495 ms (4.2%)
Runs: 682.0352719998918 686.6802159999497 694.533205000218 700.3505540001206 705.0629540001974 710.442495000083 719.2881490001455 719.8705560001545 721.4421290000901 723.3716989997774 726.8301389999688 727.9365759999491 728.2041859999299 729.9406499997713 742.2033950001933 743.282318000216 743.4072099998593 745.1343979998492 746.0863720001653 754.1929410002194 755.5115530001931 756.3098690002225 756.7926790001802 756.9451239998452 763.4228949998505 764.5883030002005 769.4178390000015 769.888061999809 776.5966730001383 790.0658350000158 794.1249779998325 822.477332000155

Current
Mean: 765.483 ms
Stdev: 18.871 ms (2.5%)
Runs: 726.2364369998686 733.2850569998845 734.329117000103 744.4659859999083 746.588917999994 752.9049769998528 755.4759129998274 755.5491209998727 755.9343770002015 758.0364310001023 758.2001809999347 758.4405160001479 758.8462310000323 760.1981370002031 765.8035479998216 767.7871209997684 768.3617969998159 768.9360469998792 770.3120459998026 770.361806999892 777.366330999881 778.2844890002161 780.3916349997744 783.5618909997866 784.214246999938 784.9708279999904 793.8533609998412 802.3629510002211 803.953619999811
App start runJsBundle Baseline
Mean: 202.344 ms
Stdev: 18.017 ms (8.9%)
Runs: 172 174 177 178 182 185 186 186 189 190 190 192 193 194 196 202 205 206 207 210 213 213 213 218 221 221 222 223 223 223 227 244

Current
Mean: 207.355 ms
Stdev: 10.428 ms (5.0%)
Runs: 192 192 195 195 198 198 199 201 201 201 202 202 204 204 205 205 205 206 206 209 210 211 211 212 217 218 220 221 225 227 236
App start nativeLaunch Baseline
Mean: 19.414 ms
Stdev: 1.565 ms (8.1%)
Runs: 17 17 18 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 19 20 20 21 21 21 21 22 22 22 23

Current
Mean: 20.710 ms
Stdev: 2.678 ms (12.9%)
Runs: 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 20 20 20 21 21 21 21 22 22 23 23 24 25 26 27 27
App start regularAppStart Baseline
Mean: 0.015 ms
Stdev: 0.001 ms (5.4%)
Runs: 0.013427000027149916 0.013590999878942966 0.013753000181168318 0.013915999792516232 0.01407900033518672 0.014405000023543835 0.014444999862462282 0.014485000167042017 0.014525999780744314 0.0147299999371171 0.014771000016480684 0.014811000321060419 0.014851999934762716 0.014891999773681164 0.014973999932408333 0.015176999848335981 0.01525900000706315 0.015298999845981598 0.015300000086426735 0.015381000004708767 0.015461999922990799 0.015462999697774649 0.015503000002354383 0.015503000002354383 0.015544000081717968 0.015625 0.015868999995291233 0.01599099999293685 0.016032000072300434 0.016682999674230814 0.016764999832957983

Current
Mean: 0.016 ms
Stdev: 0.001 ms (4.3%)
Runs: 0.014771000016480684 0.014851999934762716 0.014973999932408333 0.015015000011771917 0.015096000395715237 0.015136999543756247 0.015217999927699566 0.015339999925345182 0.015420999843627214 0.015502000227570534 0.015503000002354383 0.015542999841272831 0.015625 0.015625 0.015664999838918447 0.015665999613702297 0.01582799991592765 0.01582799991592765 0.015868999995291233 0.015951000154018402 0.01607199991121888 0.016194000374525785 0.016276000067591667 0.016276000067591667 0.016398000065237284 0.016439000144600868 0.0166830001398921 0.0166830001398921 0.016927000135183334 0.017292999662458897 0.01733400020748377
Open Search Page TTI Baseline
Mean: 623.859 ms
Stdev: 29.701 ms (4.8%)
Runs: 587.860067000147 589.7683109999634 590.6668699998409 591.5838629999198 598.2996419998817 600.6716719996184 601.5404869997874 602.4160969997756 602.4563810001127 602.991251999978 604.6630870001391 604.8673510001972 607.0183109999634 609.3087160000578 611.7953699999489 614.5061440002173 617.1654460001737 618.1253259996884 619.9479979998432 620.227498000022 625.369099999778 627.1776940003037 628.6408279999159 631.8307300000452 636.1705729998648 636.4659020002 643.3481040000916 643.9820159999654 661.7614339999855 679.2509360001422 686.1225179997273 693.2361650001258 698.1102709998377

Current
Mean: 617.224 ms
Stdev: 20.228 ms (3.3%)
Runs: 581.507895000279 589.4379079998471 594.5972090000287 595.0019120001234 595.3525800001808 599.9748949999921 600.6199550000019 600.8086349996738 602.1053470000625 602.5358890001662 604.5255950000137 604.5522060003132 605.7336019999348 609.6055100001395 613.6504719997756 616.1524660000578 616.9987789997831 617.8125 619.2893070001155 619.6779789999127 619.6963300001808 621.6053869999014 622.6134449997917 623.0528970002197 632.738322999794 636.3485110001639 636.8409839998931 637.1018469999544 639.4637050000019 641.2545980000868 642.0454099997878 642.5962730003521 683.1074220002629

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/PauloGasparSv in version: 1.2.76-5 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.2.76-7 🚀

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

1 similar comment
@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.2.76-7 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.2.76-7 🚀

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