mirror of
https://github.com/penpot/penpot.git
synced 2025-07-28 21:57:29 +02:00
🐛 Fix design panel does not reappear if comment draft is open
This commit is contained in:
parent
6c1e8c3fe8
commit
91efcd17a2
4 changed files with 6 additions and 13 deletions
|
@ -90,7 +90,6 @@
|
|||
(update :comments-local assoc :open id))
|
||||
(update :comments-local assoc :options nil)
|
||||
(update :comments-local dissoc :draft)
|
||||
(update :workspace-drawing dissoc :comment)
|
||||
(update-in [:comments id] assoc (:id comment) comment))))
|
||||
|
||||
ptk/WatchEvent
|
||||
|
@ -146,7 +145,6 @@
|
|||
(update :comments-local assoc :open id)
|
||||
(update :comments-local assoc :options nil)
|
||||
(update :comments-local dissoc :draft)
|
||||
(update :workspace-drawing dissoc :comment)
|
||||
(update-in [:comments id] assoc (:id comment) comment))))
|
||||
|
||||
ptk/WatchEvent
|
||||
|
@ -474,7 +472,7 @@
|
|||
(-> state
|
||||
(update :comments-local assoc :open id)
|
||||
(update :comments-local assoc :options nil)
|
||||
(update :workspace-drawing dissoc :comment)))))
|
||||
(update :comments-local dissoc :draft)))))
|
||||
|
||||
(defn close-thread
|
||||
[]
|
||||
|
@ -482,8 +480,7 @@
|
|||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(-> state
|
||||
(update :comments-local dissoc :open :draft :options)
|
||||
(update :workspace-drawing dissoc :comment)))))
|
||||
(update :comments-local dissoc :open :draft :options)))))
|
||||
|
||||
(defn update-filters
|
||||
[{:keys [mode show list] :as params}]
|
||||
|
@ -524,7 +521,6 @@
|
|||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(-> state
|
||||
(update :workspace-drawing assoc :comment params)
|
||||
(update :comments-local assoc :draft params)))))
|
||||
|
||||
(defn update-draft-thread
|
||||
|
@ -533,7 +529,6 @@
|
|||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(-> state
|
||||
(d/update-in-when [:workspace-drawing :comment] merge data)
|
||||
(d/update-in-when [:comments-local :draft] merge data)))))
|
||||
|
||||
(defn toggle-comment-options
|
||||
|
|
|
@ -304,8 +304,7 @@
|
|||
:page-id page-id
|
||||
:file-id file-id
|
||||
:vport vport
|
||||
:zoom zoom
|
||||
:drawing drawing}])
|
||||
:zoom zoom}])
|
||||
|
||||
(when picking-color?
|
||||
[:& pixel-overlay/pixel-overlay {:vport vport
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
[rumext.v2 :as mf]))
|
||||
|
||||
(mf/defc comments-layer*
|
||||
[{:keys [vbox vport zoom drawing file-id page-id]}]
|
||||
[{:keys [vbox vport zoom file-id page-id]}]
|
||||
(let [vbox-x (dm/get-prop vbox :x)
|
||||
vbox-y (dm/get-prop vbox :y)
|
||||
vport-w (dm/get-prop vport :width)
|
||||
|
@ -73,7 +73,7 @@
|
|||
:viewport viewport
|
||||
:zoom zoom}])))
|
||||
|
||||
(when-let [draft (:comment drawing)]
|
||||
(when-let [draft (:draft local)]
|
||||
[:> cmt/comment-floating-thread-draft*
|
||||
{:draft draft
|
||||
:on-cancel on-draft-cancel
|
||||
|
|
|
@ -350,8 +350,7 @@
|
|||
[:> comments/comments-layer* {:vbox vbox
|
||||
:page-id page-id
|
||||
:vport vport
|
||||
:zoom zoom
|
||||
:drawing drawing}])
|
||||
:zoom zoom}])
|
||||
|
||||
(when picking-color?
|
||||
[:& pixel-overlay/pixel-overlay {:vport vport
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue