Support side panel in record page layout (#15216)

## Demo


https://github.com/user-attachments/assets/078b67d3-52d7-4ddf-a65a-fb002f82cfdd

Closes https://github.com/twentyhq/core-team-issues/issues/1731

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
Baptiste Devessier
2025-10-21 13:01:43 +02:00
committed by GitHub
parent ea09987e80
commit e58668003d
9 changed files with 563 additions and 52 deletions
@@ -5,7 +5,6 @@ import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataI
import { useObjectPermissions } from '@/object-record/hooks/useObjectPermissions';
import { BASE_RECORD_LAYOUT } from '@/object-record/record-show/layouts/base-record-layout';
import { COMPANY_RECORD_LAYOUT } from '@/object-record/record-show/layouts/company-record-layout';
import { DASHBOARD_RECORD_LAYOUT } from '@/object-record/record-show/layouts/dashboard-record-layout';
import { NOTE_RECORD_LAYOUT } from '@/object-record/record-show/layouts/note-record-layout';
import { OPPORTUNITY_RECORD_LAYOUT } from '@/object-record/record-show/layouts/opportunity-record-layout';
import { PERSON_RECORD_LAYOUT } from '@/object-record/record-show/layouts/person-record-layout';
@@ -34,7 +33,6 @@ const OBJECT_SPECIFIC_LAYOUTS: Partial<
[CoreObjectNameSingular.Workflow]: WORKFLOW_RECORD_LAYOUT,
[CoreObjectNameSingular.WorkflowVersion]: WORKFLOW_VERSION_RECORD_LAYOUT,
[CoreObjectNameSingular.WorkflowRun]: WORKFLOW_RUN_RECORD_LAYOUT,
[CoreObjectNameSingular.Dashboard]: DASHBOARD_RECORD_LAYOUT,
};
export const useRecordShowContainerTabs = (
@@ -1,27 +0,0 @@
import { CardType } from '@/object-record/record-show/types/CardType';
import { type RecordLayout } from '@/object-record/record-show/types/RecordLayout';
export const DASHBOARD_RECORD_LAYOUT: RecordLayout = {
hideSummaryAndFields: true,
hideFieldsInSidePanel: true,
tabs: {
dashboard: {
title: 'Dashboard',
position: 101,
icon: 'IconLayoutDashboard',
cards: [{ type: CardType.DashboardCard }],
hide: {
ifMobile: false,
ifDesktop: false,
ifInRightDrawer: false,
ifFeaturesDisabled: [],
ifRequiredObjectsInactive: [],
ifRelationsMissing: [],
},
},
timeline: null,
tasks: null,
notes: null,
files: null,
},
};