diff --git a/frontend/src/app/main/data/workspace/bool.cljs b/frontend/src/app/main/data/workspace/bool.cljs index 0107410859..052d8f3f6f 100644 --- a/frontend/src/app/main/data/workspace/bool.cljs +++ b/frontend/src/app/main/data/workspace/bool.cljs @@ -30,7 +30,10 @@ (dsh/process-selected objects))] (when-let [[shape changes] (clb/generate-create-bool it page-id objects ids type force-shape-id)] (rx/of (dch/commit-changes changes) - (dws/select-shapes (d/ordered-set (:id shape))))))))) + (dws/select-shapes (d/ordered-set (:id shape))) + ;; the bool takes the bounds of its result, which the layout it + ;; is in places again + (ptk/data-event :layout/update {:ids [(:parent-id shape)]}))))))) (defn group-to-bool [shape-id type] diff --git a/frontend/test/frontend_tests/composable_tests/generated_test.cljs b/frontend/test/frontend_tests/composable_tests/generated_test.cljs index 137cd40950..e5d25cc7c5 100644 --- a/frontend/test/frontend_tests/composable_tests/generated_test.cljs +++ b/frontend/test/frontend_tests/composable_tests/generated_test.cljs @@ -1109,3 +1109,10 @@ (await (replay {:world [2 0 {:variants false :rich-variants false :text true :layout :flex :layout-copies false :layout-children true}] :ops [[:structure 11 1 13] [:structure 0 3]]}))) + +(t/deftest ^:async generated-a-bool-in-a-grid-is-placed-by-it + ;; a bool takes the bounds of its result, which the grid it is in places + (await (replay {:world [3 0 {:variants true :rich-variants true :text true :layout :grid + :layout-copies true :layout-children true}] + :ops [[:rotate 16 0 7 0] [:grid-direction 0 0 0 1] [:grid-cell 0 10 0 1] [:add-child 0] + [:structure 3 6 15] [:grid-direction 0 0 0 1] [:grid-cell 0 4 2 1]]})))