From 73d2aad4db3b35ed2358fccc053a4c63cb69d73c Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 8 Sep 2022 16:24:37 +0200 Subject: [PATCH 1/7] :bug: Change shortcut for "Clear undo" --- CHANGES.md | 1 + frontend/src/app/main/data/workspace/shortcuts.cljs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 81657efec..2b5565275 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,7 @@ - Fix problem with texts for non existing fonts [Taiga #4087](https://tree.taiga.io/project/penpot/issue/4087) - Fix undo after moving layers will wrongly order the layers [Taiga #3344](https://tree.taiga.io/project/penpot/issue/3344) - Fix Grouping typographies by drag & drop does not work (again) [#2203](https://github.com/penpot/penpot/issues/2203) +- Change shortcut for "Clear undo" [#2219](https://github.com/penpot/penpot/issues/2219) ## 1.15.2-beta diff --git a/frontend/src/app/main/data/workspace/shortcuts.cljs b/frontend/src/app/main/data/workspace/shortcuts.cljs index 25c82a8db..e1adb145c 100644 --- a/frontend/src/app/main/data/workspace/shortcuts.cljs +++ b/frontend/src/app/main/data/workspace/shortcuts.cljs @@ -45,8 +45,8 @@ :subsections [:edit] :fn #(st/emit! dwc/redo)} - :clear-undo {:tooltip (ds/meta "Q") - :command (ds/c-mod "q") + :clear-undo {:tooltip (ds/alt "Z") + :command "alt+z" :subsections [:edit] :fn #(st/emit! dwu/reinitialize-undo)} From 3cd9a3254d4e5cb58cbcc20baa0a8df6e7b07480 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 13 Sep 2022 07:06:23 +0200 Subject: [PATCH 2/7] :tada: Add /readyz http endpoint for backend & exporter --- backend/src/app/auth/oidc.clj | 2 +- backend/src/app/http.clj | 17 ++++++++-------- backend/src/app/http/debug.clj | 31 ++++++++++++++++------------- backend/src/app/http/middleware.clj | 8 +++++--- backend/src/app/http/session.clj | 13 ++++++------ exporter/src/app/http.cljs | 11 ++++++++++ 6 files changed, 48 insertions(+), 34 deletions(-) diff --git a/backend/src/app/auth/oidc.clj b/backend/src/app/auth/oidc.clj index 39572bb18..258d6c142 100644 --- a/backend/src/app/auth/oidc.clj +++ b/backend/src/app/auth/oidc.clj @@ -515,7 +515,7 @@ [_ {:keys [executor session] :as cfg}] (let [cfg (update cfg :provider d/without-nils)] ["" {:middleware [[(:middleware session)] - [hmw/with-promise-async executor] + [hmw/with-dispatch executor] [hmw/with-config cfg] [provider-lookup] ]} diff --git a/backend/src/app/http.clj b/backend/src/app/http.clj index 7bef64e78..92b986ca6 100644 --- a/backend/src/app/http.clj +++ b/backend/src/app/http.clj @@ -10,7 +10,7 @@ [app.common.logging :as l] [app.common.transit :as t] [app.http.errors :as errors] - [app.http.middleware :as middleware] + [app.http.middleware :as mw] [app.metrics :as mtx] [app.worker :as wrk] [clojure.spec.alpha :as s] @@ -144,12 +144,12 @@ (defmethod ig/init-key ::router [_ {:keys [ws session metrics assets feedback] :as cfg}] (rr/router - [["" {:middleware [[middleware/server-timing] - [middleware/format-response] - [middleware/params] - [middleware/parse-request] - [middleware/errors errors/handle] - [middleware/restrict-methods]]} + [["" {:middleware [[mw/server-timing] + [mw/format-response] + [mw/params] + [mw/parse-request] + [mw/errors errors/handle] + [mw/restrict-methods]]} ["/metrics" {:handler (:handler metrics)}] ["/assets" {:middleware [(:middleware session)]} @@ -167,7 +167,7 @@ :handler ws :allowed-methods #{:get}}] - ["/api" {:middleware [[middleware/cors] + ["/api" {:middleware [[mw/cors] [(:middleware session)]]} ["/audit/events" {:handler (:audit-handler cfg) :allowed-methods #{:post}}] @@ -176,4 +176,3 @@ (:doc-routes cfg) (:oidc-routes cfg) (:rpc-routes cfg)]]])) - diff --git a/backend/src/app/http/debug.clj b/backend/src/app/http/debug.clj index 11a29f892..a7f936b4c 100644 --- a/backend/src/app/http/debug.clj +++ b/backend/src/app/http/debug.clj @@ -379,17 +379,20 @@ (defmethod ig/init-key ::routes [_ {:keys [session pool executor] :as cfg}] - ["/dbg" {:middleware [[(:middleware session)] - [with-authorization pool] - [mw/with-promise-async executor] - [mw/with-config cfg]]} - ["" {:handler index-handler}] - ["/health" {:handler health-handler}] - ["/changelog" {:handler changelog-handler}] - ;; ["/error-by-id/:id" {:handler error-handler}] - ["/error/:id" {:handler error-handler}] - ["/error" {:handler error-list-handler}] - ["/file/export" {:handler export-handler}] - ["/file/import" {:handler import-handler}] - ["/file/data" {:handler file-data-handler}] - ["/file/changes" {:handler file-changes-handler}]]) + [["/readyz" {:middleware [[mw/with-dispatch executor] + [mw/with-config cfg]] + :handler health-handler}] + ["/dbg" {:middleware [[(:middleware session)] + [with-authorization pool] + [mw/with-dispatch executor] + [mw/with-config cfg]]} + ["" {:handler index-handler}] + ["/health" {:handler health-handler}] + ["/changelog" {:handler changelog-handler}] + ;; ["/error-by-id/:id" {:handler error-handler}] + ["/error/:id" {:handler error-handler}] + ["/error" {:handler error-list-handler}] + ["/file/export" {:handler export-handler}] + ["/file/import" {:handler import-handler}] + ["/file/data" {:handler file-data-handler}] + ["/file/changes" {:handler file-changes-handler}]]]) diff --git a/backend/src/app/http/middleware.clj b/backend/src/app/http/middleware.clj index 95c3a6b17..d0194d24f 100644 --- a/backend/src/app/http/middleware.clj +++ b/backend/src/app/http/middleware.clj @@ -195,8 +195,9 @@ {:name ::restrict-methods :compile compile-restrict-methods}) -(def with-promise-async - {:compile +(def with-dispatch + {:name ::with-dispatch + :compile (fn [& _] (fn [handler executor] (fn [request respond raise] @@ -206,7 +207,8 @@ (p/catch raise)))))}) (def with-config - {:compile + {:name ::with-config + :compile (fn [& _] (fn [handler config] (fn diff --git a/backend/src/app/http/session.clj b/backend/src/app/http/session.clj index f3e401641..18d02d8ed 100644 --- a/backend/src/app/http/session.clj +++ b/backend/src/app/http/session.clj @@ -230,13 +230,12 @@ (handler request respond raise) :else - (let [request (-> request - (assoc :profile-id (:profile-id session)) - (assoc :session-id (:id session))) - respond (cond-> respond - (renew-session? session) - (wrap-respond session))] - + (let [request (-> request + (assoc :profile-id (:profile-id session)) + (assoc :session-id (:id session))) + respond (cond-> respond + (renew-session? session) + (wrap-respond session))] (handler request respond raise)))))) (catch Throwable cause diff --git a/exporter/src/app/http.cljs b/exporter/src/app/http.cljs index 062191169..e38a08d53 100644 --- a/exporter/src/app/http.cljs +++ b/exporter/src/app/http.cljs @@ -124,6 +124,16 @@ (let [token (.get ^js cookies cookie-name)] (handler (cond-> exchange token (assoc :request/auth-token token)))))) +(defn- wrap-health + "Add /healthz entry point intercept." + [handler] + (fn [{:keys [:request/path] :as exchange}] + (if (= path "/readyz") + (assoc exchange + :response/status 200 + :response/body "OK") + (handler exchange)))) + (defn- create-adapter [handler] (fn [req res] @@ -149,6 +159,7 @@ (defn init [] (let [handler (-> handlers/handler + (wrap-health) (wrap-auth "auth-token") (wrap-response-format) (wrap-params) From 6067498570bba41908088a4cee96aea264acc9ba Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 13 Sep 2022 13:25:22 +0200 Subject: [PATCH 3/7] :arrow_up: Update aws/s3 dependency --- backend/deps.edn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/deps.edn b/backend/deps.edn index b57ee55ec..650c8a479 100644 --- a/backend/deps.edn +++ b/backend/deps.edn @@ -50,7 +50,7 @@ ;; Pretty Print specs pretty-spec/pretty-spec {:mvn/version "0.1.4"} - software.amazon.awssdk/s3 {:mvn/version "2.17.209"}} + software.amazon.awssdk/s3 {:mvn/version "2.17.272"}} :paths ["src" "resources" "target/classes"] :aliases From bdd487adc0d23725e60338cbf18c3feb19018e14 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 14 Sep 2022 09:41:32 +0200 Subject: [PATCH 4/7] :bug: Fix problem with snap to grids --- CHANGES.md | 1 + frontend/src/app/util/snap_data.cljs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 7990d40e3..91f4fcf69 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ - Fix toggle overlay position [Taiga #4091](https://tree.taiga.io/project/penpot/issue/4091) - Fix overlay closed on clicked outside [Taiga #4027](https://tree.taiga.io/project/penpot/issue/4027) - Fix animate multiple overlays [Taiga #3993](https://tree.taiga.io/project/penpot/issue/3993) +- Fix problem with snap to grids [#2221](https://github.com/penpot/penpot/issues/2221) ## 1.15.3-beta diff --git a/frontend/src/app/util/snap_data.cljs b/frontend/src/app/util/snap_data.cljs index 81f60b952..64f217149 100644 --- a/frontend/src/app/util/snap_data.cljs +++ b/frontend/src/app/util/snap_data.cljs @@ -55,7 +55,7 @@ (defn get-grids-snap-points [frame coord] - (if (not (cph/rotated-frame? frame)) + (if (cph/rotated-frame? frame) [] (let [grid->snap (fn [[grid-type position]] {:type :layout From c9c2f9e40f32f76a98fe1cc594e3ce998c88f4b7 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 14 Sep 2022 11:20:13 +0200 Subject: [PATCH 5/7] Revert ":bug: Fix weird text align" This reverts commit 726f55bd045f2ec3a82eaf1cba698b370ead760c. --- frontend/resources/styles/main/partials/texts.scss | 2 +- frontend/src/app/main/ui/shapes/text/styles.cljs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/resources/styles/main/partials/texts.scss b/frontend/resources/styles/main/partials/texts.scss index 54a1d234e..0bece2924 100644 --- a/frontend/resources/styles/main/partials/texts.scss +++ b/frontend/resources/styles/main/partials/texts.scss @@ -16,7 +16,7 @@ .text-editor { .DraftEditor-root { - height: auto; + height: 100%; display: flex; flex-direction: column; } diff --git a/frontend/src/app/main/ui/shapes/text/styles.cljs b/frontend/src/app/main/ui/shapes/text/styles.cljs index 3cb594b87..44d23ee39 100644 --- a/frontend/src/app/main/ui/shapes/text/styles.cljs +++ b/frontend/src/app/main/ui/shapes/text/styles.cljs @@ -21,8 +21,7 @@ :width width :fontFamily "sourcesanspro" :display "flex" - :whiteSpace "break-spaces" - :flex-wrap "wrap"}] + :whiteSpace "break-spaces"}] (cond-> base (= valign "top") (obj/set! "alignItems" "flex-start") (= valign "center") (obj/set! "alignItems" "center") From 9cb6e712589333696574575fc0b570eac538ee87 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 14 Sep 2022 11:22:27 +0200 Subject: [PATCH 6/7] :bug: Fix issue when scaling to value 0 --- CHANGES.md | 1 + common/src/app/common/geom/point.cljc | 7 ++++++- frontend/src/app/main/data/workspace/transforms.cljs | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 91f4fcf69..8ed3fb5f6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,7 @@ - Fix overlay closed on clicked outside [Taiga #4027](https://tree.taiga.io/project/penpot/issue/4027) - Fix animate multiple overlays [Taiga #3993](https://tree.taiga.io/project/penpot/issue/3993) - Fix problem with snap to grids [#2221](https://github.com/penpot/penpot/issues/2221) +- Fix issue when scaling to value 0 [Taiga #4109](https://tree.taiga.io/project/penpot/issue/4109) ## 1.15.3-beta diff --git a/common/src/app/common/geom/point.cljc b/common/src/app/common/geom/point.cljc index 7c82ee0c9..e60b97d7f 100644 --- a/common/src/app/common/geom/point.cljc +++ b/common/src/app/common/geom/point.cljc @@ -317,9 +317,14 @@ (unit) (scale value)))) +(defn no-zeros + "Remove zero values from either coordinate" + [point] + (-> point + (update :x #(if (mth/almost-zero? %) 0.001 %)) + (update :y #(if (mth/almost-zero? %) 0.001 %)))) ;; --- Debug (defmethod pp/simple-dispatch Point [obj] (pr obj)) - diff --git a/frontend/src/app/main/data/workspace/transforms.cljs b/frontend/src/app/main/data/workspace/transforms.cljs index 0cf7664d3..6595caf87 100644 --- a/frontend/src/app/main/data/workspace/transforms.cljs +++ b/frontend/src/app/main/data/workspace/transforms.cljs @@ -463,7 +463,8 @@ (gpt/multiply handler-mult)) ;; Resize vector - scalev (gpt/divide (gpt/add shapev deltav) shapev) + scalev (-> (gpt/divide (gpt/add shapev deltav) shapev) + (gpt/no-zeros)) scalev (if lock? (let [v (cond From ddf8aaf68f250ae7b1e60191277ce35da3d18878 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 14 Sep 2022 12:27:48 +0200 Subject: [PATCH 7/7] :bug: Fix problem when moving shapes inside nested frames --- CHANGES.md | 3 ++- common/src/app/common/pages/helpers.cljc | 20 +++++++++++++++++ frontend/src/app/main/data/workspace.cljs | 4 ++-- .../app/main/data/workspace/drawing/box.cljs | 2 +- .../main/data/workspace/drawing/curve.cljs | 2 +- .../data/workspace/libraries_helpers.cljs | 2 +- .../app/main/data/workspace/path/drawing.cljs | 2 +- .../src/app/main/data/workspace/shapes.cljs | 5 ++--- .../app/main/data/workspace/svg_upload.cljs | 2 +- .../app/main/data/workspace/transforms.cljs | 22 ++++++++++--------- 10 files changed, 43 insertions(+), 21 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8ed3fb5f6..b1a9c6d97 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,7 +9,8 @@ - Fix overlay closed on clicked outside [Taiga #4027](https://tree.taiga.io/project/penpot/issue/4027) - Fix animate multiple overlays [Taiga #3993](https://tree.taiga.io/project/penpot/issue/3993) - Fix problem with snap to grids [#2221](https://github.com/penpot/penpot/issues/2221) -- Fix issue when scaling to value 0 [Taiga #4109](https://tree.taiga.io/project/penpot/issue/4109) +- Fix issue when scaling to value 0 [#2252](https://github.com/penpot/penpot/issues/2252) +- Fix problem when moving shapes inside nested frames [Taiga #4113](https://tree.taiga.io/project/penpot/issue/4113) ## 1.15.3-beta diff --git a/common/src/app/common/pages/helpers.cljc b/common/src/app/common/pages/helpers.cljc index d31fe916f..79571d489 100644 --- a/common/src/app/common/pages/helpers.cljc +++ b/common/src/app/common/pages/helpers.cljc @@ -287,6 +287,26 @@ (d/seek #(and position (gsh/has-point? (get objects %) position))))] (or top-frame uuid/zero))) +(defn all-frames-by-position + [objects position] + (->> (get-frames-ids objects) + (sort-z-index objects) + (filterv #(and position (gsh/has-point? (get objects %) position))))) + +(defn top-nested-frame + "Search for the top nested frame for positioning shapes when moving or creating. + Looks for all the frames in a position and then goes in depth between the top-most and its + children to find the target." + [objects position] + (let [frame-ids (all-frames-by-position objects position) + frame-set (set frame-ids)] + (loop [current-id (first frame-ids)] + (let [current-shape (get objects current-id) + child-frame-id (d/seek #(contains? frame-set %) (-> (:shapes current-shape) reverse))] + (if (nil? child-frame-id) + (or current-id uuid/zero) + (recur child-frame-id)))))) + (defn frame-by-position [objects position] (let [frame-id (frame-id-by-position objects position)] diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index b31a77e6d..d986be7bb 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -1344,7 +1344,7 @@ [frame-id frame-id delta]) (empty? page-selected) - (let [frame-id (cph/frame-id-by-position page-objects mouse-pos) + (let [frame-id (cph/top-nested-frame page-objects mouse-pos) delta (gpt/subtract mouse-pos orig-pos)] [frame-id frame-id delta]) @@ -1456,7 +1456,7 @@ height 16 page-id (:current-page-id state) frame-id (-> (wsh/lookup-page-objects state page-id) - (cph/frame-id-by-position @ms/mouse-position)) + (cph/top-nested-frame @ms/mouse-position)) shape (cp/setup-rect-selrect {:id id :type :text diff --git a/frontend/src/app/main/data/workspace/drawing/box.cljs b/frontend/src/app/main/data/workspace/drawing/box.cljs index bdffbe1f7..fe1a62864 100644 --- a/frontend/src/app/main/data/workspace/drawing/box.cljs +++ b/frontend/src/app/main/data/workspace/drawing/box.cljs @@ -65,7 +65,7 @@ focus (:workspace-focus-selected state) zoom (get-in state [:workspace-local :zoom] 1) - fid (cph/frame-id-by-position objects initial) + fid (cph/top-nested-frame objects initial) shape (get-in state [:workspace-drawing :object]) shape (-> shape diff --git a/frontend/src/app/main/data/workspace/drawing/curve.cljs b/frontend/src/app/main/data/workspace/drawing/curve.cljs index d60cc040c..fe036657e 100644 --- a/frontend/src/app/main/data/workspace/drawing/curve.cljs +++ b/frontend/src/app/main/data/workspace/drawing/curve.cljs @@ -47,7 +47,7 @@ (let [objects (wsh/lookup-page-objects state) content (get-in state [:workspace-drawing :object :content] []) position (get-in content [0 :params] nil) - frame-id (cph/frame-id-by-position objects position)] + frame-id (cph/top-nested-frame objects position)] (-> state (assoc-in [:workspace-drawing :object :frame-id] frame-id)))))) diff --git a/frontend/src/app/main/data/workspace/libraries_helpers.cljs b/frontend/src/app/main/data/workspace/libraries_helpers.cljs index a1e50c89f..0282148fb 100644 --- a/frontend/src/app/main/data/workspace/libraries_helpers.cljs +++ b/frontend/src/app/main/data/workspace/libraries_helpers.cljs @@ -146,7 +146,7 @@ objects (:objects page) unames (volatile! (un/retrieve-used-names objects)) - frame-id (cph/frame-id-by-position objects (gpt/add orig-pos delta)) + frame-id (cph/top-nested-frame objects (gpt/add orig-pos delta)) update-new-shape (fn [new-shape original-shape] diff --git a/frontend/src/app/main/data/workspace/path/drawing.cljs b/frontend/src/app/main/data/workspace/path/drawing.cljs index ff61c094a..3d1943413 100644 --- a/frontend/src/app/main/data/workspace/path/drawing.cljs +++ b/frontend/src/app/main/data/workspace/path/drawing.cljs @@ -258,7 +258,7 @@ (let [objects (wsh/lookup-page-objects state) content (get-in state [:workspace-drawing :object :content] []) position (get-in content [0 :params] nil) - frame-id (cph/frame-id-by-position objects position)] + frame-id (cph/top-nested-frame objects position)] (-> state (assoc-in [:workspace-drawing :object :frame-id] frame-id)))))) diff --git a/frontend/src/app/main/data/workspace/shapes.cljs b/frontend/src/app/main/data/workspace/shapes.cljs index a072e3023..39cb1569f 100644 --- a/frontend/src/app/main/data/workspace/shapes.cljs +++ b/frontend/src/app/main/data/workspace/shapes.cljs @@ -35,7 +35,7 @@ ;; Calculate the frame over which we're drawing (let [position @ms/mouse-position - frame-id (:frame-id attrs (cph/frame-id-by-position objects position)) + frame-id (:frame-id attrs (cph/top-nested-frame objects position)) shape (when-not (empty? selected) (cph/get-base-shape objects selected))] @@ -252,7 +252,6 @@ (ptk/reify ::create-and-add-shape ptk/WatchEvent (watch [_ state _] - (prn ">>>create-") (let [{:keys [width height]} data [vbc-x vbc-y] (viewport-center state) @@ -260,7 +259,7 @@ y (:y data (- vbc-y (/ height 2))) page-id (:current-page-id state) frame-id (-> (wsh/lookup-page-objects state page-id) - (cph/frame-id-by-position {:x frame-x :y frame-y})) + (cph/top-nested-frame {:x frame-x :y frame-y})) shape (-> (cp/make-minimal-shape type) (merge data) (merge {:x x :y y}) diff --git a/frontend/src/app/main/data/workspace/svg_upload.cljs b/frontend/src/app/main/data/workspace/svg_upload.cljs index 3c830bd59..528abce80 100644 --- a/frontend/src/app/main/data/workspace/svg_upload.cljs +++ b/frontend/src/app/main/data/workspace/svg_upload.cljs @@ -437,7 +437,7 @@ (try (let [page-id (:current-page-id state) objects (wsh/lookup-page-objects state page-id) - frame-id (cph/frame-id-by-position objects position) + frame-id (cph/top-nested-frame objects position) selected (wsh/lookup-selected state) [vb-x vb-y vb-width vb-height] (svg-dimensions svg-data) diff --git a/frontend/src/app/main/data/workspace/transforms.cljs b/frontend/src/app/main/data/workspace/transforms.cljs index 6595caf87..cb2e2f082 100644 --- a/frontend/src/app/main/data/workspace/transforms.cljs +++ b/frontend/src/app/main/data/workspace/transforms.cljs @@ -864,7 +864,7 @@ (let [position @ms/mouse-position page-id (:current-page-id state) objects (wsh/lookup-page-objects state page-id) - frame-id (cph/frame-id-by-position objects position) + frame-id (cph/top-nested-frame objects position) moving-shapes (->> ids @@ -878,15 +878,17 @@ changes (-> (pcb/empty-changes it page-id) (pcb/with-objects objects) - (pcb/update-shapes moving-frames (fn [shape] - ;; Hide in viwer must be enabled just when a board is moved inside another artboard an nested to it, we have to avoid situations like: - ;; - Moving inside the same frame - ;; - Moving outside the frame - (cond-> shape - (and (not= frame-id (:id shape)) - (not= frame-id (:frame-id shape)) - (not= frame-id uuid/zero)) - (assoc :hide-in-viewer true)))) + (pcb/update-shapes + moving-frames + (fn [shape] + ;; Hide in viwer must be enabled just when a board is moved inside another artboard an nested to it, we have to avoid situations like: + ;; - Moving inside the same frame + ;; - Moving outside the frame + (cond-> shape + (and (not= frame-id (:id shape)) + (not= frame-id (:frame-id shape)) + (not= frame-id uuid/zero)) + (assoc :hide-in-viewer true)))) (pcb/change-parent frame-id moving-shapes))] (when-not (empty? changes)