Feat/email composer improvements (#23188)

- Move composer to dedicated page
- Add test email option
- Auto saved as draft can be revisited from `objects/messageCampaigns`
later
- Campaign stats component



https://github.com/user-attachments/assets/9e523116-e79b-496d-9c9d-3887e0c9213f



<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/23188?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
neo773
2026-07-28 16:43:00 +05:30
committed by GitHub
parent 30bbf4149a
commit 1e58c3073c
119 changed files with 5345 additions and 2606 deletions
@@ -0,0 +1,45 @@
import { type AdvancedTextEditorPreset } from '@/advanced-text-editor/types/AdvancedTextEditorPreset';
// One entry per surface that renders the TipTap editor today. Add a surface
// here rather than passing sizing and content-type props at the call site, so
// the editor's shape per context stays reviewable in one place.
export const ADVANCED_TEXT_EDITOR_PRESETS = {
// The campaign body owns its whole tab, so it fills the widget instead of
// sitting in a bordered box. Stored as TipTap JSON so the server can render
// it to email-safe HTML at send time, like the workflow email node.
campaignBody: {
contentType: 'json',
chrome: 'document',
minHeight: 0,
enableFullScreen: false,
},
inlineEmailBody: {
contentType: 'html',
chrome: 'field',
minHeight: 120,
enableFullScreen: true,
},
workflowEmailBody: {
contentType: 'json',
chrome: 'field',
minHeight: 340,
enableFullScreen: true,
},
// The RICH_TEXT form input. Its stored value is still BlockNote JSON; only
// the editing surface is TipTap today.
recordRichTextField: {
contentType: 'json',
chrome: 'field',
minHeight: 340,
enableFullScreen: true,
},
aiInstructions: {
contentType: 'markdown',
chrome: 'field',
minHeight: 120,
enableFullScreen: true,
},
} as const satisfies Record<string, AdvancedTextEditorPreset>;
export type AdvancedTextEditorPresetName =
keyof typeof ADVANCED_TEXT_EDITOR_PRESETS;