From 37bd537bfd2a1bd7809437e522ef11e22c076f54 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 31 Jul 2023 11:54:29 +0200 Subject: [PATCH 1/2] :bug: Remove limits that can cause unexpected exceptions --- common/src/app/common/types/shape.cljc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/app/common/types/shape.cljc b/common/src/app/common/types/shape.cljc index 6a917cbd5..d43deb573 100644 --- a/common/src/app/common/types/shape.cljc +++ b/common/src/app/common/types/shape.cljc @@ -72,7 +72,7 @@ [:vector {:gen/max 5} ::gpt/point]) (sm/def! ::fill - [:map {:title "Fill" :min 1} + [:map {:title "Fill"} [:fill-color {:optional true} ::ctc/rgb-color] [:fill-opacity {:optional true} ::sm/safe-number] [:fill-color-gradient {:optional true} ::ctc/gradient] @@ -156,7 +156,7 @@ [:map {:title "GroupAttrs"} [:type [:= :group]] [:id ::sm/uuid] - [:shapes [:vector {:min 1 :gen/max 10 :gen/min 1} ::sm/uuid]]]) + [:shapes [:vector {:gen/max 10 :gen/min 1} ::sm/uuid]]]) (sm/def! ::frame-attrs [:map {:title "FrameAttrs"} @@ -172,7 +172,7 @@ [:map {:title "BoolAttrs"} [:type [:= :bool]] [:id ::sm/uuid] - [:shapes [:vector {:min 1 :gen/max 10 :gen/min 1} ::sm/uuid]] + [:shapes [:vector {:gen/max 10 :gen/min 1} ::sm/uuid]] ;; FIXME: improve this schema [:bool-type :keyword] From fc416ee4af8b20b8904bd18ca55b664e6f035869 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 31 Jul 2023 12:05:33 +0200 Subject: [PATCH 2/2] :bug: Make grid params type optional --- common/src/app/common/types/grid.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/app/common/types/grid.cljc b/common/src/app/common/types/grid.cljc index 4901c2934..29e90af4c 100644 --- a/common/src/app/common/types/grid.cljc +++ b/common/src/app/common/types/grid.cljc @@ -21,7 +21,7 @@ (sm/def! ::column-params [:map [:color ::grid-color] - [:type [::sm/one-of #{:stretch :left :center :right}]] + [:type {:optional true} [::sm/one-of #{:stretch :left :center :right}]] [:size {:optional true} [:maybe ::sm/safe-number]] [:margin {:optional true} [:maybe ::sm/safe-number]] [:item-length {:optional true} [:maybe ::sm/safe-number]]