From 2fbd4b07e04affd53d3b8452ef3fb39d043054a8 Mon Sep 17 00:00:00 2001 From: Xaviju Date: Thu, 24 Jul 2025 09:37:38 +0200 Subject: [PATCH 1/2] :bug: Remove image type from inspect tab panels --- CHANGES.md | 1 + frontend/src/app/main/ui/inspect/attributes.cljs | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f34c011a8c..525e0cc80a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ ### :bug: Bugs fixed - Fix unexpected exception on processing old texts [Github #6889](https://github.com/penpot/penpot/pull/6889) +- Fix error on inspect tab when selecting multiple shapes [Taiga #11655](https://tree.taiga.io/project/penpot/issue/11655) ## 2.8.0 diff --git a/frontend/src/app/main/ui/inspect/attributes.cljs b/frontend/src/app/main/ui/inspect/attributes.cljs index 831860480f..dca6a0846f 100644 --- a/frontend/src/app/main/ui/inspect/attributes.cljs +++ b/frontend/src/app/main/ui/inspect/attributes.cljs @@ -26,13 +26,12 @@ [rumext.v2 :as mf])) (def type->options - {:multiple [:fill :stroke :image :text :shadow :blur :layout-element] + {:multiple [:fill :stroke :text :shadow :blur :layout-element] :frame [:geometry :fill :stroke :shadow :blur :layout :layout-element] :group [:geometry :svg :layout-element] :rect [:geometry :fill :stroke :shadow :blur :svg :layout-element] :circle [:geometry :fill :stroke :shadow :blur :svg :layout-element] :path [:geometry :fill :stroke :shadow :blur :svg :layout-element] - :image [:image :geometry :fill :stroke :shadow :blur :svg :layout-element] :text [:geometry :text :shadow :blur :stroke :layout-element] :variant [:variant :geometry :fill :stroke :shadow :blur :layout :layout-element]}) From b68c426cd1f6b5634c838eb656f6188abcb67357 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 29 Jul 2025 15:10:32 +0200 Subject: [PATCH 2/2] :bug: Fix exception on fills menu when binary-fills flag is active And multiple shapes are selected. --- .../main/ui/workspace/sidebar/options/menus/fill.cljs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/fill.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/fill.cljs index 18992c1af7..a90539503e 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/fill.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/fill.cljs @@ -55,15 +55,22 @@ ;; Excluding nil values values (d/without-nils values) - fills (if (contains? cfg/flags :frontend-binary-fills) + + fills (get values :fills) + fills (if (and (contains? cfg/flags :frontend-binary-fills) + (not= fills :multiple)) (take types.fill/MAX-FILLS (d/nilv (:fills values) [])) - (:fills values)) + fills) + + has-fills? (or (= :multiple fills) (some? (seq fills))) + can-add-fills? (if (contains? cfg/flags :frontend-binary-fills) (and (not (= :multiple fills)) (< (count fills) types.fill/MAX-FILLS)) (not (= :multiple fills))) + state* (mf/use-state has-fills?) open? (deref state*)