From 424e9faa8ee8fe3049e65d81bba653555fc0ffb8 Mon Sep 17 00:00:00 2001 From: Andrew Zhurov Date: Wed, 27 Jul 2022 20:44:21 +0300 Subject: [PATCH 1/3] :bug: Fix paste frame removes all guides Signed-off-by: Andrei Zhurau --- frontend/src/app/main/data/workspace/selection.cljs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/data/workspace/selection.cljs b/frontend/src/app/main/data/workspace/selection.cljs index 777a5d49c..dbc2a68ba 100644 --- a/frontend/src/app/main/data/workspace/selection.cljs +++ b/frontend/src/app/main/data/workspace/selection.cljs @@ -425,11 +425,9 @@ (assoc :position (if (= (:axis %) :x) (+ (:position %) (- (:x new-frame) (:x frame))) (+ (:position %) (- (:y new-frame) (:y frame))))))))] - - (if-not (empty? new-guides) - (conj g - (into {} (map (juxt :id identity) new-guides))) - {}))) + (cond-> g + (not-empty new-guides) + (conj (into {} (map (juxt :id identity) new-guides)))))) guides frames)] (-> (pcb/with-page changes page) From 732755066e5decdd013a97924d050bda4e803d58 Mon Sep 17 00:00:00 2001 From: Andrew Zhurov Date: Sun, 31 Jul 2022 10:33:10 +0300 Subject: [PATCH 2/3] :bug: Fix text alignment becoming undefined on pasting text from clipboard Signed-off-by: Andrei Zhurau --- frontend/src/app/util/text_editor_impl.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/src/app/util/text_editor_impl.js b/frontend/src/app/util/text_editor_impl.js index 6a8cbc178..c032a90fe 100644 --- a/frontend/src/app/util/text_editor_impl.js +++ b/frontend/src/app/util/text_editor_impl.js @@ -378,10 +378,7 @@ export function insertText(state, text, attrs, inlineStyles) { ); blockArray = blockArray.map((b) => { - if (b.getText() === "") { - return mergeBlockData(b, attrs) - } - return b; + return mergeBlockData(b, attrs); }); const fragment = BlockMapBuilder.createFromArray(blockArray); From 0cc51db53373fe997eeb2b6709af23bc2099aeae Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 3 Aug 2022 09:26:29 +0200 Subject: [PATCH 3/3] :paperclip: Update changelog --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 909f62349..5b67cb8b6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -40,6 +40,9 @@ - Fix font rendering on grid thumbnails [Taiga #3473](https://tree.taiga.io/project/penpot/issue/3473) - Fix Drag and drop font assets in groups [Taiga #3763](https://tree.taiga.io/project/penpot/issue/3763) - Fix copy and paste layers order [Taiga #1617](https://tree.taiga.io/project/penpot/issue/1617) +- Fix unexpected removal of guides on copy&paste frames [Taiga #3887](https://tree.taiga.io/project/penpot/issue/3887) by @andrewzhurov +- Fix props preserving on copy&paste texts [Taiga #3629](https://tree.taiga.io/project/penpot/issue/3629) by @andrewzhurov + ### :arrow_up: Deps updates ### :heart: Community contributions by (Thank you!)