mirror of
https://github.com/penpot/penpot.git
synced 2025-05-07 02:35:58 +02:00
📎 Add some notes to assets ns in sidebar
This commit is contained in:
parent
c405e9a7a3
commit
ade41f77f3
1 changed files with 5 additions and 12 deletions
|
@ -47,14 +47,10 @@
|
|||
[potok.core :as ptk]
|
||||
[rumext.alpha :as mf]))
|
||||
|
||||
;; TODO: refactor to remove duplicate code and less parameter passing.
|
||||
;; - Move all state to [:workspace-local :assets-bar file-id :open-boxes {}
|
||||
;; :open-groups {}
|
||||
;; :reverse-sort?
|
||||
;; :listing-thumbs?
|
||||
;; :selected-assets {}]
|
||||
;; - Move selection code to independent functions that receive the state as a parameter.
|
||||
;;
|
||||
;; NOTE: TODO: for avoid too many arguments, I think we can use react
|
||||
;; context variables for pass to the down tree all the common
|
||||
;; variables that are defined on the MAIN container/box component.
|
||||
|
||||
;; TODO: change update operations to admit multiple ids, thus avoiding the need of
|
||||
;; emitting many events and opening an undo transaction. Also move the logic
|
||||
;; of grouping, deleting, etc. to events in the data module, since now the
|
||||
|
@ -205,8 +201,6 @@
|
|||
create-typed-assets-group (partial create-typed-assets-group components-to-group)]
|
||||
(modal/show! :name-group-dialog {:accept create-typed-assets-group}))))))
|
||||
|
||||
|
||||
|
||||
(defn- on-drag-enter-asset
|
||||
[event asset dragging? selected-assets selected-assets-paths]
|
||||
(when (and
|
||||
|
@ -275,8 +269,6 @@
|
|||
(:id target-asset)
|
||||
(cph/merge-path-item prefix (:name target-asset))))))))
|
||||
|
||||
|
||||
|
||||
;; ---- Common blocks ----
|
||||
|
||||
(def auto-pos-menu-state {:open? false
|
||||
|
@ -1090,6 +1082,7 @@
|
|||
:else (:value color))
|
||||
|
||||
;; TODO: looks like the first argument is not necessary
|
||||
;; TODO: this code should be out of this UI component
|
||||
apply-color
|
||||
(fn [_ event]
|
||||
(let [objects (wsh/lookup-page-objects @st/state)
|
||||
|
|
Loading…
Add table
Reference in a new issue