diff --git a/CHANGES.md b/CHANGES.md index 924826db3..63afd84d9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -96,6 +96,7 @@ - Fix problem when changing group size with decimal values [Taiga #3203](https://tree.taiga.io/project/penpot/issue/3203) - Fix error when drawing curves with only one point [Taiga #3282](https://tree.taiga.io/project/penpot/issue/3282) - Fix issue with paste ordering sometimes not being respected [Taiga #3268](https://tree.taiga.io/project/penpot/issue/3268) +- Fix problem when export/importing guides attached to frame [#1838](https://github.com/penpot/penpot/issues/1838) ### :arrow_up: Deps updates ### :heart: Community contributions by (Thank you!) diff --git a/frontend/src/app/main/data/workspace/persistence.cljs b/frontend/src/app/main/data/workspace/persistence.cljs index 8bf0f2db4..788f31ca5 100644 --- a/frontend/src/app/main/data/workspace/persistence.cljs +++ b/frontend/src/app/main/data/workspace/persistence.cljs @@ -246,7 +246,7 @@ (ptk/reify ::fetch-bundle ptk/WatchEvent (watch [_ _ _] - (->> (rx/zip (rp/query :file {:id file-id}) + (->> (rx/zip (rp/query :file-raw {:id file-id}) (rp/query :team-users {:file-id file-id}) (rp/query :project {:id project-id}) (rp/query :file-libraries {:file-id file-id})) diff --git a/frontend/src/app/main/repo.cljs b/frontend/src/app/main/repo.cljs index 907020c7a..275b1ea10 100644 --- a/frontend/src/app/main/repo.cljs +++ b/frontend/src/app/main/repo.cljs @@ -82,9 +82,9 @@ [id params] (send-query! id params)) -(defmethod query :file - [id params] - (send-query! id params {:raw-transit? true})) +(defmethod query :file-raw + [_id params] + (send-query! :file params {:raw-transit? true})) (defmethod mutation :default [id params] diff --git a/frontend/src/app/worker/import.cljs b/frontend/src/app/worker/import.cljs index ad5fbfe40..9038d8181 100644 --- a/frontend/src/app/worker/import.cljs +++ b/frontend/src/app/worker/import.cljs @@ -344,7 +344,13 @@ (assoc :id (resolve page-id))) flows (->> (get-in page-data [:options :flows]) (mapv #(update % :starting-frame resolve))) - page-data (d/assoc-in-when page-data [:options :flows] flows) + + guides (-> (get-in page-data [:options :guides]) + (d/update-vals #(update % :frame-id resolve))) + + page-data (-> page-data + (d/assoc-in-when [:options :flows] flows) + (d/assoc-in-when [:options :guides] guides)) file (-> file (fb/add-page page-data)) ;; Preprocess nodes to parallel upload the images. Store the result in a table