Add usability improvements to schema validation subsystem

This commit is contained in:
Andrey Antukh 2023-11-23 13:33:01 +01:00
parent 83c6354a0a
commit 37e4939af7
40 changed files with 759 additions and 511 deletions

View file

@ -53,7 +53,11 @@
([ids update-fn] (update-shapes ids update-fn nil))
([ids update-fn {:keys [reg-objects? save-undo? stack-undo? attrs ignore-tree page-id ignore-remote? ignore-touched undo-group]
:or {reg-objects? false save-undo? true stack-undo? false ignore-remote? false ignore-touched false}}]
(dm/assert! (sm/coll-of-uuid? ids))
(dm/assert!
"expected a valid set of uuid's"
(sm/check-set-of-uuid! ids))
(dm/assert! (fn? update-fn))
(ptk/reify ::update-shapes
@ -212,8 +216,8 @@
(try
(dm/assert!
"expect valid vector of changes"
(and (cpc/valid-changes? redo-changes)
(cpc/valid-changes? undo-changes)))
(and (cpc/check-changes! redo-changes)
(cpc/check-changes! undo-changes)))
(update-in state path (fn [file]
(-> file