From 24349cb729780921ea43cb1bd25e9cc05952e026 Mon Sep 17 00:00:00 2001 From: Baptiste Devessier Date: Mon, 27 Oct 2025 17:34:21 +0100 Subject: [PATCH] Enable records layouts for all records except workflows (#15378) https://github.com/user-attachments/assets/3cb30486-3409-459e-9d60-7f6f31ebe00c --- .../components/PageLayoutDispatcher.tsx | 18 ++---- .../constants/DefaultRecordPageLayout.ts | 64 ------------------- 2 files changed, 5 insertions(+), 77 deletions(-) diff --git a/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutDispatcher.tsx b/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutDispatcher.tsx index 60ea78e158..d54e4ff579 100644 --- a/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutDispatcher.tsx +++ b/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutDispatcher.tsx @@ -18,23 +18,15 @@ export const PageLayoutDispatcher = ({ FeatureFlagKey.IS_RECORD_PAGE_LAYOUT_ENABLED, ); - const isStandardObjectWithDefaultLayout = + const isStandardObjectUnsupportingRecordPageLayouts = targetRecordIdentifier.targetObjectNameSingular === - CoreObjectNameSingular.Company || + CoreObjectNameSingular.Workflow || targetRecordIdentifier.targetObjectNameSingular === - CoreObjectNameSingular.Person || + CoreObjectNameSingular.WorkflowRun || targetRecordIdentifier.targetObjectNameSingular === - CoreObjectNameSingular.Opportunity || - targetRecordIdentifier.targetObjectNameSingular === - CoreObjectNameSingular.Note || - targetRecordIdentifier.targetObjectNameSingular === - CoreObjectNameSingular.Task; + CoreObjectNameSingular.WorkflowVersion; - if ( - targetRecordIdentifier.targetObjectNameSingular === - CoreObjectNameSingular.Dashboard || - (isRecordPageEnabled && isStandardObjectWithDefaultLayout) - ) { + if (isRecordPageEnabled && !isStandardObjectUnsupportingRecordPageLayouts) { return (