Introducing view field group syncable entity (#17867)
## Context Introduces a new viewFieldGroup entity that allows grouping view fields into sections (e.g. "General", "Additional", "Other") within a view. The page layout fields widget needs a way to organize fields into sections. Today, views have no concept of field grouping. This PR introduces the viewFieldGroup entity which sits between a view and its viewFields, enabling section-based organization. <img width="401" height="724" alt="Layout - V2 (customize visibility)" src="https://github.com/user-attachments/assets/6376e2ab-44db-42bf-9d2c-758f56f6b548" /> --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
+1
@@ -5,6 +5,7 @@ export const TWENTY_STANDARD_ALL_METADATA_NAME = [
|
||||
'objectMetadata',
|
||||
'fieldMetadata',
|
||||
'viewField',
|
||||
'viewFieldGroup',
|
||||
'viewFilter',
|
||||
'viewGroup',
|
||||
'view',
|
||||
|
||||
+4
@@ -97,6 +97,8 @@ export const computeTwentyStandardApplicationAllFlatEntityMaps = ({
|
||||
|
||||
const flatViewFilterGroupMaps = createEmptyFlatEntityMaps();
|
||||
|
||||
const flatViewFieldGroupMaps = createEmptyFlatEntityMaps();
|
||||
|
||||
const flatViewFilterMaps = buildStandardFlatViewFilterMetadataMaps({
|
||||
dependencyFlatEntityMaps: {
|
||||
flatFieldMetadataMaps,
|
||||
@@ -114,6 +116,7 @@ export const computeTwentyStandardApplicationAllFlatEntityMaps = ({
|
||||
flatObjectMetadataMaps,
|
||||
flatFieldMetadataMaps,
|
||||
flatViewMaps,
|
||||
flatViewFieldGroupMaps,
|
||||
},
|
||||
now,
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
@@ -188,6 +191,7 @@ export const computeTwentyStandardApplicationAllFlatEntityMaps = ({
|
||||
|
||||
const allFlatEntityMaps: TwentyStandardAllFlatEntityMaps = {
|
||||
flatViewFieldMaps,
|
||||
flatViewFieldGroupMaps,
|
||||
flatViewFilterMaps,
|
||||
flatViewGroupMaps,
|
||||
flatViewMaps,
|
||||
|
||||
+2
@@ -88,6 +88,8 @@ export const createStandardViewFieldFlatMetadata = <
|
||||
fieldMetadataId:
|
||||
standardObjectMetadataRelatedEntityIds[objectName].fields[fieldName].id,
|
||||
fieldMetadataUniversalIdentifier: fieldDefinition.universalIdentifier,
|
||||
viewFieldGroupId: null,
|
||||
viewFieldGroupUniversalIdentifier: null,
|
||||
position,
|
||||
isVisible,
|
||||
size,
|
||||
|
||||
+2
@@ -142,6 +142,8 @@ export const createStandardViewFlatMetadata = <
|
||||
createdByUserWorkspaceId: null,
|
||||
viewFieldIds: [],
|
||||
viewFieldUniversalIdentifiers: [],
|
||||
viewFieldGroupIds: [],
|
||||
viewFieldGroupUniversalIdentifiers: [],
|
||||
viewFilterIds: [],
|
||||
viewFilterUniversalIdentifiers: [],
|
||||
viewGroupIds: [],
|
||||
|
||||
Reference in New Issue
Block a user