Compare commits

..

1 Commits

Author SHA1 Message Date
Luis de Dios
166dc05ff2 🐛 Fix incorrect icons in grid view (#8373) 2026-02-16 16:39:39 +01:00
6 changed files with 4 additions and 46 deletions

View File

@@ -867,15 +867,15 @@
:on-change on-change
:name (dm/str "flex-align-items-" type)
:options [{:id (dm/str "align-items-start-" type)
:icon (get-layout-flex-icon :align-items :start is-column)
:icon (get-layout-grid-icon :align-items :start is-column)
:label "Align items start"
:value "start"}
{:id (dm/str "align-items-center-" type)
:icon (get-layout-flex-icon :align-items :center is-column)
:icon (get-layout-grid-icon :align-items :center is-column)
:label "Align items center"
:value "center"}
{:id (dm/str "align-items-end-" type)
:icon (get-layout-flex-icon :align-items :end is-column)
:icon (get-layout-grid-icon :align-items :end is-column)
:label "Align items end"
:value "end"}]}]))

View File

@@ -13,7 +13,6 @@
[app.common.types.tokens-lib :as ctob]
[app.common.uuid :as uuid]
[app.main.data.style-dictionary :as sd]
[app.main.data.tokenscript :as ts]
[app.main.data.workspace.tokens.application :as dwta]
[app.main.data.workspace.tokens.library-edit :as dwtl]
[app.main.store :as st]
@@ -35,14 +34,6 @@
:shape-ids shape-ids
:expand-with-children false})))))
(defn- get-resolved-value
[token tokens-tree]
(let [resolved-tokens (ts/resolve-tokens tokens-tree)
resolved-value (-> resolved-tokens
(dm/get-in [(:name token) :resolved-value])
(ts/tokenscript-symbols->penpot-unit))]
resolved-value))
(defn token-proxy? [p]
(obj/type-of? p "TokenProxy"))
@@ -94,26 +85,6 @@
(fn [_ value]
(st/emit! (dwtl/update-token set-id id {:value value})))}
:resolvedValue
{:this true
:enumerable false
:get
(fn [_]
(let [token (u/locate-token file-id set-id id)
tokens-lib (u/locate-tokens-lib file-id)
tokens-tree (ctob/get-tokens-in-active-sets tokens-lib)]
(get-resolved-value token tokens-tree)))}
:resolvedValueString
{:this true
:enumerable false
:get
(fn [_]
(let [token (u/locate-token file-id set-id id)
tokens-lib (u/locate-tokens-lib file-id)
tokens-tree (ctob/get-tokens-in-active-sets tokens-lib)]
(str (get-resolved-value token tokens-tree))))}
:description
{:this true
:get

View File

@@ -113,9 +113,7 @@
class="body-m panel-item token-item"
(click)="applyToken(token.id)"
>
<span title="{{ token.resolvedValueString }}">
{{ token.name }}
</span>
<span>{{ token.name }}</span>
<button
type="button"
data-appearance="secondary"

View File

@@ -23,7 +23,6 @@ type Token = {
id: string;
name: string;
description: string;
resolvedValueString: string;
};
type TokensGroup = [string, Token[]];

View File

@@ -109,7 +109,6 @@ function loadTokens(setId: string) {
id: token.id,
name: token.name,
description: token.description,
resolvedValueString: token.resolvedValueString,
};
}),
]);

View File

@@ -4345,15 +4345,6 @@ export interface TokenBase {
*/
remove(): void;
/**
* The value calculated by finding all tokens with the same name in active sets
* and resolving the references.
*
* It's converted to string, regardless of the data type of the value depending
* on the token type. It can be undefined if no value has been found in active sets.
*/
readonly resolvedValueString: string | undefined;
/**
* Applies this token to one or more properties of the given shapes.
* @param shapes is an array of shapes to apply it.