RICH_TEXT_V2 frontend (#10083)
Adds task and note support for the new `bodyV2` field. (Field metadata type of `bodyV2` is `RICH_TEXT_V2`.) Related to issue https://github.com/twentyhq/twenty/issues/7613 Upgrade commands will be in separate PRs. Fixes https://github.com/twentyhq/twenty/issues/10084 --------- Co-authored-by: ad-elias <elias@autodiligence.com> Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -7,6 +7,7 @@ import {
|
||||
FieldFullNameValue,
|
||||
FieldLinksValue,
|
||||
FieldPhonesValue,
|
||||
FieldRichTextV2Value,
|
||||
} from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { SettingsFieldTypeConfig } from '@/settings/data-model/constants/SettingsNonCompositeFieldTypeConfigs';
|
||||
import { CompositeFieldType } from '@/settings/data-model/types/CompositeFieldType';
|
||||
@ -18,6 +19,7 @@ import {
|
||||
IllustrationIconMap,
|
||||
IllustrationIconPhone,
|
||||
IllustrationIconSetting,
|
||||
IllustrationIconText,
|
||||
IllustrationIconUser,
|
||||
} from 'twenty-ui';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
@ -185,4 +187,19 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
|
||||
context: { provider: ConnectedAccountProvider.GOOGLE },
|
||||
},
|
||||
} as const satisfies SettingsCompositeFieldTypeConfig<FieldActorValue>,
|
||||
[FieldMetadataType.RICH_TEXT_V2]: {
|
||||
label: 'Rich Text',
|
||||
Icon: IllustrationIconText,
|
||||
subFields: ['blocknote', 'markdown'],
|
||||
filterableSubFields: [],
|
||||
labelBySubField: {
|
||||
blocknote: 'BlockNote',
|
||||
markdown: 'Markdown',
|
||||
},
|
||||
exampleValue: {
|
||||
blocknote: '[{"type":"heading","content":"Hello"}]',
|
||||
markdown: '# Hello',
|
||||
},
|
||||
category: 'Basic',
|
||||
} as const satisfies SettingsCompositeFieldTypeConfig<FieldRichTextV2Value>,
|
||||
} as const satisfies SettingsCompositeFieldTypeConfigArray;
|
||||
|
||||
@ -6,7 +6,6 @@ import {
|
||||
IllustrationIconJson,
|
||||
IllustrationIconNumbers,
|
||||
IllustrationIconOneToMany,
|
||||
IllustrationIconSetting,
|
||||
IllustrationIconStar,
|
||||
IllustrationIconTag,
|
||||
IllustrationIconTags,
|
||||
@ -25,7 +24,6 @@ import {
|
||||
FieldNumberValue,
|
||||
FieldRatingValue,
|
||||
FieldRelationValue,
|
||||
FieldRichTextValue,
|
||||
FieldSelectValue,
|
||||
FieldTextValue,
|
||||
FieldUUidValue,
|
||||
@ -122,12 +120,6 @@ export const SETTINGS_NON_COMPOSITE_FIELD_TYPE_CONFIGS: SettingsNonCompositeFiel
|
||||
exampleValue: { key: 'value' },
|
||||
category: 'Advanced',
|
||||
} as const satisfies SettingsFieldTypeConfig<FieldJsonValue>,
|
||||
[FieldMetadataType.RICH_TEXT]: {
|
||||
label: 'Rich Text',
|
||||
Icon: IllustrationIconSetting,
|
||||
exampleValue: "{ key: 'value' }",
|
||||
category: 'Basic',
|
||||
} as const satisfies SettingsFieldTypeConfig<FieldRichTextValue>,
|
||||
[FieldMetadataType.ARRAY]: {
|
||||
label: 'Array',
|
||||
Icon: IllustrationIconArray,
|
||||
|
||||
Reference in New Issue
Block a user