calcom / cal.com

Scheduling infrastructure for absolutely everyone.
https://cal.com
Other
32.3k stars 7.95k forks source link

Phone Number Field / Location Not Working Due To Poor UX Around Country Code (bug) #16126

Open DEODENTALNICK opened 3 months ago

DEODENTALNICK commented 3 months ago

Issue Summary

Cal.com seems to put the responsibility of inputting the country code and/or the country on the user when inputting phone number as a field and/or location.

This is a very poor user experience as very few people enter their country code when inputting their phone number. Cal.com should have a default country code option in settings or something so that country and country code are prefilled for users when they come to a page.

As it stands, cal.com is pretty much unusable as this user experience is so poor.

Steps to Reproduce

  1. Went to one of our calendars
  2. Started entering phone number in phone number field without country code

Expected behavior

There should be an option for country and country code to default and prefill to a certain country. It should not be the responsibility of the user to select their country and country code.

Other information

No response

Screenshots

https://github.com/user-attachments/assets/07abf342-5e33-410f-9d2b-a4792348b237

Environment

Desktop (please complete the following information)

- OS:
- Node:
- npm:
hunterwilhelm commented 3 months ago

Related to #15931 and #15991

vijayraghav-io commented 3 months ago

This PR #16138 follows different approach compared to earlier PR #16012 ( in this default country and autodetection was disabled).

In this new PR #16138 , default country and autodetection of country is enabled ( as it was earlier ), with handling of Autofill. The approach implemented here is -

  1. If user inputs correct length of national number for a selected country ( initially default country is taken as selected country )
  2. The country code is prefixed to above input national number, this prevents wrong autodetection of country code.
  3. If user inputs wrong number of national number digits, prefixing does not happen, because anyhow user will edit and can update country code. This does not happen with Autofill. Usually we store correct number in Autofill.
  4. If we have wrong ( or invalid ) phone number in Autofill, we need not handle this.
sumukhj1219 commented 3 months ago

/assign #16126