mirror of
https://github.com/penpot/penpot.git
synced 2026-11-10 03:50:33 +00:00
🐛 Re-enable adding layout to a variant container (#12879)
This commit is contained in:
parent
0333410482
commit
4f02995a3c
@ -299,8 +299,7 @@
|
||||
|
||||
;; Refuse before undo: container or cross-boundary. Leave single
|
||||
;; mains on the from-id branch (selection refuses has-variant?).
|
||||
(if (or (some ctc/is-variant-container? selected-shapes)
|
||||
(ctn/crosses-variant-set-boundary? objects selected-shapes))
|
||||
(if (ctn/crosses-variant-set-boundary? objects selected-shapes)
|
||||
(rx/empty)
|
||||
(rx/of
|
||||
(dwu/start-undo-transaction undo-id)
|
||||
|
||||
@ -618,7 +618,8 @@
|
||||
(t/is (= (:id group) (:parent-id (cths/get-shape file' :nested-a))))
|
||||
(t/is (= (:id group) (:parent-id (cths/get-shape file' :nested-b))))))))))
|
||||
|
||||
(t/deftest create-layout-of-variant-container-only-does-not-commit
|
||||
;; A variant container DO may have a layout
|
||||
(t/deftest create-layout-of-variant-container-only-does-commit-and-works
|
||||
(t/async
|
||||
done
|
||||
(let [file (variant-file)
|
||||
@ -634,8 +635,8 @@
|
||||
(fn [state]
|
||||
(let [file' (ths/get-file-from-state state)
|
||||
board' (cths/get-shape file' :variant)]
|
||||
(t/is (= 0 (count @commits)))
|
||||
(t/is (not (ctl/any-layout? board')))
|
||||
(t/is (= 1 (count @commits)))
|
||||
(t/is (ctl/any-layout? board'))
|
||||
(t/is (ctk/is-variant-container? board'))
|
||||
(t/is (= (:parent-id board) (:parent-id board')))))
|
||||
:commits commits))))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user