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

Use left/right arrow keys to move cursor in IOUAmountPage #3779

Closed
rushatgabhane opened this issue Jun 28, 2021 · 12 comments
Closed

Use left/right arrow keys to move cursor in IOUAmountPage #3779

rushatgabhane opened this issue Jun 28, 2021 · 12 comments
Assignees
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement.

Comments

@rushatgabhane
Copy link
Member

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Request money to any user.
  2. Enter an amount.
  3. Use left/right arrow key to move the cursor.

Expected Result:

The cursor on the amount should move with left/right arrow key press.

Actual Result:

Arrow keys don't move the cursor.
image

Workaround:

Use backspace key to modify amount.

Platform:

Where is this issue occurring?

Web ✔
iOS
Android
Desktop App ✔
Mobile Web

Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:

View all open jobs on Upwork

@rushatgabhane rushatgabhane added the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Jun 28, 2021
@MelvinBot
Copy link

Triggered auto assignment to @conorpendergrast (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Jun 28, 2021
@rushatgabhane
Copy link
Member Author

rushatgabhane commented Jun 29, 2021

Proposal

Replace onKeyPress prop with onChangeText prop to handle amount changed.

onChangeText={(amount) => {
     // Regex to validate decimal number with up to 3 decimal numbers
    const decimalNumberRegex = new RegExp(/^\d+(\.\d{0,3})?$/, 'i');
    if (amount != '' && !decimalNumberRegex.test(amount)) {
        return;
    }
    this.setState({amount});
}}

https://github.com/Expensify/Expensify.cash/blob/a1c742c194084b6b65c3f29225d25d3cfe08cce4/src/pages/iou/steps/IOUAmountPage.js#L162-L172

Works fine on initial testing.

NEW.Expensify.cash.-.Google.Chrome.2021-06-29.03-11-09.mp4

@conorpendergrast
Copy link
Contributor

Reproduced, agreed that this is worth fixing. I don't have a comment on the proposed solution here - moving to Engineering for triage!

@conorpendergrast conorpendergrast added Weekly KSv2 Improvement Item broken or needs improvement. labels Jun 29, 2021
@conorpendergrast conorpendergrast removed their assignment Jun 29, 2021
@MelvinBot
Copy link

Triggered auto assignment to @TomatoToaster (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@TomatoToaster
Copy link
Contributor

Feels like a classic external ticket to me.

@TomatoToaster TomatoToaster added the External Added to denote the issue can be worked on by a contributor label Jun 29, 2021
@MelvinBot
Copy link

Triggered auto assignment to @jliexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@MelvinBot MelvinBot added Daily KSv2 and removed Weekly KSv2 labels Jun 29, 2021
@TomatoToaster TomatoToaster removed their assignment Jun 29, 2021
@jliexpensify
Copy link
Contributor

@MelvinBot
Copy link

Triggered auto assignment to @roryabraham (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@jliexpensify
Copy link
Contributor

@roryabraham - got a proposal from @rushatgabhane already, if you could take a look. Cheers!

@roryabraham
Copy link
Contributor

Solution seems perfectly reasonable to me @rushatgabhane!

@jliexpensify let's get @rushatgabhane hired on Upwork.

@rushatgabhane feel free to submit a pull request as soon as you've been hired on Upwork. Since I reviewed the proposal, please request a review from me when you submit the pull request. Thanks!

@jliexpensify
Copy link
Contributor

Hired @rushatgabhane - cheers!

@jliexpensify
Copy link
Contributor

Deployed, and paid @rushatgabhane - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement.
Projects
None yet
Development

No branches or pull requests

6 participants