Create the Dashboard record show page (#14423)

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

- Reorganized PageLayout module
- Created `DashboardRenderer` and `PageLayoutRenderer`
- Created stories for the `PageLayoutRenderer`
- Refactored the Widget components


https://github.com/user-attachments/assets/27e9ac8f-b237-4c21-8494-3fab6d65af3a
This commit is contained in:
Raphaël Bosi
2025-09-11 18:26:26 +02:00
committed by GitHub
parent 140b416b22
commit e80c552ae7
124 changed files with 1528 additions and 808 deletions
@@ -0,0 +1,15 @@
import { PAGE_LAYOUT_TAB_FRAGMENT } from '@/dashboards/graphql/fragments/pageLayoutTabFragment';
import { gql } from '@apollo/client';
export const PAGE_LAYOUT_FRAGMENT = gql`
${PAGE_LAYOUT_TAB_FRAGMENT}
fragment PageLayoutFragment on PageLayout {
id
name
objectMetadataId
type
tabs {
...PageLayoutTabFragment
}
}
`;
@@ -0,0 +1,14 @@
import { PAGE_LAYOUT_WIDGET_FRAGMENT } from '@/dashboards/graphql/fragments/pageLayoutWidgetFragment';
import { gql } from '@apollo/client';
export const PAGE_LAYOUT_TAB_FRAGMENT = gql`
${PAGE_LAYOUT_WIDGET_FRAGMENT}
fragment PageLayoutTabFragment on PageLayoutTab {
id
title
position
widgets {
...PageLayoutWidgetFragment
}
}
`;
@@ -0,0 +1,17 @@
import { gql } from '@apollo/client';
export const PAGE_LAYOUT_WIDGET_FRAGMENT = gql`
fragment PageLayoutWidgetFragment on PageLayoutWidget {
id
title
type
objectMetadataId
gridPosition {
column
columnSpan
row
rowSpan
}
configuration
}
`;
@@ -0,0 +1,11 @@
import { PAGE_LAYOUT_FRAGMENT } from '@/dashboards/graphql/fragments/pageLayoutFragment';
import { gql } from '@apollo/client';
export const FIND_ONE_PAGE_LAYOUT = gql`
${PAGE_LAYOUT_FRAGMENT}
query FindOnePageLayout($id: String!) {
getPageLayout(id: $id) {
...PageLayoutFragment
}
}
`;