Remove deprecated EMAIL, PHONE, LINK (#7551)

In this PR:
- remove deprecated EMAIL, PHONE, LINK field types (except for Zapier
package as there is another work ongoing)
- remove composite currency filter on currencyCode, actor filter on name
and workspaceMember as the UX is not great yet
This commit is contained in:
Charles Bochet
2024-10-10 14:14:58 +02:00
committed by GitHub
parent a7d5aa933d
commit a58236e6da
87 changed files with 75 additions and 2746 deletions

View File

@ -6,7 +6,6 @@ import {
FieldEmailsValue,
FieldFullNameValue,
FieldLinksValue,
FieldLinkValue,
FieldPhonesValue,
} from '@/object-record/record-field/types/FieldMetadata';
import { SettingsFieldTypeConfig } from '@/settings/data-model/constants/SettingsNonCompositeFieldTypeConfigs';
@ -38,8 +37,8 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
[FieldMetadataType.Currency]: {
label: 'Currency',
Icon: IllustrationIconCurrency,
subFields: ['amountMicros', 'currencyCode'],
filterableSubFields: ['amountMicros', 'currencyCode'],
subFields: ['amountMicros'],
filterableSubFields: ['amountMicros'],
labelBySubField: {
amountMicros: 'Amount',
currencyCode: 'Currency',
@ -69,18 +68,6 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
},
category: 'Basic',
} as const satisfies SettingsCompositeFieldTypeConfig<FieldEmailsValue>,
[FieldMetadataType.Link]: {
label: 'Link',
Icon: IllustrationIconLink,
exampleValue: { url: 'www.twenty.com', label: '' },
category: 'Basic',
subFields: ['url', 'label'],
filterableSubFields: ['url', 'label'],
labelBySubField: {
url: 'URL',
label: 'Label',
},
} as const satisfies SettingsCompositeFieldTypeConfig<FieldLinkValue>,
[FieldMetadataType.Links]: {
label: 'Links',
Icon: IllustrationIconLink,
@ -178,8 +165,8 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
label: 'Actor',
Icon: IllustrationIconSetting,
category: 'Basic',
subFields: ['source', 'name', 'workspaceMemberId'],
filterableSubFields: ['source', 'name', 'workspaceMemberId'],
subFields: ['source'],
filterableSubFields: ['source'],
labelBySubField: {
source: 'Source',
name: 'Name',

View File

@ -4,10 +4,8 @@ import {
IllustrationIconCalendarEvent,
IllustrationIconCalendarTime,
IllustrationIconJson,
IllustrationIconMail,
IllustrationIconNumbers,
IllustrationIconOneToMany,
IllustrationIconPhone,
IllustrationIconSetting,
IllustrationIconStar,
IllustrationIconTag,
@ -22,11 +20,9 @@ import {
FieldBooleanValue,
FieldDateTimeValue,
FieldDateValue,
FieldEmailValue,
FieldJsonValue,
FieldMultiSelectValue,
FieldNumberValue,
FieldPhoneValue,
FieldRatingValue,
FieldRelationValue,
FieldRichTextValue,
@ -114,17 +110,6 @@ export const SETTINGS_NON_COMPOSITE_FIELD_TYPE_CONFIGS: SettingsNonCompositeFiel
Icon: IllustrationIconOneToMany,
category: 'Relation',
} as const satisfies SettingsFieldTypeConfig<FieldRelationValue<any>>,
[FieldMetadataType.Email]: {
label: 'Email',
Icon: IllustrationIconMail,
category: 'Basic',
} as const satisfies SettingsFieldTypeConfig<FieldEmailValue>,
[FieldMetadataType.Phone]: {
label: 'Phone',
Icon: IllustrationIconPhone,
exampleValue: '+1234-567-890',
category: 'Basic',
} as const satisfies SettingsFieldTypeConfig<FieldPhoneValue>,
[FieldMetadataType.Rating]: {
label: 'Rating',
Icon: IllustrationIconStar,

View File

@ -113,11 +113,9 @@ const previewableTypes = [
FieldMetadataType.DateTime,
FieldMetadataType.Emails,
FieldMetadataType.FullName,
FieldMetadataType.Link,
FieldMetadataType.Links,
FieldMetadataType.MultiSelect,
FieldMetadataType.Number,
FieldMetadataType.Phone,
FieldMetadataType.Phones,
FieldMetadataType.Rating,
FieldMetadataType.RawJson,

View File

@ -5,7 +5,6 @@ import { PickLiteral } from '~/types/PickLiteral';
export const COMPOSITE_FIELD_TYPES = [
'CURRENCY',
'EMAILS',
'LINK',
'LINKS',
'ADDRESS',
'PHONES',