Compare commits

...

5 Commits

Author SHA1 Message Date
Alejandro Alonso
8affefbbab 📎 Update changelog 2025-03-18 10:13:12 +01:00
jdo-odoo
0225919a45 📚 Fix typos in shortcut and insert image section
Signed-off-by: jdo-odoo <108932862+jdo-odoo@users.noreply.github.com>
2025-03-18 10:09:58 +01:00
luisδμ
5155cf2b23 🐛 Fix clicking on a comment at the viewer's sidebar is not opening threads (#6083) 2025-03-17 12:25:23 +01:00
Andrey Antukh
7403f60366 Merge pull request #6076 from penpot/alotor-fix-problem-inspect
🐛 Fix problem with readonly and inspect
2025-03-14 15:50:01 +01:00
alonso.torres
8c501db2fa 🐛 Fix problem with readonly and inspect 2025-03-14 12:24:34 +01:00
6 changed files with 34 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
# CHANGELOG
## 2.5.4 (Unreleased)
## 2.5.4
### :sparkles: New features
@@ -12,7 +12,8 @@
tab [Taiga #10377](https://tree.taiga.io/project/penpot/issue/10377)
- 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

@@ -166,7 +166,7 @@ a design.</p>
<h2 id="curves">Curves (freehand)</h2>
<p>The curve tool allows a path to be created directly in a freehand mode.
Select the curve tool by clicking on the icon at the toolbar or pressing <kbd>Ctrl/⌘</kbd> + <kbd>c</kbd>.
Select the curve tool by clicking on the icon at the toolbar or pressing <kbd>Shift/⇧</kbd> + <kbd>c</kbd>.
<p>The path created will contain a lot of points, but it is edited the same way as any other curve.</p>
<h2 id="paths">Paths (bezier)</h2>
@@ -206,7 +206,7 @@ You can choose to edit individual nodes or create new ones. Press <kbd>Esc</kbd>
<h3>Insert images</h3>
<p>There are several options for inserting an image into a Penpot file:</p>
<ul>
<li>Use the <strong>image tool</strong> at the toolbar or press <kbd>K</kbd> to inspect images in your file system.</li>
<li>Use the <strong>image tool</strong> at the toolbar or press <kbd>K</kbd> to insert images in your file system.</li>
<li><strong>Drag</strong> an image from your computer to the viewport.</li>
<li>Copy an image & paste it or drag it right from a <strong>browser</strong>.</li>
<li>Drag an image from a Penpot <strong>library</strong>.</li>

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)}

View File

@@ -197,16 +197,25 @@
:id "inspect"
:content inspect-content}])]
(mf/with-effect [permissions]
(when-not (:can-edit permissions)
(on-change-tab :inspect)))
[:div {:class (stl/css :tool-window)}
[:> tab-switcher* {:tabs tabs
:default-selected "info"
:on-change-tab on-change-tab
:selected (name options-mode)
:class (stl/css :options-tab-switcher)}]]))
(if (:can-edit permissions)
[:> tab-switcher* {:tabs tabs
:default-selected "info"
:on-change-tab on-change-tab
:selected (name options-mode)
:class (stl/css :options-tab-switcher)}]
[:div {:class (stl/css-case :element-options true
:inspect-options true
:read-only true)}
[:& hrs/right-sidebar {:page-id page-id
:objects objects
:file-id file-id
:frame shape-parent-frame
:shapes selected-shapes
:on-change-section on-change-section
:on-expand on-expand
:from :workspace}]])]))
;; TODO: this need optimizations, selected-objects and
;; selected-objects-with-children are derefed always but they only

View File

@@ -33,6 +33,11 @@
padding-top: $s-8;
}
.read-only {
grid-template-areas: "right-sidebar";
padding: var(--sp-s);
}
.design-options,
.interaction-options {
overflow: auto;

View File

@@ -231,7 +231,7 @@
show-selrect? (and selrect (empty? drawing) (not text-editing?))
show-measures? (and (not transform)
(not node-editing?)
(or show-distances? mode-inspect?))
(or show-distances? mode-inspect? read-only?))
show-artboard-names? (contains? layout :display-artboard-names)
hide-ui? (contains? layout :hide-ui)
show-rulers? (and (contains? layout :rulers) (not hide-ui?))