diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/bool.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/bool.cljs index 40337bdc5..4b5e52846 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/bool.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/bool.cljs @@ -50,11 +50,21 @@ [:& layer-menu {:ids ids :type type :values layer-values}] + [:& measures-menu {:ids ids :type type :values measure-values :shape shape}] - [:& layout-container-menu {:type type :ids [(:id shape)] :values layout-container-values :multiple false}] + + (when (or (not ^boolean is-layout-child?) ^boolean is-layout-child-absolute?) + [:& constraints-menu {:ids ids + :values constraint-values}]) + + [:& layout-container-menu + {:type type + :ids [(:id shape)] + :values layout-container-values + :multiple false}] (when (and (= (count ids) 1) is-layout-child? is-grid-parent?) [:& grid-cell/options @@ -71,10 +81,6 @@ :is-grid-parent? is-grid-parent? :shape shape}]) - (when (or (not is-layout-child?) is-layout-child-absolute?) - [:& constraints-menu {:ids ids - :values constraint-values}]) - [:& fill-menu {:ids ids :type type :values (select-keys shape fill-attrs)}] diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/circle.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/circle.cljs index bf2128d87..d37d6a4de 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/circle.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/circle.cljs @@ -52,11 +52,21 @@ [:& layer-menu {:ids ids :type type :values layer-values}] + [:& measures-menu {:ids ids :type type :values measure-values :shape shape}] - [:& layout-container-menu {:type type :ids [(:id shape)] :values layout-container-values :multiple false}] + + (when (or (not ^boolean is-layout-child?) ^boolean is-layout-child-absolute?) + [:& constraints-menu {:ids ids + :values constraint-values}]) + + [:& layout-container-menu + {:type type + :ids [(:id shape)] + :values layout-container-values + :multiple false}] (when (and (= (count ids) 1) is-layout-child? is-grid-parent?) [:& grid-cell/options @@ -72,9 +82,6 @@ :is-flex-parent? is-flex-parent? :is-grid-parent? is-grid-parent? :shape shape}]) - (when (or (not is-layout-child?) is-layout-child-absolute?) - [:& constraints-menu {:ids ids - :values constraint-values}]) [:& fill-menu {:ids ids :type type 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 6a3110123..e792751a2 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 @@ -62,11 +62,18 @@ :values measure-values :type type :shape shape}] + [:& component-menu {:shapes [shape]}] - (when (or (not is-layout-child?) is-layout-child-absolute?) + + (when (or (not ^boolean is-layout-child?) ^boolean is-layout-child-absolute?) [:& constraints-menu {:ids ids :values constraint-values}]) - [:& layout-container-menu {:type type :ids [(:id shape)] :values layout-container-values :multiple false}] + + [:& layout-container-menu + {:type type + :ids [(:id shape)] + :values layout-container-values + :multiple false}] (when (and (= (count ids) 1) is-layout-child? is-grid-parent?) [:& grid-cell/options diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/group.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/group.cljs index 2a65a3e69..2b661b109 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/group.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/group.cljs @@ -74,7 +74,15 @@ [:& layer-menu {:type type :ids layer-ids :values layer-values}] [:& measures-menu {:type type :ids measure-ids :values measure-values :shape shape}] [:& component-menu {:shapes [shape]}] ;;remove this in components-v2 - [:& layout-container-menu {:type type :ids [(:id shape)] :values layout-container-values :multiple false}] + + (when (or (not ^boolean is-layout-child?) ^boolean is-layout-child-absolute?) + [:& constraints-menu {:ids constraint-ids :values constraint-values}]) + + [:& layout-container-menu + {:type type + :ids [(:id shape)] + :values layout-container-values + :multiple false}] (when (and (= (count ids) 1) is-layout-child? is-grid-parent?) [:& grid-cell/options @@ -91,9 +99,6 @@ :is-grid-parent? is-grid-parent? :values layout-item-values}]) - (when (or (not is-layout-child?) is-layout-child-absolute?) - [:& constraints-menu {:ids constraint-ids :values constraint-values}]) - (when-not (empty? fill-ids) [:& fill-menu {:type type :ids fill-ids :values fill-values}]) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/image.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/image.cljs index 0e08630bc..6ae27dc02 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/image.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/image.cljs @@ -52,11 +52,21 @@ [:& layer-menu {:ids ids :type type :values layer-values}] + [:& measures-menu {:ids ids :type type :values measure-values :shape shape}] - [:& layout-container-menu {:type type :ids [(:id shape)] :values layout-container-values :multiple false}] + + (when (or (not ^boolean is-layout-child?) ^boolean is-layout-child-absolute?) + [:& constraints-menu {:ids ids + :values constraint-values}]) + + [:& layout-container-menu + {:type type + :ids [(:id shape)] + :values layout-container-values + :multiple false}] (when (and (= (count ids) 1) is-layout-child? is-grid-parent?) [:& grid-cell/options @@ -73,12 +83,6 @@ :is-grid-parent? is-grid-parent? :shape shape}]) - (when (or (not is-layout-child?) is-layout-child-absolute?) - [:& constraints-menu {:ids ids - :values constraint-values}]) - - - [:& fill-menu {:ids ids :type type :values fill-values}] diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs index 174e6f6c6..8309844a7 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs @@ -359,8 +359,14 @@ (when-not (empty? components) [:& component-menu {:shapes components}]) - [:& layout-container-menu {:type type :ids layout-container-ids :values layout-container-values :multiple true}] + (when-not (or (empty? constraint-ids) ^boolean is-layout-child?) + [:& constraints-menu {:ids constraint-ids :values constraint-values}]) + [:& layout-container-menu + {:type type + :ids layout-container-ids + :values layout-container-values + :multiple true}] (when (or is-layout-child? has-flex-layout-container?) [:& layout-item-menu @@ -372,9 +378,6 @@ :is-grid-parent? is-grid-parent? :values layout-item-values}]) - (when-not (or (empty? constraint-ids) is-layout-child?) - [:& constraints-menu {:ids constraint-ids :values constraint-values}]) - (when-not (empty? text-ids) [:& ot/text-menu {:type type :ids text-ids :values text-values}]) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/path.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/path.cljs index 776e7f327..b803916be 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/path.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/path.cljs @@ -56,7 +56,16 @@ :type type :values measure-values :shape shape}] - [:& layout-container-menu {:type type :ids [(:id shape)] :values layout-container-values :multiple false}] + + (when (or (not ^boolean is-layout-child?) ^boolean is-layout-child-absolute?) + [:& constraints-menu {:ids ids + :values constraint-values}]) + + [:& layout-container-menu + {:type type + :ids [(:id shape)] + :values layout-container-values + :multiple false}] (when (and (= (count ids) 1) is-layout-child? is-grid-parent?) [:& grid-cell/options @@ -72,9 +81,6 @@ :is-flex-parent? is-flex-parent? :is-grid-parent? is-grid-parent? :shape shape}]) - (when (or (not is-layout-child?) is-layout-child-absolute?) - [:& constraints-menu {:ids ids - :values constraint-values}]) [:& fill-menu {:ids ids :type type diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/rect.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/rect.cljs index 33fbc2862..aed851d0f 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/rect.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/rect.cljs @@ -59,6 +59,11 @@ :type type :values measure-values :shape shape}] + + (when (or (not ^boolean is-layout-child?) ^boolean is-layout-child-absolute?) + [:& constraints-menu {:ids ids + :values constraint-values}]) + [:& layout-container-menu {:type type :ids ids @@ -80,13 +85,6 @@ :is-grid-parent? is-grid-parent? :shape shape}]) - (when (or (not ^boolean is-layout-child?) - ^boolean is-layout-child-absolute?) - [:& constraints-menu {:ids ids - :values constraint-values}]) - - - [:& fill-menu {:ids ids :type type :values fill-values}] diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/svg_raw.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/svg_raw.cljs index 66ff3f574..87a2620e2 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/svg_raw.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/svg_raw.cljs @@ -128,12 +128,21 @@ :type type :values measure-values :shape shape}] - [:& layout-container-menu {:type type :ids [(:id shape)] :values layout-container-values :multiple false}] + + (when (or (not ^boolean is-layout-child?) ^boolean is-layout-child-absolute?) + [:& constraints-menu {:ids ids + :values constraint-values}]) + + [:& layout-container-menu + {:type type + :ids [(:id shape)] + :values layout-container-values + :multiple false}] (when (and (= (count ids) 1) is-layout-child? is-grid-parent?) - [:& grid-cell/options - {:shape (first parents) - :cell (ctl/get-cell-by-shape-id (first parents) (first ids))}]) + [:& grid-cell/options + {:shape (first parents) + :cell (ctl/get-cell-by-shape-id (first parents) (first ids))}]) (when is-layout-child? [:& layout-item-menu @@ -145,10 +154,6 @@ :is-grid-parent? is-grid-parent? :shape shape}]) - (when (or (not is-layout-child?) is-layout-child-absolute?) - [:& constraints-menu {:ids ids - :values constraint-values}]) - [:& fill-menu {:ids ids :type type :values fill-values}] diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/text.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/text.cljs index 4fa04b35f..990c8bfe7 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/text.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/text.cljs @@ -91,12 +91,23 @@ :type type :values (select-keys shape measure-attrs) :shape shape}] - [:& layout-container-menu {:type type :ids [(:id shape)] :values layout-container-values :multiple false}] + + (when (or (not ^boolean is-layout-child?) ^boolean is-layout-child-absolute?) + [:& constraints-menu + {:ids ids + :values (select-keys shape constraint-attrs)}]) + + [:& layout-container-menu + {:type type + :ids [(:id shape)] + :values layout-container-values + :multiple false}] (when (and (= (count ids) 1) is-layout-child? is-grid-parent?) [:& grid-cell/options {:shape (first parents) :cell (ctl/get-cell-by-shape-id (first parents) (first ids))}]) + (when is-layout-child? [:& layout-item-menu {:ids ids @@ -107,13 +118,6 @@ :is-grid-parent? is-grid-parent? :shape shape}]) - (when (or (not is-layout-child?) is-layout-child-absolute?) - [:& constraints-menu - {:ids ids - :values (select-keys shape constraint-attrs)}]) - - - [:& text-menu {:ids ids :type type