twenty icon indicating copy to clipboard operation
twenty copied to clipboard

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

Open FelixMalfait opened this issue 1 year ago • 4 comments

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

FelixMalfait avatar Apr 13 '24 08:04 FelixMalfait

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)

FelixMalfait avatar Apr 16 '24 09:04 FelixMalfait

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

gitstart-app[bot] avatar Apr 16 '24 09:04 gitstart-app[bot]

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!

gitstart-twenty avatar Apr 25 '24 13:04 gitstart-twenty

@gitstart-twenty since you have tackled https://github.com/twentyhq/twenty/pull/6882 you should be able to pickup this one now

FelixMalfait avatar Sep 11 '24 10:09 FelixMalfait