From fe53869308208c508fe972d7eb3864b12c84c54f Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Fri, 1 Aug 2025 13:52:09 +0200 Subject: [PATCH] :bug: Fix small details on number token application (#7051) --- CHANGES.md | 1 + .../src/app/main/ui/workspace/tokens/management/group.cljs | 2 +- .../app/main/ui/workspace/tokens/management/token_pill.cljs | 4 +++- frontend/translations/en.po | 4 ++++ frontend/translations/es.po | 4 ++++ 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index d00fda6a47..f7ed751bc9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -55,6 +55,7 @@ - Fix tooltip position after first time [Taiga #11688](https://tree.taiga.io/project/penpot/issue/11688) - Fix export button width on inspect tab [Taiga #11394](https://tree.taiga.io/project/penpot/issue/11394) - Fix stroke width token application [Taiga #11724](https://tree.taiga.io/project/penpot/issue/11724) +- Fix number token application on shape [Taiga #11331](https://tree.taiga.io/project/penpot/task/11331) ## 2.8.1 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 2a55e65960..3145ab7b64 100644 --- a/frontend/src/app/main/ui/workspace/tokens/management/group.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/management/group.cljs @@ -91,7 +91,7 @@ (mf/deps selected-shapes not-editing?) (fn [event token] (dom/stop-propagation event) - (when (and not-editing? (seq selected-shapes)) + (when (and not-editing? (seq selected-shapes) (not= (:type token) :number)) (st/emit! (dwta/toggle-token {:token token :shapes selected-shapes})))))] diff --git a/frontend/src/app/main/ui/workspace/tokens/management/token_pill.cljs b/frontend/src/app/main/ui/workspace/tokens/management/token_pill.cljs index 669eb6056d..51e2fa79cd 100644 --- a/frontend/src/app/main/ui/workspace/tokens/management/token_pill.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/management/token_pill.cljs @@ -124,7 +124,9 @@ base-title (dm/str "Token: " name "\n" (tr "workspace.tokens.original-value" value) "\n" - (tr "workspace.tokens.resolved-value" resolved-value))] + (tr "workspace.tokens.resolved-value" resolved-value) + (when (= (:type token) :number) + (dm/str "\n" (tr "workspace.tokens.more-options"))))] (cond ;; If there are errors, show the appropriate message diff --git a/frontend/translations/en.po b/frontend/translations/en.po index fd85f1db7c..745621ca7c 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -7546,6 +7546,10 @@ msgstr "Type '%s' is not supported (%s)\n" msgid "workspace.tokens.value-not-valid" msgstr "The value is not valid" +#: src/app/main/ui/workspace/tokens/token_pill.cljs +msgid "workspace.tokens.more-options" +msgstr "Right click to see options" + #: src/app/main/data/workspace/tokens/errors.cljs:61 msgid "workspace.tokens.value-with-units" msgstr "Invalid value: Units are not allowed." diff --git a/frontend/translations/es.po b/frontend/translations/es.po index fe1e7d8280..562c8e1752 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -7483,6 +7483,10 @@ msgstr "El tipo '%s' no está soportado (%s)\n" msgid "workspace.tokens.value-not-valid" msgstr "El valor no es válido" +#: src/app/main/ui/workspace/tokens/token_pill.cljs +msgid "workspace.tokens.more-options" +msgstr "Click derecho para ver opciones" + #: src/app/main/data/workspace/tokens/errors.cljs:61 msgid "workspace.tokens.value-with-units" msgstr "Valor no válido: No se permiten unidades."