Add svg-attrs casing fix migration

This commit is contained in:
Andrey Antukh 2026-04-22 21:41:11 +02:00 committed by Luis de Dios
parent 97c8fcd4ad
commit e9122661ef

View File

@ -1805,6 +1805,21 @@
{})]
(cfcp/sync-component-id-with-ref-shape data libraries)))
(defmethod migrate-data "0021-fix-shape-svg-attrs"
[data _]
(some-> cfeat/*new* (swap! conj "fdata/shape-data-type"))
(letfn [(update-object [object]
(-> object
(d/update-when :svg-attrs csvg/attrs->props)
(d/update-when :svg-viewbox grc/make-rect)))
(update-container [container]
(d/update-when container :objects d/update-vals update-object))]
(-> data
(update :pages-index d/update-vals update-container)
(d/update-when :components d/update-vals update-container))))
(def available-migrations
(into (d/ordered-set)
["legacy-2"
@ -1882,4 +1897,5 @@
"0017-fix-layout-flex-dir"
"0018-remove-unneeded-objects-from-components"
"0019-fix-missing-swap-slots"
"0020-sync-component-id-with-near-main"]))
"0020-sync-component-id-with-near-main"
"0021-fix-shape-svg-attrs"]))