ecency / ecency-mobile

Ecency Mobile - reimagined social blogging, contribute and get rewarded (for Android and iOS)
https://ecency.com
MIT License
233 stars 69 forks source link

user name validation checks in register screen #2660

Closed aliseyalvi closed 1 year ago

aliseyalvi commented 1 year ago

What does this PR?

Added user name validation checks in register screen

Issue number

fixes #2659

Screenshots/Video

https://user-images.githubusercontent.com/48380998/226172557-a874124d-25de-4a52-b70a-502b9ca005e6.mp4

noumantahir commented 1 year ago

Change Requests

  1. When user first enters the SignUp screen, the username and email fields are red by default, try to make them white when fields are empty. I believe it was functioning this way before but some update might have messed it up.

Screenshot 2023-03-20 000940

  1. As suggested by @aliseyalvi, if username is incorrect we should show red button instead of x (icon can be red exclamation mark enclosed in a circle), tapping on it should reveal popover with description, it can either contain the description of issue with user typed name or may just contain complete rules if they can be kept brief like...

    Use alphanumeric characters, avoid special characters like _ , -- @feruzm please suggest any

Screenshot 2023-03-20 001638

  1. Keep the default @ icon displayed as fallback when user avatar is not present both for valid and invalid usernames. current behavior hides the icon making an awkward white space. Screenshot 2023-03-20 001756
aliseyalvi commented 1 year ago

@noumantahir

https://user-images.githubusercontent.com/48380998/226983548-00997884-6e54-4520-811b-b3d75347f5d4.mp4

noumantahir commented 1 year ago

@aliseyalvi some minor changes...

  1. try using info-outline icon instead of using filed red icon.
  2. text updates:
    "Should contains letters, numbers, hyphen only" -> "Should contains letters, numbers, hyphen only"
    "This usernames already exists. Please, try another one" -> "Username already exists, try a different one"
  3. when user starts typing the error appears instantly which might offend users (Recording attached), try adding a 500 ms delay in callback processing just like we do with a number of text inputs using debounce from loadash, check example in MarkdownEditorView _debouncedOnTextChange if needed
  4. tapping on popover button hides keyboard and renders popover on at a weird position (Screenshot attached)

https://user-images.githubusercontent.com/6298342/227517206-17746f56-8b7f-4006-8aeb-335e34ee3dc2.mov

Screenshot 2023-03-24 at 5 17 31 PM

aliseyalvi commented 1 year ago

https://user-images.githubusercontent.com/48380998/227599113-815fd3aa-f886-49ab-ad2e-a2cbc05ea7a6.mp4