From ba3c42e62cdcc6547bcfff45cef36d8286cd2b3f Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 17 Jan 2024 17:25:43 +0100 Subject: [PATCH] :bug: Fix broken layout and layout-gap props on migrating to comp-v2 --- backend/src/app/features/components_v2.clj | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/src/app/features/components_v2.clj b/backend/src/app/features/components_v2.clj index ba0f3dd474..0007934bba 100644 --- a/backend/src/app/features/components_v2.clj +++ b/backend/src/app/features/components_v2.clj @@ -129,7 +129,16 @@ (if (or (= gap ##Inf) (= gap ##-Inf)) 0 - gap))))) + gap))) + + ;; Fix some broken layout related attrs, probably + ;; of copypaste on flex layout betatest period + (true? (:layout shape)) + (assoc :layout :flex) + + (number? (:layout-gap shape)) + (as-> shape (let [n (:layout-gap shape)] + (assoc shape :layout-gap {:row-gap n :column-gap n}))))) update-container (fn [container]