diff --git a/common/src/app/common/logic/libraries.cljc b/common/src/app/common/logic/libraries.cljc index af75c0484b..76bf10af2a 100644 --- a/common/src/app/common/logic/libraries.cljc +++ b/common/src/app/common/logic/libraries.cljc @@ -984,6 +984,9 @@ (and laid? (not (ctk/touched-group? shape-inst sizing)) (contains? #{:fill :auto} (get shape-main sizing)) + ;; no layout fills a shape the push leaves absolute + (not (and (= :fill (get shape-main sizing)) + (ctsl/position-absolute? shape-inst))) (or turned? (and (not (copy-sized? sizing)) (not (mth/close? (get source size) (get shape-main size))))))) diff --git a/common/test/common_tests/logic/composable_gen_test.cljc b/common/test/common_tests/logic/composable_gen_test.cljc index a64fc434fc..cb885f591a 100644 --- a/common/test/common_tests/logic/composable_gen_test.cljc +++ b/common/test/common_tests/logic/composable_gen_test.cljc @@ -2387,6 +2387,12 @@ :layout-copies false :text false}] :ops [[:grid-track 10 5 0 11] [:grid-track 0 1] [:grid-cell 0 0 0 1]]})))) +(t/deftest updating-a-main-keeps-the-fill-sizing-its-child-authors + (t/is (map? (cg/run {:world [1 1 {:variants false :text-styles false :layout :flex :layout-item-margins false + :grid-square false :library false :rich-variants false :layout-children true + :grid-empty false :layout-copies true :text false}] + :ops [[:style 8 35 1] [:style 0 29 1] [:update-main]]})))) + (t/deftest updating-a-main-pushes-a-swapped-shape-nested-in-a-swap-with-its-children (t/is (map? (cg/run {:world [3 3 {:variants true :text-styles true :scale true :layout :flex :variant-diff true :grid-square false :copies 5 :rich-variants true :layout-children true