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:
+3
-3
@@ -76,8 +76,8 @@ describe('Rich text v2 field metadata creation tests suite', () => {
|
||||
const { data } = await createOneObjectMetadata({
|
||||
expectToFail: false,
|
||||
input: {
|
||||
nameSingular: 'testRichTextV2Object',
|
||||
namePlural: 'testRichTextV2Objects',
|
||||
nameSingular: 'testRichTextObject',
|
||||
namePlural: 'testRichTextObjects',
|
||||
labelSingular: 'Test Rich Text V2 Object',
|
||||
labelPlural: 'Test Rich Text V2 Objects',
|
||||
icon: 'IconTestPipe',
|
||||
@@ -124,7 +124,7 @@ describe('Rich text v2 field metadata creation tests suite', () => {
|
||||
async ({ context: { input } }) => {
|
||||
const inputPayload = {
|
||||
objectMetadataId: createdObjectMetadataId,
|
||||
type: FieldMetadataType.RICH_TEXT_V2,
|
||||
type: FieldMetadataType.RICH_TEXT,
|
||||
isLabelSyncedWithName: false,
|
||||
...input,
|
||||
};
|
||||
+3
-3
@@ -76,8 +76,8 @@ describe('Rich text v2 field metadata update tests suite', () => {
|
||||
const { data } = await createOneObjectMetadata({
|
||||
expectToFail: false,
|
||||
input: {
|
||||
nameSingular: 'testRichTextV2UpdateObject',
|
||||
namePlural: 'testRichTextV2UpdateObjects',
|
||||
nameSingular: 'testRichTextUpdateObject',
|
||||
namePlural: 'testRichTextUpdateObjects',
|
||||
labelSingular: 'Test Rich Text V2 Update Object',
|
||||
labelPlural: 'Test Rich Text V2 Update Objects',
|
||||
icon: 'IconTestPipe',
|
||||
@@ -109,7 +109,7 @@ describe('Rich text v2 field metadata update tests suite', () => {
|
||||
expectToFail: false,
|
||||
input: {
|
||||
objectMetadataId: createdObjectMetadataId,
|
||||
type: FieldMetadataType.RICH_TEXT_V2,
|
||||
type: FieldMetadataType.RICH_TEXT,
|
||||
name: 'testRichText',
|
||||
label: 'Test Rich Text',
|
||||
description: 'Initial description',
|
||||
Reference in New Issue
Block a user