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

Disable letters in Rate under Track Distance #7931

Merged

Conversation

kakajann
Copy link
Contributor

@kakajann kakajann commented Feb 28, 2022

Details

Keyboard type changed to prevent to type letters in Rate under Track Distance

Fixed Issues

$ #7712

Tests

  • Verify that no errors appear in the JS console

PR Review Checklist

Contributor (PR Author) Checklist

  • I made sure to pull main before submitting my PR for review
  • 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 clearly indicated the environment tests should be run in (Staging vs Production)
  • I wrote testing steps that cover success & fail scenarios (if applicable)
  • I ran the tests & they passed on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified there are no console errors related to changes in this PR
  • I followed proper code patterns (see Reviewing the code)
    • I added comments when the code was not self explanatory
    • I put all copy / text shown in the product in all src/languages/* files (if applicable)
    • I followed proper naming convention for platform-specific files (if applicable)
    • I followed style guidelines (in Styling.md) for all style edits I made
  • I followed the guidelines as stated in the Review Guidelines

PR Reviewer Checklist

  • I verified the Author pulled main before submitting the PR
  • 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 testing environment is mentioned in the test steps
  • I verified testing steps cover success & fail scenarios (if applicable)
  • I verified tests pass on all platforms & I tested again on all platforms
  • I checked that screenshots or videos are included for tests on all platforms
  • I verified there are no console errors related to changes in this PR
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified comments were added when the code was not self explanatory
    • I verified any copy / text shown in the product was added in all src/languages/* files (if applicable)
    • I verified proper naming convention for platform-specific files was followed (if applicable)
    • I verified style guidelines were followed
  • I verified that this PR follows the guidelines as stated in the Review Guidelines

QA Steps

  1. Launch the app and log in with any account
  2. Go to Setting
  3. Tap on any Workspace you have in your account
  4. Go to Reimburse expenses
  5. Verify you can not type letters
  • Verify that no errors appear in the JS console

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Screen.Recording.2022-02-28.at.11.01.37.AM.mov

Mobile Web

Screen.Recording.2022-03-02.at.2.02.08.PM.mov

Desktop

Screen.Recording.2022-03-02.at.1.58.41.PM.mov

iOS

Screen.Recording.2022-02-28.at.10.57.32.AM.mov

Android

Screen.Recording.2022-02-28.at.11.10.19.AM.mov

@kakajann kakajann requested a review from a team as a code owner February 28, 2022 05:56
@MelvinBot MelvinBot requested review from parasharrajat and pecanoro and removed request for a team February 28, 2022 05:56
Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

There are a couple of things on the checklist.
image

Please complete those which are required. (not marked with if applicable).

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

I will continue my review when all the required checklist items are done and STYLING.md is followed. Thanks.

@kakajann
Copy link
Contributor Author

kakajann commented Mar 1, 2022

There are a couple of things on the checklist. image

Please complete those which are required. (not marked with if applicable).

There are things that I didn't modify, Styles for example, should I still mark it?

@parasharrajat
Copy link
Member

Please add screenshots /videos of al platforms and tick the box

@parasharrajat
Copy link
Member

I am not able to reproduce the issue on staging. Could you please test it @kakajann on prod or staging?

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

Thanks for the changes.

Co-authored-by: Rajat Parashar <parasharrajat@users.noreply.github.com>
Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

It looks good. The only thing that I noticed is that user can enter 10.000.00.000 which include multiple decimals.

@pecanoro
Copy link
Contributor

pecanoro commented Mar 3, 2022

So this should pick up invalid extra decimals [0-9]+\.[0-9]+\., but I am not sure how we could incorporate it, if that regex is detected should we return and not update the value and leave it as it was?

@parasharrajat
Copy link
Member

parasharrajat commented Mar 3, 2022

Yup, I think so Just don't update the state. That should work. Right?

@kakajann
Copy link
Contributor Author

kakajann commented Mar 3, 2022

That's good idea. I'll update the code tomorrow

@@ -116,6 +102,32 @@ class WorkspaceReimburseNoVBAView extends React.Component {
}, null);
}

handleKeyPress = (event) => {
Copy link
Member

Choose a reason for hiding this comment

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

No inline functions. Function names should reflect what they do instead of where they are used.

Suggested change
handleKeyPress = (event) => {
debounceUpdateOnCursorMove(event) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

@parasharrajat parasharrajat Mar 14, 2022

Choose a reason for hiding this comment

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

Sorry, I don't see this change. Did you push it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, sorry, just a sec

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed now

@parasharrajat
Copy link
Member

@kakajann Please merge main. Thanks.

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

Thanks for the changes looks good.

cc: @pecanoro

PR Reviewer Checklist

  • I verified the PR has a small number of commits behind main
  • 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 testing environment is mentioned in the test steps
  • I verified testing steps cover success & fail scenarios (if applicable)
  • I checked that screenshots or videos are included 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
  • I verified there are no console errors related to changes in this PR
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified comments were added when the code was not self explanatory
    • I verified any copy / text shown in the product was added in all src/languages/* files (if applicable)
    • I verified proper naming convention for platform-specific files was followed (if applicable)
    • I verified style guidelines were followed
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components are not impacted by changes in this PR (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 the UI performance was not affected (the performance is the same than main branch)
  • If a new component is created I verified that a similar component doesn't exist in the codebase

🎀 👀 🎀 C+ reviewed

@pecanoro pecanoro merged commit 39e1ad2 into Expensify:main Mar 14, 2022
@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.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @pecanoro in version: 1.1.43-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @roryabraham in version: 1.1.43-2 🚀

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

@trjExpensify
Copy link
Contributor

👋 @kakajann @parasharrajat @pecanoro - I think this PR has caused a regression that prevents users from entering three decimal places. Can we look into fixing that, please? The default IRS rate is 0.585, so it's pretty important!

@sonialiap
Copy link
Contributor

Issue for the decimal place rounding down to two instead of three https://github.com/Expensify/Expensify/issues/202283

@kakajann
Copy link
Contributor Author

I thought we should round the value down to 2 decimal places. I can make it 3 if it's what has to be done

@sonialiap
Copy link
Contributor

Yes please! The IRS rate is 3 decimal places and since we must follow their rules, we need 3 :)

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.

6 participants