diff --git a/CHANGES.md b/CHANGES.md index a569f69caf..c5fff1ab55 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -62,6 +62,7 @@ - Fix error activating a set with invalid shadow token applied [Taiga #13528](https://tree.taiga.io/project/penpot/issue/13528) - Fix component "broken" after variant switch [Taiga #12984](https://tree.taiga.io/project/penpot/issue/12984) - Fix incorrect query for file versions [Github #8463](https://github.com/penpot/penpot/pull/8463) +- Fix warning when clicking on number token pills [Taiga #13661](https://tree.taiga.io/project/penpot/issue/13661) ## 2.13.3 diff --git a/frontend/src/app/main/ui/ds/tooltip/tooltip.cljs b/frontend/src/app/main/ui/ds/tooltip/tooltip.cljs index 690384647c..087649ca63 100644 --- a/frontend/src/app/main/ui/ds/tooltip/tooltip.cljs +++ b/frontend/src/app/main/ui/ds/tooltip/tooltip.cljs @@ -189,7 +189,6 @@ (clear-schedule schedule-ref) (add-schedule schedule-ref (d/nilv delay 300) (fn [] - (prn tooltip-id) (when-let [active @active-tooltip] (when (not= (:id active) tooltip-id) (when-let [tooltip-el (dom/get-element (:id active))] diff --git a/frontend/src/app/main/ui/inspect/styles/rows/color_properties_row.cljs b/frontend/src/app/main/ui/inspect/styles/rows/color_properties_row.cljs index 145c452fc1..ba8439b4b4 100644 --- a/frontend/src/app/main/ui/inspect/styles/rows/color_properties_row.cljs +++ b/frontend/src/app/main/ui/inspect/styles/rows/color_properties_row.cljs @@ -84,7 +84,7 @@ :else "none"))) copy-attr (mf/use-fn - (mf/deps copied formatted-color-value) + (mf/deps copied copiable-value) (fn [] (reset! copied* true) (clipboard/to-clipboard copiable-value) diff --git a/frontend/src/app/main/ui/workspace/tokens/management/group.cljs b/frontend/src/app/main/ui/workspace/tokens/management/group.cljs index 78ee54187e..19c3636e28 100644 --- a/frontend/src/app/main/ui/workspace/tokens/management/group.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/management/group.cljs @@ -141,14 +141,16 @@ (fn [event token] (let [token (ctob/get-token tokens-lib selected-token-set-id (:id token))] (dom/stop-propagation event) - (if (and not-editing? (seq selected-shapes) (not= (:type token) :number)) - (st/emit! (dwta/toggle-token {:token token - :shape-ids selected-ids})) - (when (seq selected-shapes) - (st/emit! (ntf/show {:content (tr "workspace.tokens.error-text-edition") - :type :toast - :level :warning - :timeout 3000})))))))] + ;; Number tokens can't be applied via button click + (when (not= (:type token) :number) + (if (and not-editing? (seq selected-shapes)) + (st/emit! (dwta/toggle-token {:token token + :shape-ids selected-ids})) + (when (seq selected-shapes) + (st/emit! (ntf/show {:content (tr "workspace.tokens.error-text-edition") + :type :toast + :level :warning + :timeout 3000}))))))))] [:div {:class (stl/css :token-section-wrapper) :data-testid (dm/str "section-" (name type))}