Add Inputmode for tel and email (identities)#1384
Conversation
helps improve the UX for users with virtual keyboards (mobile devices and tablets
|
@danielleflinn Any thoughts from the design aspects? My primary concern is that it won't be possible to input non-numeric characters in the phone input. But I'm not sure why anyone would do that in the first place. I took a look at our mobile app, and inputmode for email seems to be email, but text for phone. |
|
It is a standard UX pattern to restrict input for a phone field to just numbers. The only potential concern I can think of is I don't believe we are formatting that field currently so any entry would be difficult to read since it'd show up as "5554443333". Ideally we'd format the input number automatically to "555-444-3333"; however being an international product, this introduces it's own challenges in identifying what phone number format to use by region. All in all, I do agree that only allowing numerical digits in the phone fields does improve the experience even without the ability to format the numbers. |
|
We could use https://github.com/google/libphonenumber for parsing and formatting. There's also a port of it in C# which could be used on mobile. |
|
@djsmith85 Difficult thing is figuring out what region a number is for. (I guess we have a country field in identity that could be used for displaying though) |
|
Merged, thanks for the contribution @coliff. |
helps improve the UX for users with virtual keyboards (mobile devices and tablets
Type of change
Objective
Helps improve the UX for users with virtual keyboards (mobile devices and tablets).
Code changes
This PR supercedes: #661
I wrote about inputmode for CSS Tricks:
https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode/#aa-tel
https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode/#aa-email
Before you submit
npm run lint) (required)