Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.49k stars 2.85k forks source link

[HOLD #2934] Enhancements for "Debounce account search typing & fix how validation displays in UI" #2936

Closed mallenexpensify closed 3 years ago

mallenexpensify commented 3 years ago

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


On hold for #2934 since that one adds a necessary fix to phone number validation, and this one builds on that

These are enhancements are related to https://github.com/Expensify/Expensify.cash/issues/2934. Please review that job for more details Whomever is assigned that issue can work on these concurrently or after 2934 is fixed. If the assigner of 2934 doesn't want to work on this issue then it's held for anyone else until a week after 2934 is closed (to ensure there aren't regressions)

Enhancements:

When entering an email address or phone number in OptionsSelector's TextInputWithFocuStyles (on all screens where this exists), the app should do a few things:

  1. Show a spinner when user is typing (debounce input, so stop showing spinner 300ms after user stops typing and do validation checks below)
  2. When user has stopped typing for 300ms, do basic front-end validation checks
    • Email validation looks decent for now (Str.isValidEmai and !Str.isDomainEmail)
    • Phone number validation should get more strict, it's super basic at the moment (see Str.isValidPhone)
  3. If above validation passes, do API-level validation for phone numbers only
    • Call the new Expensify API command IsValidPhoneNumber, which validates phone numbers in this format: '(\+?\d{10,15}|\d\d\d-\d\d\d-\d\d\d\d)'.

Make sure validation error messages still show correctly

View all open jobs on Upwork

mallenexpensify commented 3 years ago

Canceled job in Upwork