mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 04:18:30 +02:00
♻️ Refactor change builder for make it more efficient
Mainly replaces the usafe of the inneficient d/preconj helper with a combination of conj and simple list as data structure whitch maintains the previous ordering semantics on addition. Also removes the d/preconj from the codebase.
This commit is contained in:
parent
4e974cd2f3
commit
5b3e12bb9c
9 changed files with 326 additions and 294 deletions
|
@ -10,19 +10,22 @@
|
|||
[app.common.geom.shapes :as gsh]
|
||||
[app.common.pages :as cp]
|
||||
[app.common.pages.helpers :as cph]
|
||||
[app.common.pprint :as pp]
|
||||
[app.common.schema :as sm]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.main.data.workspace :as dw]
|
||||
[beicon.core :as rx]
|
||||
[cljs.pprint :refer [pprint]]
|
||||
[cljs.test :as t :include-macros true]
|
||||
[cljs.test :as t]
|
||||
[potok.core :as ptk]))
|
||||
|
||||
;; ---- Helpers to manage global events
|
||||
|
||||
(defn on-error
|
||||
[cause]
|
||||
(js/console.log "[CAUSE]:" (.-stack cause))
|
||||
(js/console.log "[DATA]:" (pr-str (ex-data cause))))
|
||||
|
||||
(js/console.log "STORE ERROR" (.-stack cause))
|
||||
(when-let [data (some-> cause ex-data ::sm/explain)]
|
||||
(pp/pprint (sm/humanize-data data))))
|
||||
|
||||
(defn prepare-store
|
||||
"Create a store with the given initial state. Wait until
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue