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

Allow capital letters in room name #14383

Merged

Conversation

jatinsonijs
Copy link
Contributor

Details

Removed auto convert upper case letters to lower in room input. To make form consistent across app Room name input should allow to type capital letters and show validation message on blur about only lower letters are allowed.

Fixed Issues

$ #13676
PROPOSAL: #13676 (comment)

Tests

  1. Login with account which have access to beta features.
  2. Press on plus button -> New room.
  3. It will open New room creation page.
  4. Try to type capital letters in room name. It should allow to type (Shouldn't auto convert to lower).
  5. Blur input or press on Create room. It should show validation error message which indicate only lower letters are allowed.
  • Verify that no errors appear in the JS console

Offline tests

  1. Login with account which have access to beta features.
  2. Press on plus button -> New room.
  3. It will open New room creation page.
  4. Try to type capital letters in room name. It should allow to type (Shouldn't auto convert to lower).
  5. Blur input or press on Create room. It should show validation error message which indicate only lower letters are allowed.

QA Steps

  1. Login with account which have access to beta features.
  2. Press on plus button -> New room.
  3. It will open New room creation page.
  4. Try to type capital letters in room name. It should allow to type (Shouldn't auto convert to lower).
  5. Blur input or press on Create room. It should show validation error message which indicate only lower letters are allowed.
  • 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

Web
web.mov
Mobile Web - Chrome
web-android.mov
Mobile Web - Safari
web-ios.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov

@jatinsonijs jatinsonijs requested a review from a team as a code owner January 18, 2023 14:23
@melvin-bot melvin-bot bot requested review from madmax330 and thesahindia and removed request for a team January 18, 2023 14:23
@melvin-bot
Copy link

melvin-bot bot commented Jan 18, 2023

@madmax330 @thesahindia 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]

@thesahindia
Copy link
Member

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 Screenshot 2023-01-18 at 10 21 27 PM
Mobile Web - Chrome Screenshot 2023-01-18 at 10 33 06 PM
Mobile Web - Safari Screenshot 2023-01-18 at 10 38 58 PM
Desktop Screenshot 2023-01-18 at 10 19 02 PM
iOS Screenshot 2023-01-18 at 10 47 50 PM
Android Screenshot 2023-01-18 at 10 32 25 PM

thesahindia
thesahindia previously approved these changes Jan 18, 2023
Copy link
Member

@thesahindia thesahindia left a comment

Choose a reason for hiding this comment

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

Looks good and works well!

C+ reviewed 🎀👀🎀

cc: @sketchydroide

Comment on lines 4 to 5
* Modifies the room name in the following ways:
* - Replaces spaces with dashes
Copy link
Member

Choose a reason for hiding this comment

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

Ahh, just one small change -

Suggested change
* Modifies the room name in the following ways:
* - Replaces spaces with dashes
* Replaces spaces with dashes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

let me do it @thesahindia

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jatinsonijs
Copy link
Contributor Author

@thesahindia I think @madmax330 have to approve these changes as @sketchydroide have not added in this PR.

@madmax330 madmax330 merged commit 8947130 into Expensify:main Jan 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jan 19, 2023

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

There are no entries

Meaningless Changes To Duration

Show entries
Name Duration
App start TTI 677.717 ms → 698.836 ms (+21.119 ms, +3.1%)
App start runJsBundle 187.000 ms → 190.906 ms (+3.906 ms, +2.1%)
App start regularAppStart 0.016 ms → 0.015 ms (-0.001 ms, -7.6%)
Open Search Page TTI 601.705 ms → 600.999 ms (-0.706 ms, ±0.0%)
App start nativeLaunch 20.933 ms → 20.036 ms (-0.898 ms, -4.3%)
Show details
Name Duration
App start TTI Baseline
Mean: 677.717 ms
Stdev: 31.492 ms (4.6%)
Runs: 616.6834339997731 634.3498399998061 639.9657200002111 641.0356279998086 641.279370999895 645.3624419998378 647.7195310001262 650.4427439998835 655.1462090001442 660.2175870002247 666.2379029998556 666.3832189999521 666.7335020001046 667.0987410000525 670.8011480001733 673.4382939999923 674.0827689999714 676.4374899999239 684.6118419999257 685.561697000172 687.7336659999564 688.8603839999996 690.0897260000929 691.1448530000634 699.2480589998886 704.0036880001426 705.5054709999822 717.0308819999918 719.6087150000967 723.6665750001557 747.0619850000367 749.3930950001813

Current
Mean: 698.836 ms
Stdev: 30.674 ms (4.4%)
Runs: 662.5192040000111 662.9813459999859 665.775096999947 667.3392099998891 668.739515000023 668.9669789997861 671.9210560000502 672.6852250001393 673.7451430000365 675.4155239998363 675.6958249998279 677.5423860000446 680.8368159998208 683.1959520000964 684.5551510001533 687.1181350001134 688.5252580000088 695.5961159998551 696.7417270001024 702.646230999846 704.8367429999635 710.6397230001166 716.2982520000078 719.4383140001446 722.3637769999914 727.2676610001363 728.5487560001202 742.2848570002243 745.1903690001927 750.5269820000976 764.2277569998987 768.5943889999762
App start runJsBundle Baseline
Mean: 187.000 ms
Stdev: 19.842 ms (10.6%)
Runs: 161 161 165 165 165 168 169 169 173 176 178 178 178 179 181 181 182 184 186 187 190 193 194 195 198 207 210 213 215 216 223 244

Current
Mean: 190.906 ms
Stdev: 17.025 ms (8.9%)
Runs: 169 169 169 170 171 174 174 176 176 178 179 179 182 183 189 189 189 191 192 196 199 200 200 200 200 206 209 213 213 223 224 227
App start regularAppStart Baseline
Mean: 0.016 ms
Stdev: 0.001 ms (7.1%)
Runs: 0.014403999783098698 0.014405000023543835 0.014485000167042017 0.014527000021189451 0.014566999860107899 0.014566999860107899 0.01460800040513277 0.014851999934762716 0.014932999853044748 0.015054999850690365 0.015177999623119831 0.01525900000706315 0.015298999845981598 0.015339999925345182 0.015381000004708767 0.015421999618411064 0.015462000388652086 0.015583999920636415 0.015705999918282032 0.01578700030222535 0.015868999995291233 0.01643799990415573 0.016478999983519316 0.01660200022161007 0.0166830001398921 0.016764000058174133 0.017211999744176865 0.017862999811768532 0.018269000109285116 0.01831099996343255

Current
Mean: 0.015 ms
Stdev: 0.001 ms (5.3%)
Runs: 0.013428000267595053 0.01346899988129735 0.013508999720215797 0.013712999876588583 0.013754000421613455 0.013876000419259071 0.013916000258177519 0.013956999871879816 0.013956999871879816 0.014037999790161848 0.014078999869525433 0.01411899970844388 0.014241000171750784 0.014281999785453081 0.014322999864816666 0.01436399994418025 0.014403999783098698 0.014405000023543835 0.014566999860107899 0.014568000100553036 0.0147299999371171 0.014769999776035547 0.014811000321060419 0.014851000159978867 0.015015000011771917 0.015461999922990799 0.015501999761909246 0.015666000079363585 0.015705999918282032 0.015910000074654818 0.016561000142246485
Open Search Page TTI Baseline
Mean: 601.705 ms
Stdev: 22.358 ms (3.7%)
Runs: 562.6835119999014 568.540527000092 572.5641280002892 577.0927329999395 577.2864999999292 577.5400399998762 577.5777179999277 578.2022300004028 581.4375819996931 583.0297039998695 585.0045570000075 587.6586509998888 595.2470709998161 595.3400879995897 600.1586509998888 602.9866129998118 603.7939459998161 607.0142009998672 607.5357659999281 611.4743650001474 612.5906989998184 614.1287429998629 614.3352049998939 615.6781820002943 615.8989669997245 617.0300290002488 618.4464920000173 621.837686999701 623.6321209999733 623.7557379999198 625.1370860002935 634.5022789998911 667.1186939999461

Current
Mean: 600.999 ms
Stdev: 14.775 ms (2.5%)
Runs: 575.5557050001808 579.8953050002456 580.3044030000456 583.4601640002802 584.7703859996982 584.894328000024 586.8511560000479 587.8328459998593 588.7460130001418 590.5520429997705 591.3152670003474 593.5160319996066 594.334025000222 600.5237630000338 600.7115889997222 604.9463299997151 604.991333999671 605.5395920001902 606.6398109998554 608.3514000000432 610.1152350003831 610.2514250003733 612.7480870001018 613.8522949996404 615.6060790000483 615.8656829996035 616.3732500001788 622.136758999899 628.8547370000742 630.4449460003525
App start nativeLaunch Baseline
Mean: 20.933 ms
Stdev: 1.769 ms (8.4%)
Runs: 18 18 19 19 19 19 19 19 20 20 20 20 21 21 21 21 21 21 22 22 22 22 22 22 22 23 23 23 23 26

Current
Mean: 20.036 ms
Stdev: 2.163 ms (10.8%)
Runs: 17 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 20 20 21 21 21 22 22 22 22 23 25 26

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/madmax330 in version: 1.2.57-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.57-3 🚀

platform result
🤖 android 🤖 failure ❌
🖥 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