From 078a3d5a5c0ef90afc5434ac867f37a4f0270ec3 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Mon, 5 Jan 2026 10:54:36 +0100 Subject: [PATCH 1/2] :bug: Fix problem with grid layout components and auto sizing --- CHANGES.md | 1 + common/src/app/common/types/container.cljc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5aa362ab1c..4bba468ed7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -21,6 +21,7 @@ - Fix problem when drag+duplicate a full grid [Taiga #12565](https://tree.taiga.io/project/penpot/issue/12565) - Fix problem when pasting elements in reverse flex layout [Taiga #12460](https://tree.taiga.io/project/penpot/issue/12460) - Fix wrong board size presets in Android [Taiga #12339](https://tree.taiga.io/project/penpot/issue/12339) +- Fix problem with grid layout components and auto sizing [Github #7797](https://github.com/penpot/penpot/issues/7797) ## 2.12.1 diff --git a/common/src/app/common/types/container.cljc b/common/src/app/common/types/container.cljc index 13daa4949c..f9ea3207b7 100644 --- a/common/src/app/common/types/container.cljc +++ b/common/src/app/common/types/container.cljc @@ -269,8 +269,8 @@ "Remove flex children properties except the fit-content for flex layouts. These are properties that we don't have to propagate to copies but will be respected when swapping components" [shape] - (let [layout-item-h-sizing (when (and (ctl/flex-layout? shape) (ctl/auto-width? shape)) :auto) - layout-item-v-sizing (when (and (ctl/flex-layout? shape) (ctl/auto-height? shape)) :auto)] + (let [layout-item-h-sizing (when (and (ctl/any-layout? shape) (ctl/auto-width? shape)) :auto) + layout-item-v-sizing (when (and (ctl/any-layout? shape) (ctl/auto-height? shape)) :auto)] (-> shape (d/without-keys ctk/swap-keep-attrs) (cond-> (some? layout-item-h-sizing) From edd53b419ac0b4a4f760b32820bb97a1f7a9838c Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Mon, 5 Jan 2026 13:09:40 +0100 Subject: [PATCH 2/2] :bug: Fix problem with thumbnail regeneration --- frontend/src/app/main/data/workspace.cljs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index a8077fe15d..6e71bcf2a6 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -432,10 +432,12 @@ :val position-data :ignore-touched true :ignore-geometry true}]})))] - (dch/commit-changes - {:redo-changes changes :undo-changes [] - :save-undo? false - :tags #{:position-data}}))))))) + (when (d/not-empty? changes) + (dch/commit-changes + {:redo-changes changes :undo-changes [] + :save-undo? false + :tags #{:position-data}}))))) + (rx/take-until stoper-s)))) (->> stream (rx/filter dch/commit?)