mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
Merge pull request #5947 from penpot/luis-fix-design-panel-draft-comment-open
🐛 Fix design panel does not reappear if comment draft is open
This commit is contained in:
@@ -90,7 +90,6 @@
|
|||||||
(update :comments-local assoc :open id))
|
(update :comments-local assoc :open id))
|
||||||
(update :comments-local assoc :options nil)
|
(update :comments-local assoc :options nil)
|
||||||
(update :comments-local dissoc :draft)
|
(update :comments-local dissoc :draft)
|
||||||
(update :workspace-drawing dissoc :comment)
|
|
||||||
(update-in [:comments id] assoc (:id comment) comment))))
|
(update-in [:comments id] assoc (:id comment) comment))))
|
||||||
|
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
@@ -146,7 +145,6 @@
|
|||||||
(update :comments-local assoc :open id)
|
(update :comments-local assoc :open id)
|
||||||
(update :comments-local assoc :options nil)
|
(update :comments-local assoc :options nil)
|
||||||
(update :comments-local dissoc :draft)
|
(update :comments-local dissoc :draft)
|
||||||
(update :workspace-drawing dissoc :comment)
|
|
||||||
(update-in [:comments id] assoc (:id comment) comment))))
|
(update-in [:comments id] assoc (:id comment) comment))))
|
||||||
|
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
@@ -474,7 +472,7 @@
|
|||||||
(-> state
|
(-> state
|
||||||
(update :comments-local assoc :open id)
|
(update :comments-local assoc :open id)
|
||||||
(update :comments-local assoc :options nil)
|
(update :comments-local assoc :options nil)
|
||||||
(update :workspace-drawing dissoc :comment)))))
|
(update :comments-local dissoc :draft)))))
|
||||||
|
|
||||||
(defn close-thread
|
(defn close-thread
|
||||||
[]
|
[]
|
||||||
@@ -482,8 +480,7 @@
|
|||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(-> state
|
(-> state
|
||||||
(update :comments-local dissoc :open :draft :options)
|
(update :comments-local dissoc :open :draft :options)))))
|
||||||
(update :workspace-drawing dissoc :comment)))))
|
|
||||||
|
|
||||||
(defn update-filters
|
(defn update-filters
|
||||||
[{:keys [mode show list] :as params}]
|
[{:keys [mode show list] :as params}]
|
||||||
@@ -524,7 +521,6 @@
|
|||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(-> state
|
(-> state
|
||||||
(update :workspace-drawing assoc :comment params)
|
|
||||||
(update :comments-local assoc :draft params)))))
|
(update :comments-local assoc :draft params)))))
|
||||||
|
|
||||||
(defn update-draft-thread
|
(defn update-draft-thread
|
||||||
@@ -533,7 +529,6 @@
|
|||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(-> state
|
(-> state
|
||||||
(d/update-in-when [:workspace-drawing :comment] merge data)
|
|
||||||
(d/update-in-when [:comments-local :draft] merge data)))))
|
(d/update-in-when [:comments-local :draft] merge data)))))
|
||||||
|
|
||||||
(defn toggle-comment-options
|
(defn toggle-comment-options
|
||||||
|
|||||||
@@ -304,8 +304,7 @@
|
|||||||
:page-id page-id
|
:page-id page-id
|
||||||
:file-id file-id
|
:file-id file-id
|
||||||
:vport vport
|
:vport vport
|
||||||
:zoom zoom
|
:zoom zoom}])
|
||||||
:drawing drawing}])
|
|
||||||
|
|
||||||
(when picking-color?
|
(when picking-color?
|
||||||
[:& pixel-overlay/pixel-overlay {:vport vport
|
[:& pixel-overlay/pixel-overlay {:vport vport
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
[rumext.v2 :as mf]))
|
[rumext.v2 :as mf]))
|
||||||
|
|
||||||
(mf/defc comments-layer*
|
(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)
|
(let [vbox-x (dm/get-prop vbox :x)
|
||||||
vbox-y (dm/get-prop vbox :y)
|
vbox-y (dm/get-prop vbox :y)
|
||||||
vport-w (dm/get-prop vport :width)
|
vport-w (dm/get-prop vport :width)
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
:viewport viewport
|
:viewport viewport
|
||||||
:zoom zoom}])))
|
:zoom zoom}])))
|
||||||
|
|
||||||
(when-let [draft (:comment drawing)]
|
(when-let [draft (:draft local)]
|
||||||
[:> cmt/comment-floating-thread-draft*
|
[:> cmt/comment-floating-thread-draft*
|
||||||
{:draft draft
|
{:draft draft
|
||||||
:on-cancel on-draft-cancel
|
:on-cancel on-draft-cancel
|
||||||
|
|||||||
@@ -350,8 +350,7 @@
|
|||||||
[:> comments/comments-layer* {:vbox vbox
|
[:> comments/comments-layer* {:vbox vbox
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:vport vport
|
:vport vport
|
||||||
:zoom zoom
|
:zoom zoom}])
|
||||||
:drawing drawing}])
|
|
||||||
|
|
||||||
(when picking-color?
|
(when picking-color?
|
||||||
[:& pixel-overlay/pixel-overlay {:vport vport
|
[:& pixel-overlay/pixel-overlay {:vport vport
|
||||||
|
|||||||
Reference in New Issue
Block a user