From 0f50afc4c3d2a8849e15ef25ec2fd924d279ba0a Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 7 Feb 2024 17:34:22 +0100 Subject: [PATCH] :bug: Fix typo when grid board selected --- .../workspace/sidebar/options/menus/layout_item.cljs | 10 ++++++++-- .../ui/workspace/sidebar/options/shapes/frame.cljs | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs index 48ca30a7c..8ea0346d3 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs @@ -246,7 +246,7 @@ (mf/defc layout-item-menu {::mf/wrap [#(mf/memo' % (mf/check-props ["ids" "values" "type" "is-layout-child?" "is-grid-parent?" "is-flex-parent?"]))]} - [{:keys [ids values is-layout-child? is-layout-container? is-grid-parent? is-flex-parent?] :as props}] + [{:keys [ids values is-layout-child? is-layout-container? is-grid-parent? is-flex-parent? is-flex-layout? is-grid-layout?] :as props}] (let [selection-parents-ref (mf/use-memo (mf/deps ids) #(refs/parents-by-ids ids)) selection-parents (mf/deref selection-parents-ref) @@ -268,9 +268,15 @@ title (cond - (and is-layout-container? (not is-layout-child?)) + (and is-layout-container? (not is-layout-child?) is-flex-layout?) "Flex board" + (and is-layout-container? (not is-layout-child?) is-grid-layout?) + "Grid board" + + (and is-layout-container? (not is-layout-child?)) + "Layout board" + is-flex-parent? "Flex element" diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/frame.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/frame.cljs index 1332faede..96ba853b6 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/frame.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/frame.cljs @@ -49,6 +49,8 @@ is-grid-parent? (mf/deref is-grid-parent-ref) is-layout-container? (ctl/any-layout? shape) + is-flex-layout? (ctl/flex-layout? shape) + is-grid-layout? (ctl/grid-layout? shape) is-layout-child-absolute? (ctl/item-absolute? shape) ids (hooks/use-equal-memo ids) @@ -83,6 +85,8 @@ :values layout-item-values :is-flex-parent? is-flex-parent? :is-grid-parent? is-grid-parent? + :is-flex-layout? is-flex-layout? + :is-grid-layout? is-grid-layout? :is-layout-child? is-layout-child? :is-layout-container? is-layout-container? :shape shape}])