From c1d815f97cfb62c10b3b58d1ccf424177684a605 Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Thu, 9 Apr 2026 10:05:56 +0200 Subject: [PATCH] :bug: Fix go to viewer with frame selected (#8878) --- CHANGES.md | 1 + frontend/src/app/main/data/common.cljs | 11 +++++++++++ frontend/src/app/main/ui/workspace/right_header.cljs | 6 ++---- frontend/src/app/main/ui/workspace/sidebar.cljs | 4 ++-- .../main/ui/workspace/webgl_unavailable_modal.scss | 5 ++--- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 09afc6beb2..032c8019c0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -37,6 +37,7 @@ - Token tree should be expanded by default [Taiga #13631](https://tree.taiga.io/project/penpot/issue/13631) - Fix opacity incorrectly disabled for visible shapes [Taiga #13906](https://tree.taiga.io/project/penpot/issue/13906) - Update onboarding image [Taiga #13864](https://tree.taiga.io/project/penpot/issue/13864) +- Fix hot update on color-row on texts [Taiga #13923](https://tree.taiga.io/project/penpot/issue/13923) ## 2.15.0 (Unreleased) diff --git a/frontend/src/app/main/data/common.cljs b/frontend/src/app/main/data/common.cljs index fb55df73de..cecb34d2ad 100644 --- a/frontend/src/app/main/data/common.cljs +++ b/frontend/src/app/main/data/common.cljs @@ -459,6 +459,17 @@ (let [page-id (or page-id (:current-page-id state)) file-id (or file-id (:current-file-id state)) section (or section :interactions) + selected (get-in state [:workspace-local :selected]) + objects (dsh/lookup-page-objects state file-id page-id) + frame-id (or frame-id + (reduce + (fn [_ id] + (let [obj (get objects id)] + (when (and obj + (= :frame (:type obj))) + (reduced (:id obj))))) + nil + selected)) params {:file-id file-id :page-id page-id :section section diff --git a/frontend/src/app/main/ui/workspace/right_header.cljs b/frontend/src/app/main/ui/workspace/right_header.cljs index ce10de99cf..addbfc251e 100644 --- a/frontend/src/app/main/ui/workspace/right_header.cljs +++ b/frontend/src/app/main/ui/workspace/right_header.cljs @@ -111,10 +111,8 @@ ;; --- Header Component (mf/defc right-header* - [{:keys [file layout page-id]}] - (let [file-id (:id file) - - threads-map (mf/deref refs/comment-threads) + [{:keys [file-id layout page-id]}] + (let [threads-map (mf/deref refs/comment-threads) zoom (mf/deref refs/selected-zoom) read-only? (mf/use-ctx ctx/workspace-read-only?) diff --git a/frontend/src/app/main/ui/workspace/sidebar.cljs b/frontend/src/app/main/ui/workspace/sidebar.cljs index ac219faa2f..7db1fa2077 100644 --- a/frontend/src/app/main/ui/workspace/sidebar.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar.cljs @@ -280,7 +280,7 @@ [:> history-toolbox*]])])) (mf/defc right-sidebar* - [{:keys [layout section file page-id drawing-tool active-tokens] :as props}] + [{:keys [layout section file-id page-id drawing-tool active-tokens] :as props}] (let [is-comments? (= drawing-tool :comments) is-history? (contains? layout :document-history) is-inspect? (= section :inspect) @@ -340,7 +340,7 @@ :on-pointer-move on-pointer-move}]) [:> right-header* - {:file file + {:file-id file-id :layout layout :page-id page-id}] diff --git a/frontend/src/app/main/ui/workspace/webgl_unavailable_modal.scss b/frontend/src/app/main/ui/workspace/webgl_unavailable_modal.scss index 0ad86b0c29..d57571ef0c 100644 --- a/frontend/src/app/main/ui/workspace/webgl_unavailable_modal.scss +++ b/frontend/src/app/main/ui/workspace/webgl_unavailable_modal.scss @@ -6,15 +6,14 @@ @use "ds/_utils.scss" as *; @use "ds/_borders.scss" as *; - @use "refactor/common-refactor.scss" as deprecated; .modal-overlay { - @extend .modal-overlay-base; + @extend %modal-overlay-base; } .modal-dialog { - @extend .modal-container-base; + @extend %modal-container-base; color: var(--color-foreground-secondary); display: grid;