App: [HOLD for payment 2022-05-20][$1000] - Audit forms and fix inconsistencies with modifying user input
We should audit all our forms and fix any inconsistencies with modifying user input. The expected behavior is as follows:
- User input should not be modified as they type.
- User input that may include optional characters (e.g.
(, ), -in a phone number) and should never be restricted on input, nor be modified or formatted on blur. - Instead we will format and clean the user input internally before using the value (e.g. making an API request where the user will never see this transformation happen)
- Additionally, users should always be able to copy/paste whatever characters they want into fields.
To give a slightly more detailed example of how this would work with phone numbers we should:
- Allow any character to be entered in the field.
- On blur, strip all non-number characters (with the exception of + if the API accepts it) and validate the result against the E.164 regex pattern we use for a valid phone. Stripping characters should happen internally and result in NO UI change to the user.
- On submit, repeat validation and submit with the clean value.
Here’s a list of forms to be audited:
- AddPlaidBankAccount.js
- ACHContractStep.js
- BankAccountStep.js
- CompanyStep.js
- RequestorStep.js
- ValidationStep.js
- Workspace - Invite new members
- Workspace - General settings
- IOU flow
- KYC flow
- New Room screen
- Add Debit card flow
- Add Personal Bank account flow
- Settings - Change Password
- Settings - Profile
- Login form
- Password form
- Set password
- New password form
- Request a Call modal
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 75 (54 by maintainers)
@puneetlath please note that we should add one milestone per 5 forms (4 milestones total).
Hmm that seems to be out of scope for this issue.
Shouldn’t this be convered as part of this issue?
@JmillsExpensify Yes! This was the last payment so I believe that all milestones have been paid out. Thanks for working on this!
A couple more days left on the 7-day hold for that last PR.
@JmillsExpensify as per this comment, there should be 4x $250 milestones for this job, for a total of $1000. As of now, 3/4 milestones have been completed ($750).
@eVoloshchak when do you think you can complete the last 4 audits?
@JmillsExpensify For this issue, there are 4 milestones on Upwork. Each milestone requires an audit of 5 pages.
And @eVoloshchak has audited 16 pages. So it’s fair to pay for 3 milestones ($750). Let me know if this clarifies it. Thanks!
The remaining could be settled after the latest PR https://github.com/Expensify/App/pull/8764 is on production for 7 days
@eVoloshchak yes!
Looks like this is still being discussed in Slack.
Thanks for the quick feedback!
Not yet 😃 We need some consensus first. Edit: slack 🧵 here https://expensify.slack.com/archives/C01GTK53T8Q/p1649702197809359
Yeah, I too was thinking about max length interfering with
users should always be able to copy/paste whatever characters they want into fieldsrequirement, but figured I should leave the max length as it is.I’ll remove max length, if that’s the requirement, no problem 😃
I’ll prepare a list of errors I need English and Spanish translations for (something like “SSN/Zip/CVV can’t be longer than
xdigits”) Can I start working on this or is it up for discussion on Slack?I’ve updated my original comment with videos for each audited form
Thank you
Sorry for the huge delay. I’m planning to submit first PR in two days, if I don’t do that, please release it to the pool (I’ll try to leave a message if I can’t finish the job, but there’s huge problems with internet access, so I might not be able to, so consider absence of the pr in two days as this message). Again, sorry for the delay, I’ll try to make sure this never happens again
I’m going to switch this to weekly while we await @eVoloshchak’s pull request.
@eVoloshchak that’s understandable, please take care. Please take your time, looking forward for your PR 😃
Started working on it, will submit first PR on Monday. It’s taking me more time than expected due to an extreme situation in Ukraine, sorry for that
@JmillsExpensify @deetergp I’m about to head out on my two-month sabbatical, so handing this off to you. Thanks!
Contract for the fix: https://www.upwork.com/ab/c/8577561/contracts/29631996#milestones%2F20220203%2F20220304 C+ contract: https://www.upwork.com/ab/c/8577561/contracts/29631752#milestones%2F20220203%2F20220304
Got it. I was planning to submit them in groups of 4-5.
Submitted a proposal on Upwork
🎀👀🎀 C+ reviewed
@puneetlath I think we’re good to assign @eVoloshchak this issue 😄