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

Default country for phone numbers should be defined at the field level #4952

Closed
FelixMalfait opened this issue Apr 13, 2024 · 5 comments
Closed

Comments

@FelixMalfait
Copy link
Member

FelixMalfait commented Apr 13, 2024

Just noticed we assumed by default the country is FR which is wrong. We should be be able to set the default country at the field level and/or at the address level. Same for the address field - we should introduce a country dropdown with a similar default value.

https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/ui/field/display/components/PhoneDisplay.tsx

Also the default country should be the US not FR.

@FelixMalfait FelixMalfait changed the title Default country for phone numbers should be defined at the user-level or field Default country for phone numbers should be defined at the field level Apr 16, 2024
@FelixMalfait FelixMalfait added blocked: design needed This doesn't seem right and removed blocked: design needed This doesn't seem right labels Apr 16, 2024
@FelixMalfait
Copy link
Member Author

FelixMalfait commented Apr 16, 2024

Copy design and implementation from currency.
It should be very similar approach, except the list is a list of countries and not a list of currencies.

Screenshot 2024-04-16 at 11 56 48

The default value should be US upon field creation (but can be changed in settings)

Copy link
Contributor

gitstart-app bot commented Apr 16, 2024

Here is the GitStart Ticket for this issue: https://clients.gitstart.com/twenty/5449/tickets/TWNTY-4952

@gitstart-twenty
Copy link
Contributor

Hey @FelixMalfait,

Just to confirm, we're converting the phone field from a string to a composite that will also include the countryCode.

The address is already a composite that includes the countryCode, we just need to add the country picker for it.

If yes, are we also handling migrating the current phoneNumbers to this new type?

Cheers!

@FelixMalfait
Copy link
Member Author

@gitstart-twenty since you have tackled #6882 you should be able to pickup this one now

@FelixMalfait
Copy link
Member Author

Closing this as it's not that relevant. It seems the default country isn't France anymore but has been left as blank which is fine!

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Product development ✅ Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

No branches or pull requests

5 participants
@FelixMalfait @charlesBochet @gitstart-twenty @CoreTeamTwenty and others