0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-12 07:41:43 -05:00

🐛 Fix nav to comments in a different page

This commit is contained in:
Andrés Moya 2022-01-11 14:47:23 +01:00 committed by Andrey Antukh
parent a15f867059
commit a8249b73b6
4 changed files with 6 additions and 4 deletions

View file

@ -44,6 +44,7 @@
- Right click over artboard name to open its menu [Taiga #1679](https://tree.taiga.io/project/penpot/issue/1679) - Right click over artboard name to open its menu [Taiga #1679](https://tree.taiga.io/project/penpot/issue/1679)
- Make the default session cookue use SameSite=Lax instead of Strict (causes some issues in latest versions of Chrome). - Make the default session cookue use SameSite=Lax instead of Strict (causes some issues in latest versions of Chrome).
- Fix "open in new tab" on dashboard [Taiga #2235](https://tree.taiga.io/project/penpot/issue/2355) - Fix "open in new tab" on dashboard [Taiga #2235](https://tree.taiga.io/project/penpot/issue/2355)
- Fix navigate comments in right sidebar [Taiga #2163](https://tree.taiga.io/project/penpot/issue/2163)
### :arrow_up: Deps updates ### :arrow_up: Deps updates

View file

@ -445,7 +445,7 @@
:y (+ (:y srect) (/ (- (:height srect) height) 2))))))) :y (+ (:y srect) (/ (- (:height srect) height) 2)))))))
(setup [state local] (setup [state local]
(if (:vbox local) (if (and (:vbox local) (:vport local))
(update* local) (update* local)
(initialize state local)))] (initialize state local)))]

View file

@ -96,8 +96,7 @@
:file-id (:file-id thread)} :file-id (:file-id thread)}
qparams {:page-id (:page-id thread)}] qparams {:page-id (:page-id thread)}]
(rx/merge (rx/merge
(rx/of (rt/nav :workspace pparams qparams) (rx/of (rt/nav :workspace pparams qparams))
(dw/select-for-drawing :comments))
(->> stream (->> stream
(rx/filter (ptk/type? ::dw/initialize-viewport)) (rx/filter (ptk/type? ::dw/initialize-viewport))
(rx/take 1) (rx/take 1)

View file

@ -79,7 +79,9 @@
(st/emit! (dw/go-to-page (:page-id thread)))) (st/emit! (dw/go-to-page (:page-id thread))))
(tm/schedule (tm/schedule
(fn [] (fn []
(st/emit! (dwcm/center-to-comment-thread thread) (st/emit! (when (not= page-id (:page-id thread))
(dw/select-for-drawing :comments))
(dwcm/center-to-comment-thread thread)
(-> (dcm/open-thread thread) (-> (dcm/open-thread thread)
(with-meta {::ev/origin "workspace"})))))))] (with-meta {::ev/origin "workspace"})))))))]