App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2021-09-27] IOU - Modal is shifted to the left when entering a long amount number

Open isagoico opened this issue 5 years ago β€’ 35 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Navigate to NewDot
  2. Click on request money
  3. Enter an amount of over 15 numbers

Expected Result:

Modal should stay on the visible area of the screen

Actual Result:

Modal is shifted to the left and button is not completely visible.

Workaround:

N/A

Platform:

Where is this issue confirmed?

  • Web

Version Number: 1.0.94-0

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

image

Expensify/Expensify Issue URL:

View all open jobs on GitHub


From @akshayasalvi https://expensify.slack.com/archives/C01GTK53T8Q/p1630779418448200

When I enter the 15 to 20 digits long amount in Request Money it goes out of the screen (amount is cut). Also, the button aligned is misplaced. Screenshot attached in the thread.

isagoico avatar Sep 07 '21 00:09 isagoico

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

MelvinBot avatar Sep 07 '21 00:09 MelvinBot

Proposed Solution

If we know that we're going to have a max value for the amount then we should add a maxLength property to the amount field. I added 14 and it worked fine. Then basically it didn't messed up the alignment of the the button as well.

<TextInputAutoWidth
   inputStyle={styles.iouAmountTextInput}
   ...
   ...
   ...
   value={this.state.amount}
   maxLength={14}
/>

akshayasalvi avatar Sep 07 '21 04:09 akshayasalvi

15 digits would be 900 billion max, currently the richest person in the world is Jeff Bezos with an estimated 177 billion and while I do hope we eventually have Mr Bezos using expensify to settle up his IOUs I don't think 15-20 digit numbers are going to be super common use case here so I think I agree we should just add a maxLength attribute here and be done with it.

bondydaa avatar Sep 07 '21 17:09 bondydaa

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

MelvinBot avatar Sep 07 '21 17:09 MelvinBot

i don't think this needs to be a daily so once the job is created we could move this to weekly or monthly.

bondydaa avatar Sep 07 '21 17:09 bondydaa

Maybe countries with high inflations might be affected by this, e.g Venezuela, currently 1$ is equal to 4.200.000 Bs. So having an IOU of 1000$ would be 4.200.000.000 Bs. It still doesn't reach the 14 digit mark so I agree with Bondy that this will not be a common issue.

isagoico avatar Sep 07 '21 17:09 isagoico

Yeah that crossed my mind too but for the time being I believe IOUs can only be in USD. Though something might have changed there that I might have missed so if we think it might be more common then maybe style changes are needed.

On Tue, Sep 7, 2021 at 11:39 AM Isabella Goicoechea < @.***> wrote:

Maybe countries with high inflations might be affected by this, e.g Venezuela, currently 1$ is equal to 4.200.000 Bs. So having an IOU of 1000$ would be 4.200.000.000 Bs. It still doesn't reach the 14 digit mark so I agree with Bondy that this will not be a common issue.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Expensify/App/issues/5115#issuecomment-914496907, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7CPCWA6WY7EUESXSY37JTUAZE6NANCNFSM5DRH7AJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bondydaa avatar Sep 07 '21 17:09 bondydaa

Yeah that crossed my mind too but for the time being I believe IOUs can only be in USD

That's not correct. At the moment IOUs can be in any currency available in the currency list.

image

isagoico avatar Sep 07 '21 18:09 isagoico

Considering that the issue is uncommon, I suggested the maxLength fix rather than the style change in the IOUModal and related child components.

akshayasalvi avatar Sep 07 '21 20:09 akshayasalvi

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

MelvinBot avatar Sep 09 '21 17:09 MelvinBot

Posted to Upwork here: https://www.upwork.com/jobs/~013d0ec60b16212278

@deetergp looks like we have a proposal in this comment.

stephanieelliott avatar Sep 09 '21 17:09 stephanieelliott

I agree that we can kick the can down the street on 15+ digit numbers for the time being. Let's go with @akshayasalvi proposal of just adding a max length of 14 digits.

deetergp avatar Sep 09 '21 18:09 deetergp

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

botify avatar Sep 13 '21 17:09 botify

Hey @akshayasalvi can you please propose to the job post in Upwork so I can hire and pay you for this: https://www.upwork.com/jobs/~013d0ec60b16212278

stephanieelliott avatar Sep 13 '21 17:09 stephanieelliott

@stephanieelliott Done. Thanks for the help.

akshayasalvi avatar Sep 13 '21 17:09 akshayasalvi

πŸš€ Deployed to staging by @marcaaron in version: 1.0.97-1 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Sep 13 '21 19:09 botify

πŸš€ Deployed to production by @francoisl in version: 1.0.98-1 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Sep 15 '21 20:09 botify

πŸš€ Deployed to production by @francoisl in version: 1.0.98-1 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Sep 15 '21 20:09 botify

πŸš€ Deployed to staging by @francoisl in version: 1.0.98-2 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Sep 15 '21 21:09 botify

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.0.98-1 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pulls/5192\n- https://github.com/Expensify/App/pulls/5243\n

If no regressions arise, payment will be issued on 2021-09-27. :confetti_ball:

botify avatar Sep 20 '21 20:09 botify