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:
+10
-10
@@ -23,7 +23,7 @@ export const mockedNoteRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-1\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Great conversation today about potential collaboration opportunities. Next steps discussed include proposal review and timeline planning.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Great conversation today about potential collaboration opportunities. Next steps discussed include proposal review and timeline planning."
|
||||
},
|
||||
@@ -106,7 +106,7 @@ export const mockedNoteRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-2\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Reviewed current project status and identified key deliverables for the upcoming quarter. Timeline adjustments may be needed.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Reviewed current project status and identified key deliverables for the upcoming quarter. Timeline adjustments may be needed."
|
||||
},
|
||||
@@ -189,7 +189,7 @@ export const mockedNoteRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-3\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Impressive background in technology and leadership. Strong potential for senior roles in upcoming projects.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Impressive background in technology and leadership. Strong potential for senior roles in upcoming projects."
|
||||
},
|
||||
@@ -272,7 +272,7 @@ export const mockedNoteRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-4\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Made connection at industry conference. Shared interests in digital transformation and innovation strategies.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Made connection at industry conference. Shared interests in digital transformation and innovation strategies."
|
||||
},
|
||||
@@ -355,7 +355,7 @@ export const mockedNoteRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-5\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Strong candidate with relevant experience. Technical skills align well with team requirements. Positive cultural fit assessment.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Strong candidate with relevant experience. Technical skills align well with team requirements. Positive cultural fit assessment."
|
||||
},
|
||||
@@ -438,7 +438,7 @@ export const mockedNoteRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-6\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Quarterly review completed. Exceeded targets in key areas. Discussed career development opportunities and growth plans.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Quarterly review completed. Exceeded targets in key areas. Discussed career development opportunities and growth plans."
|
||||
},
|
||||
@@ -521,7 +521,7 @@ export const mockedNoteRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-7\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Completed certification program successfully. Ready to take on expanded responsibilities in the next phase.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Completed certification program successfully. Ready to take on expanded responsibilities in the next phase."
|
||||
},
|
||||
@@ -604,7 +604,7 @@ export const mockedNoteRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-8\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Long-standing professional relationship. Reliable partner for complex initiatives. High satisfaction ratings.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Long-standing professional relationship. Reliable partner for complex initiatives. High satisfaction ratings."
|
||||
},
|
||||
@@ -687,7 +687,7 @@ export const mockedNoteRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-9\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Great conversation today about potential collaboration opportunities. Next steps discussed include proposal review and timeline planning.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Great conversation today about potential collaboration opportunities. Next steps discussed include proposal review and timeline planning."
|
||||
},
|
||||
@@ -770,7 +770,7 @@ export const mockedNoteRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-10\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Reviewed current project status and identified key deliverables for the upcoming quarter. Timeline adjustments may be needed.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Reviewed current project status and identified key deliverables for the upcoming quarter. Timeline adjustments may be needed."
|
||||
},
|
||||
|
||||
+10
-10
@@ -33,7 +33,7 @@ export const mockedTaskRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-1\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Arrange a follow-up call to discuss project details and next steps.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Arrange a follow-up call to discuss project details and next steps."
|
||||
},
|
||||
@@ -128,7 +128,7 @@ export const mockedTaskRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-2\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Prepare and send the project proposal document with timeline and deliverables.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Prepare and send the project proposal document with timeline and deliverables."
|
||||
},
|
||||
@@ -223,7 +223,7 @@ export const mockedTaskRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-3\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Review the contract terms and conditions before final approval.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Review the contract terms and conditions before final approval."
|
||||
},
|
||||
@@ -318,7 +318,7 @@ export const mockedTaskRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-4\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Create detailed agenda for upcoming strategy meeting.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Create detailed agenda for upcoming strategy meeting."
|
||||
},
|
||||
@@ -413,7 +413,7 @@ export const mockedTaskRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-5\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Verify and update contact details in the system.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Verify and update contact details in the system."
|
||||
},
|
||||
@@ -508,7 +508,7 @@ export const mockedTaskRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-6\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Complete reference verification for background check process.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Complete reference verification for background check process."
|
||||
},
|
||||
@@ -603,7 +603,7 @@ export const mockedTaskRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-7\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Send portfolio examples and case studies for review.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Send portfolio examples and case studies for review."
|
||||
},
|
||||
@@ -698,7 +698,7 @@ export const mockedTaskRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-8\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Prepare onboarding materials and schedule orientation session.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Prepare onboarding materials and schedule orientation session."
|
||||
},
|
||||
@@ -793,7 +793,7 @@ export const mockedTaskRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-9\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Arrange a follow-up call to discuss project details and next steps.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Arrange a follow-up call to discuss project details and next steps."
|
||||
},
|
||||
@@ -888,7 +888,7 @@ export const mockedTaskRecords: ObjectRecord[] =
|
||||
]
|
||||
},
|
||||
"bodyV2": {
|
||||
"__typename": "RichTextV2",
|
||||
"__typename": "RichText",
|
||||
"blocknote": "[{\"id\":\"block-10\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Prepare and send the project proposal document with timeline and deliverables.\",\"styles\":{}}],\"children\":[]}]",
|
||||
"markdown": "Prepare and send the project proposal document with timeline and deliverables."
|
||||
},
|
||||
|
||||
+2
-2
@@ -8638,7 +8638,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery =
|
||||
"__typename": "Field",
|
||||
"id": "15cffcf2-ed38-4ee1-956a-d8bc9d2bef16",
|
||||
"universalIdentifier": "20202020-4aa0-4ae8-898d-7df0afd47ab1",
|
||||
"type": "RICH_TEXT_V2",
|
||||
"type": "RICH_TEXT",
|
||||
"name": "bodyV2",
|
||||
"label": "Body",
|
||||
"description": "Task body",
|
||||
@@ -23733,7 +23733,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery =
|
||||
"__typename": "Field",
|
||||
"id": "71961f86-5386-4cc9-b23a-39fc5c1c7c5e",
|
||||
"universalIdentifier": "20202020-a7bb-4d94-be51-8f25181502c8",
|
||||
"type": "RICH_TEXT_V2",
|
||||
"type": "RICH_TEXT",
|
||||
"name": "bodyV2",
|
||||
"label": "Body",
|
||||
"description": "Note body",
|
||||
|
||||
Reference in New Issue
Block a user