0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-19 11:11:21 -05:00

🐛 Fix clicking on a comment at the viewer's sidebar is not opening threads (#6083)

This commit is contained in:
luisδμ 2025-03-17 12:25:23 +01:00 committed by GitHub
parent 7403f60366
commit 5155cf2b23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -13,6 +13,7 @@
- Fix minor inconsistencies on RPC `get-file-libraries` and `get-file`
methods (add missing team-id prop)
- Fix problem with viewer role and inspect mode [Taiga #9751](https://tree.taiga.io/project/penpot/issue/9751)
- Fix error when clicking on a comment at the viewer's sidebar [Taiga #10465](https://tree.taiga.io/project/penpot/issue/10465)
## 2.5.3

View file

@ -8,6 +8,7 @@
(:require-macros [app.main.style :as stl])
(:require
[app.main.data.comments :as dcmt]
[app.main.data.event :as ev]
[app.main.data.workspace :as dw]
[app.main.data.workspace.comments :as dwcm]
[app.main.refs :as refs]
@ -112,9 +113,11 @@
on-thread-click
(mf/use-fn
(mf/deps page-id)
(mf/deps page-id from-viewer)
(fn [thread]
(st/emit! (dwcm/navigate-to-comment thread))))]
(if from-viewer
(st/emit! (with-meta (dcmt/open-thread thread) {::ev/origin "viewer"}))
(st/emit! (dwcm/navigate-to-comment thread)))))]
[:div {:class (stl/css-case :comments-section true
:from-viewer from-viewer)}