From efa784a039c75cf918deb2efba901586f8993ca1 Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Mon, 20 Jul 2026 15:09:28 +0300 Subject: [PATCH] feat(layout): layout-grid editor section Add a Layout grid section for frames/components with pattern (columns/rows/ grid), count, gutter/section size, and margin, plus visibility and remove actions. The canvas already rendered layout grids from imported files; this wires creation and editing through the standard panel list pattern with undo support and icon+tooltip pattern options. --- packages/vue/src/i18n/messages/panels.ts | 10 ++ .../LayoutSection/LayoutGridSection.vue | 148 ++++++++++++++++++ .../LayoutSection/LayoutSection.vue | 3 + 3 files changed, 161 insertions(+) create mode 100644 src/components/properties/LayoutSection/LayoutGridSection.vue diff --git a/packages/vue/src/i18n/messages/panels.ts b/packages/vue/src/i18n/messages/panels.ts index 9a7dcae61..2043225e6 100644 --- a/packages/vue/src/i18n/messages/panels.ts +++ b/packages/vue/src/i18n/messages/panels.ts @@ -250,6 +250,16 @@ export const panelMessageDefaults = { resizeAutoWidth: 'Auto width', resizeAutoHeight: 'Auto height', resizeFixed: 'Fixed size', + layoutGrids: 'Layout grid', + addLayoutGrid: 'Add layout grid', + removeLayoutGrid: 'Remove layout grid', + gridColumns: 'Columns', + gridRows: 'Rows', + gridGrid: 'Grid', + gridCount: 'Count', + gridGutter: 'Gutter', + gridMargin: 'Margin', + gridSectionSize: 'Section size', searchFonts: 'Search fonts...' } as const diff --git a/src/components/properties/LayoutSection/LayoutGridSection.vue b/src/components/properties/LayoutSection/LayoutGridSection.vue new file mode 100644 index 000000000..674f9fea4 --- /dev/null +++ b/src/components/properties/LayoutSection/LayoutGridSection.vue @@ -0,0 +1,148 @@ + + + diff --git a/src/components/properties/LayoutSection/LayoutSection.vue b/src/components/properties/LayoutSection/LayoutSection.vue index 80b577097..45e6f4e73 100644 --- a/src/components/properties/LayoutSection/LayoutSection.vue +++ b/src/components/properties/LayoutSection/LayoutSection.vue @@ -5,6 +5,7 @@ import AutoLayoutControls from '@/components/properties/LayoutSection/AutoLayout import ClipContentControl from '@/components/properties/LayoutSection/ClipContentControl.vue' import FlexControls from '@/components/properties/LayoutSection/FlexControls.vue' import GridControls from '@/components/properties/LayoutSection/GridControls.vue' +import LayoutGridSection from '@/components/properties/LayoutSection/LayoutGridSection.vue' import PaddingControls from '@/components/properties/LayoutSection/PaddingControls.vue' import SizeControls from '@/components/properties/LayoutSection/size/SizeControls.vue' import TextResizingControl from '@/components/properties/LayoutSection/TextResizingControl.vue' @@ -38,6 +39,8 @@ const CONTAINER_TYPES = ['FRAME', 'COMPONENT', 'COMPONENT_SET', 'INSTANCE'] + +