From 2fbd4b07e04affd53d3b8452ef3fb39d043054a8 Mon Sep 17 00:00:00 2001 From: Xaviju Date: Thu, 24 Jul 2025 09:37:38 +0200 Subject: [PATCH 1/3] :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 5161ef15bff93241a20576ba52fb2a4cce477c77 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 29 Jul 2025 14:58:02 +0200 Subject: [PATCH 2/3] :bug: Fix regression on show access request dialog (#7005) --- frontend/src/app/main/ui/static.cljs | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/frontend/src/app/main/ui/static.cljs b/frontend/src/app/main/ui/static.cljs index 789242d046..980d8d4e4a 100644 --- a/frontend/src/app/main/ui/static.cljs +++ b/frontend/src/app/main/ui/static.cljs @@ -11,6 +11,7 @@ [app.common.data :as d] [app.common.pprint :as pp] [app.common.uri :as u] + [app.main.data.auth :refer [is-authenticated?]] [app.main.data.common :as dcm] [app.main.data.event :as ev] [app.main.refs :as refs] @@ -485,24 +486,24 @@ {::mf/props :obj} [{:keys [data route] :as props}] - (let [type (:type data) - path (:path route) + (let [type (:type data) + path (:path route) + params (:query-params route) - params (:query-params route) - - workspace? (str/includes? path "workspace") - dashboard? (str/includes? path "dashboard") - view? (str/includes? path "view") + workspace? (str/includes? path "workspace") + dashboard? (str/includes? path "dashboard") + view? (str/includes? path "view") ;; We store the request access info int this state - info* (mf/use-state nil) - info (deref info*) + info* (mf/use-state nil) + info (deref info*) - loaded? (get info :loaded false) - profile (mf/deref refs/profile) + profile (mf/deref refs/profile) - auth-error? - (= type :authentication) + auth-error? (= type :authentication) + + authenticated? + (is-authenticated? profile) request-access? (and @@ -517,8 +518,7 @@ (rx/subs! (partial reset! info*) (partial reset! info* {:loaded true}))))) - - (if auth-error? + (if (and auth-error? (not authenticated?)) [:> context-wrapper* {:is-workspace workspace? :is-dashboard dashboard? @@ -526,7 +526,7 @@ :profile profile} [:> login-dialog* {}]] - (when loaded? + (when (get info :loaded false) (if request-access? [:> context-wrapper* {:is-workspace workspace? :is-dashboard dashboard? From b68c426cd1f6b5634c838eb656f6188abcb67357 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 29 Jul 2025 15:10:32 +0200 Subject: [PATCH 3/3] :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*)