mirror of
https://github.com/penpot/penpot.git
synced 2026-04-12 06:08:47 +02:00
🎉 Duplicate token group
This commit is contained in:
@@ -14,8 +14,7 @@
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[clojure.set :as set]
|
||||
[cuerdas.core :as str]
|
||||
[malli.core :as m]
|
||||
[me.flowthing.pp :as pp]))
|
||||
[malli.core :as m]))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; HIGH LEVEL SCHEMAS
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
[app.util.i18n :refer [tr]]
|
||||
[beicon.v2.core :as rx]
|
||||
[cuerdas.core :as str]
|
||||
[me.flowthing.pp :as pp]
|
||||
[potok.v2.core :as ptk]))
|
||||
|
||||
(declare set-selected-token-set-id)
|
||||
@@ -435,8 +434,6 @@
|
||||
(rx/of (dch/commit-changes changes)
|
||||
(set-selected-token-set-id (ctob/get-id token-set)))))))
|
||||
|
||||
#_{:clj-kondo/ignore [:potok/reify-type]}
|
||||
#_{:clojure-lsp/ignore [:clojure-lsp/unused-public-var]}
|
||||
(defn create-token
|
||||
([token] (create-token nil token))
|
||||
([set-id token]
|
||||
@@ -459,8 +456,6 @@
|
||||
|
||||
(rx/of (create-token-with-set token)))))))
|
||||
|
||||
#_{:clj-kondo/ignore [:potok/reify-type]}
|
||||
#_{:clojure-lsp/ignore [:clojure-lsp/unused-public-var]}
|
||||
(defn bulk-create-tokens
|
||||
[set-id token-ids type node new-node-name]
|
||||
(assert (uuid? set-id) "expected uuid for `set-id`")
|
||||
@@ -480,11 +475,9 @@
|
||||
(cpn/split-path (:name token) :separator ".")
|
||||
(assoc (:depth node) new-node-name)
|
||||
(cpn/join-path :separator "." :with-spaces? false))
|
||||
_ (pp/pprint {:token token :new-path new-name})
|
||||
token' (->> (merge token {:name new-name
|
||||
:id (cthi/new-id! (:name new-name))})
|
||||
(into {})
|
||||
#_(pp/pprint)
|
||||
(ctob/make-token))]
|
||||
(pcb/set-token changes (ctob/get-id token-set) (:id token') token')))
|
||||
(-> (pcb/empty-changes it)
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
[app.main.ui.workspace.tokens.management.node-context-menu :refer [token-node-context-menu*]]
|
||||
[app.util.array :as array]
|
||||
[app.util.i18n :refer [tr]]
|
||||
[cljs.pprint :as pp]
|
||||
[cuerdas.core :as str]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user