Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default country code setting #21

Open
saltsoftdrink opened this issue Apr 15, 2024 · 1 comment
Open

Add default country code setting #21

saltsoftdrink opened this issue Apr 15, 2024 · 1 comment
Milestone

Comments

@saltsoftdrink
Copy link

Add default country code option for users

@vinaygopinath vinaygopinath added this to the 1.4.0 milestone Nov 23, 2024
@vinaygopinath vinaygopinath changed the title country code Add default country code setting Dec 5, 2024
@vinaygopinath
Copy link
Owner

Problem

It is tedious and time-consuming to specify the country code along with each phone number

Solution

Add an option to specify a default country code and, when a country code is not specified, use the default country code.

Acceptance criteria

This issue has overlap with #4

  1. Add a new setting with the following properties
    • Title: Default action when country code is missing
    • Short title: Missing country code action
    • Description: Choose what to do when a phone number does not include a country code
    • Options
      • Use a default country code
      • Use the most recent country code
  2. When the user selects the "Use a default country code" option, enable a new setting with the following properties
    • Title: Default country code
    • Hint: Country code starting with +
    • Input type: phone number
    • Description (when country code is set): When a phone number is missing the country code, +XX will be used (where +XX is the user-entered default country code)
    • Description (when country code is not set): (Required) Please specify a default country code
    • Disabled description: Not used because the default missing country code action is "use the most recent country code".
  3. Observe the selected value of the missing country code action and toggle the enabled/disabled status of the "default country code" option.
  4. When an entered phone number is missing the country code, the missing country code action is set to "Default country code" and the default country code is set, prefix the phone number with the entered country code.
  5. When an entered phone number is missing the country code, the missing country code action is set to "Default country code" but the default country code is not set, continue the default behaviour of passing the phone number as-is to the chat app.
  6. When an entered phone number includes the country code, use the included country code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants