Phone fields help with the country and its dialling code #53

Closed
opened 2026-09-06 15:46:49 +00:00 by tiagoagueda · 0 comments
Owner

Observation

exibit phone indicative helper on phonenumber fields, in the flag on the country /region
and the corresponding international dial code

Why

A recruiter's number written down as 06 12 34 56 78 cannot be dialled from anywhere else,
and the person writing it down is not thinking about that at the time. A field that offers
the country and puts +33 in front fixes the number at the only moment anybody has the
context.

What exists today

Contact.phone and Profile.phone are plain 40-character fields with no structure and no
help of any kind.

Shape

  • A country beside the field, defaulting to the person's own, showing the flag (the
    mapping from #52) and the dialling code, and prefixing what is typed unless the person
    typed a + themselves.
  • Stored in E.164 (+33612345678) where the number can be understood, and exactly as
    typed where it cannot. A number nobody can parse is still worth keeping; refusing to save
    it would be the worst possible outcome.
  • Shown grouped the way that country groups it, with a tel: link so it can be dialled
    from a phone, which is where half of these calls happen.
  • The country list is static data and small: about 250 rows of country, dialling code and
    flag.

Classification

Enhancement. Not breaking: the field keeps its text, and whatever is already in it is left
alone.

Depends on

#52, for the flags.

Open questions

  1. phonenumbers, or a static table and no validation? The library formats and validates
    every country properly and weighs several megabytes. Proposal: the table, and no claim
    that a number is valid — Postulo does not need to know that, only to keep something
    dialable.
  2. Is an existing number normalised when it is next edited? Proposal: only when the person
    changes it, never silently behind them.
## Observation > exibit phone indicative helper on phonenumber fields, in the flag on the country /region > and the corresponding international dial code ## Why A recruiter's number written down as `06 12 34 56 78` cannot be dialled from anywhere else, and the person writing it down is not thinking about that at the time. A field that offers the country and puts `+33` in front fixes the number at the only moment anybody has the context. ## What exists today `Contact.phone` and `Profile.phone` are plain 40-character fields with no structure and no help of any kind. ## Shape - **A country beside the field**, defaulting to the person's own, showing the flag (the mapping from #52) and the dialling code, and prefixing what is typed unless the person typed a `+` themselves. - **Stored in E.164** (`+33612345678`) where the number can be understood, and exactly as typed where it cannot. A number nobody can parse is still worth keeping; refusing to save it would be the worst possible outcome. - **Shown grouped** the way that country groups it, with a `tel:` link so it can be dialled from a phone, which is where half of these calls happen. - The country list is static data and small: about 250 rows of country, dialling code and flag. ## Classification Enhancement. Not breaking: the field keeps its text, and whatever is already in it is left alone. ## Depends on #52, for the flags. ## Open questions 1. `phonenumbers`, or a static table and no validation? The library formats and validates every country properly and weighs several megabytes. Proposal: the table, and no claim that a number is valid — Postulo does not need to know that, only to keep something dialable. 2. Is an existing number normalised when it is next edited? Proposal: only when the person changes it, never silently behind them.
tiagoagueda added this to the 0.2.0 milestone 2026-09-06 15:46:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Postulo/postulo#53
No description provided.