Add email thread widget and message thread record page layout (#19351)
## Summary - Move email thread display from side panel to a dedicated record page with a new `EMAIL_THREAD` widget type - Add message thread as a standard object with page layout, subject field, and backfill command - Add reply-to-email command menu item for message thread records - Remove old side panel message thread components in favor of the new widget-based approach ## Type fixes - Add `EMAIL_THREAD` to `WidgetConfigurationType`, `WidgetType`, and all configuration/validator maps - Create `EmailThreadConfigurationDTO` and shared `EmailThreadConfiguration` type - Register EMAIL_THREAD in widget type validators, configuration resolvers, and standard widget mappings ## Test plan - [ ] Verify message thread record pages render with the email thread widget - [ ] Verify email thread preview navigates to the record page instead of opening side panel - [ ] Verify reply-to-email command appears for message thread records - [ ] Verify typecheck passes for both twenty-front and twenty-server - [ ] Run existing test suites to check for regressions 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
@@ -1,4 +1,5 @@
|
||||
import { AggregateChartConfigurationDTO } from 'src/engine/metadata-modules/page-layout-widget/dtos/aggregate-chart-configuration.dto';
|
||||
import { EmailThreadConfigurationDTO } from 'src/engine/metadata-modules/page-layout-widget/dtos/email-thread-configuration.dto';
|
||||
import { BarChartConfigurationDTO } from 'src/engine/metadata-modules/page-layout-widget/dtos/bar-chart-configuration.dto';
|
||||
import { CalendarConfigurationDTO } from 'src/engine/metadata-modules/page-layout-widget/dtos/calendar-configuration.dto';
|
||||
import { EmailsConfigurationDTO } from 'src/engine/metadata-modules/page-layout-widget/dtos/emails-configuration.dto';
|
||||
@@ -35,6 +36,7 @@ export const ALL_WIDGET_CONFIGURATION_TYPE_VALIDATOR_BY_WIDGET_CONFIGURATION_TYP
|
||||
CALENDAR: CalendarConfigurationDTO,
|
||||
FRONT_COMPONENT: FrontComponentConfigurationDTO,
|
||||
EMAILS: EmailsConfigurationDTO,
|
||||
EMAIL_THREAD: EmailThreadConfigurationDTO,
|
||||
FIELD: FieldConfigurationDTO,
|
||||
FIELD_RICH_TEXT: FieldRichTextConfigurationDTO,
|
||||
FIELDS: FieldsConfigurationDTO,
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { IsIn, IsNotEmpty } from 'class-validator';
|
||||
import { type EmailThreadConfiguration } from 'twenty-shared/types';
|
||||
|
||||
import { WidgetConfigurationType } from 'src/engine/metadata-modules/page-layout-widget/enums/widget-configuration-type.type';
|
||||
|
||||
@ObjectType('EmailThreadConfiguration')
|
||||
export class EmailThreadConfigurationDTO implements EmailThreadConfiguration {
|
||||
@Field(() => WidgetConfigurationType)
|
||||
@IsIn([WidgetConfigurationType.EMAIL_THREAD])
|
||||
@IsNotEmpty()
|
||||
configurationType: WidgetConfigurationType.EMAIL_THREAD;
|
||||
}
|
||||
+1
@@ -27,6 +27,7 @@ export enum WidgetConfigurationType {
|
||||
WORKFLOW_RUN = 'WORKFLOW_RUN',
|
||||
FRONT_COMPONENT = 'FRONT_COMPONENT',
|
||||
RECORD_TABLE = 'RECORD_TABLE',
|
||||
EMAIL_THREAD = 'EMAIL_THREAD',
|
||||
}
|
||||
export type AllGraphWidgetConfigurationType =
|
||||
| WidgetConfigurationType.AGGREGATE_CHART
|
||||
|
||||
+1
@@ -17,4 +17,5 @@ export enum WidgetType {
|
||||
WORKFLOW_RUN = 'WORKFLOW_RUN',
|
||||
FRONT_COMPONENT = 'FRONT_COMPONENT',
|
||||
RECORD_TABLE = 'RECORD_TABLE',
|
||||
EMAIL_THREAD = 'EMAIL_THREAD',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user