From 6c802bc132c29462704240a97864d2f0690d4160 Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Thu, 22 Aug 2024 09:37:47 +0200 Subject: [PATCH] Rename --- frontend/src/app/main/refs.cljs | 2 +- .../app/main/ui/workspace/sidebar/options/menus/measures.cljs | 2 +- frontend/src/app/main/ui/workspace/tokens/form.cljs | 3 +-- .../src/app/main/ui/workspace/tokens/style_dictionary.cljs | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/refs.cljs b/frontend/src/app/main/refs.cljs index d534dc78da..b1177e8c25 100644 --- a/frontend/src/app/main/refs.cljs +++ b/frontend/src/app/main/refs.cljs @@ -259,7 +259,7 @@ st/state =)) -(def get-active-theme-sets-tokens +(def workspace-active-theme-sets-tokens (l/derived wtts/get-active-theme-sets-tokens-names-map st/state =)) (def workspace-selected-token-set-tokens diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs index 7f6ba21454..2f9dd5a3a9 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs @@ -101,7 +101,7 @@ selection-parents-ref (mf/use-memo (mf/deps ids) #(refs/parents-by-ids ids)) selection-parents (mf/deref selection-parents-ref) - tokens (-> (mf/deref refs/get-active-theme-sets-tokens) + tokens (-> (mf/deref refs/workspace-active-theme-sets-tokens) (sd/use-resolved-tokens)) tokens-by-type (mf/use-memo (mf/deps tokens) #(wtc/group-tokens-by-type tokens)) diff --git a/frontend/src/app/main/ui/workspace/tokens/form.cljs b/frontend/src/app/main/ui/workspace/tokens/form.cljs index 2c80a1a8b8..9f54b9d6f5 100644 --- a/frontend/src/app/main/ui/workspace/tokens/form.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/form.cljs @@ -144,10 +144,9 @@ Token names should only contain letters and digits separated by . characters.")} (mf/defc form {::mf/wrap-props false} [{:keys [token token-type] :as _args}] - (let [tokens (mf/deref refs/get-active-theme-sets-tokens) + (let [tokens (mf/deref refs/workspace-active-theme-sets-tokens) resolved-tokens (sd/use-resolved-tokens tokens {:names-map? true :cache-atom form-token-cache-atom}) - _ (js/console.log "resolved-tokens" resolved-tokens) token-path (mf/use-memo (mf/deps (:name token)) #(wtt/token-name->path (:name token))) diff --git a/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs b/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs index 701a093475..5ee4a3b9a5 100644 --- a/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs @@ -135,6 +135,6 @@ (use-resolved-tokens config))) (defn use-active-theme-sets-tokens [& {:as config}] - (-> (mf/deref refs/get-active-theme-sets-tokens) + (-> (mf/deref refs/workspace-active-theme-sets-tokens) (use-resolved-tokens {:cache-atom !theme-tokens-cache :names-map? true})))