feat: rename RICH_TEXT_V2 → RICH_TEXT in codebase (keep DB value) (#18628)

## Summary

- Renames the `FieldMetadataType` enum key from `RICH_TEXT_V2` to
`RICH_TEXT` across the entire codebase, while keeping the underlying
string value as `'RICH_TEXT_V2'` to maintain PostgreSQL database
compatibility
- Renames all related types, guards, hooks, components, and files from
`*RichTextV2*` / `*rich-text-v2*` to `*RichText*` / `*rich-text*` (e.g.
`FormRichTextV2FieldInput` → `FormRichTextFieldInput`,
`isFieldRichTextV2` → `isFieldRichText`)
- Updates generated files (GraphQL schema, SDK types) to use the new key
while preserving the `RICH_TEXT_V2` string value for DB/API layer
- Updates i18n locale files, test snapshots, and integration tests to
reflect the rename

## Context

The legacy `RICH_TEXT` (V1) field type was deprecated and migrated to
`TEXT` in a previous PR (#18623). With V1 gone, the `RICH_TEXT_V2`
naming is no longer necessary — `RICH_TEXT` is now the canonical name.
The DB enum value stays `'RICH_TEXT_V2'` to avoid confusion with the
just-deprecated V1 type and to prevent a database migration.

## Test plan

- [x] `twenty-server` typecheck passes
- [x] `twenty-front` typecheck passes (only pre-existing Apollo client
errors remain)
- [x] `twenty-server` lint passes
- [x] `twenty-front` lint passes
- [x] `twenty-shared` build passes
- [ ] CI passes


Made with [Cursor](https://cursor.com)
This commit is contained in:
Charles Bochet
2026-03-13 19:07:55 +01:00
committed by GitHub
parent 3054679411
commit d9eb317bb5
129 changed files with 452 additions and 401 deletions
@@ -43,7 +43,7 @@ export const COMPOSITE_FIELD_SUB_FIELD_LABELS: {
workspaceMemberId: 'Workspace Member',
context: 'Context',
},
[FieldMetadataType.RICH_TEXT_V2]: {
[FieldMetadataType.RICH_TEXT]: {
blocknote: 'BlockNote',
markdown: 'Markdown',
},
@@ -6,7 +6,7 @@ import {
type FieldFullNameValue,
type FieldLinksValue,
type FieldPhonesValue,
type FieldRichTextV2Value,
type FieldRichTextValue,
} from '@/object-record/record-field/ui/types/FieldMetadata';
import { COMPOSITE_FIELD_SUB_FIELD_LABELS } from '@/settings/data-model/constants/CompositeFieldSubFieldLabel';
import { type SettingsFieldTypeConfig } from '@/settings/data-model/constants/SettingsNonCompositeFieldTypeConfigs';
@@ -499,17 +499,17 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
},
],
} as const satisfies SettingsCompositeFieldTypeConfig<FieldActorValue>,
[FieldMetadataType.RICH_TEXT_V2]: {
[FieldMetadataType.RICH_TEXT]: {
label: 'Rich Text',
Icon: IllustrationIconText,
category: 'Basic',
subFields: [
{
subFieldName:
COMPOSITE_FIELD_TYPE_SUB_FIELDS_NAMES[FieldMetadataType.RICH_TEXT_V2]
COMPOSITE_FIELD_TYPE_SUB_FIELDS_NAMES[FieldMetadataType.RICH_TEXT]
.blocknote,
subFieldLabel:
COMPOSITE_FIELD_SUB_FIELD_LABELS[FieldMetadataType.RICH_TEXT_V2]
COMPOSITE_FIELD_SUB_FIELD_LABELS[FieldMetadataType.RICH_TEXT]
.blocknote,
isImportable: false,
isFilterable: false,
@@ -517,10 +517,10 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
},
{
subFieldName:
COMPOSITE_FIELD_TYPE_SUB_FIELDS_NAMES[FieldMetadataType.RICH_TEXT_V2]
COMPOSITE_FIELD_TYPE_SUB_FIELDS_NAMES[FieldMetadataType.RICH_TEXT]
.markdown,
subFieldLabel:
COMPOSITE_FIELD_SUB_FIELD_LABELS[FieldMetadataType.RICH_TEXT_V2]
COMPOSITE_FIELD_SUB_FIELD_LABELS[FieldMetadataType.RICH_TEXT]
.markdown,
isImportable: true,
isFilterable: false,
@@ -541,5 +541,5 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
markdown: '# Hello Again',
},
],
} as const satisfies SettingsCompositeFieldTypeConfig<FieldRichTextV2Value>,
} as const satisfies SettingsCompositeFieldTypeConfig<FieldRichTextValue>,
} as const satisfies SettingsCompositeFieldTypeConfigArray;
@@ -10,7 +10,7 @@ export const COMPOSITE_FIELD_TYPES = [
'PHONES',
'FULL_NAME',
'ACTOR',
'RICH_TEXT_V2',
'RICH_TEXT',
] as const;
type CompositeFieldTypeBaseLiteral = (typeof COMPOSITE_FIELD_TYPES)[number];
@@ -3,5 +3,5 @@ import { type PickLiteral } from '~/types/PickLiteral';
export type SettingsExcludedFieldType = PickLiteral<
FieldType,
'POSITION' | 'TS_VECTOR' | 'RICH_TEXT_V2' | 'NUMERIC'
'POSITION' | 'TS_VECTOR' | 'RICH_TEXT' | 'NUMERIC'
>;