0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-01 17:41:50 -05:00

Merge pull request #4350 from penpot/alotor-bugfix-36

Bugfixes
This commit is contained in:
Eva Marco 2024-04-04 12:30:40 +02:00 committed by GitHub
commit 7e398515d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 41 additions and 18 deletions

View file

@ -299,12 +299,16 @@
(cond-> shape
(neg? dot-x)
(-> (cr/update! :flip-x not)
(cr/update! :rotation -))
(cr/update! :flip-x not)
(neg? dot-x)
(cr/update! :rotation -)
(neg? dot-y)
(-> (cr/update! :flip-y not)
(cr/update! :rotation -)))))
(cr/update! :flip-y not)
(neg? dot-y)
(cr/update! :rotation -))))
(defn- apply-transform-move
"Given a new set of points transformed, set up the rectangle so it keeps

View file

@ -31,7 +31,7 @@
[app.common.uuid :as uuid]
[clojure.set :as set]))
(cr/defrecord Shape [id name type x y width height rotation selrect points transform transform-inverse parent-id frame-id])
(cr/defrecord Shape [id name type x y width height rotation selrect points transform transform-inverse parent-id frame-id flip-x flip-y])
(defn shape?
[o]

View file

@ -249,14 +249,16 @@
ptk/UpdateEvent
(update [_ state]
(d/update-in-when state [:comments thread-id id] assoc :content content))
(-> state
(d/update-in-when [:comments thread-id id] assoc :content content)))
ptk/WatchEvent
(watch [_ state _]
(let [share-id (-> state :viewer-local :share-id)]
(let [file-id (:current-file-id state)
share-id (-> state :viewer-local :share-id)]
(->> (rp/cmd! :update-comment {:id id :content content :share-id share-id})
(rx/catch #(rx/throw {:type :comment-error}))
(rx/ignore))))))
(rx/map #(retrieve-comment-threads file-id)))))))
(defn delete-comment-thread-on-workspace
[{:keys [id] :as thread}]

View file

@ -66,8 +66,7 @@
&:hover {
.cell-name {
display: grid;
grid-template-columns: 1fr auto;
display: block;
}
}

View file

@ -144,7 +144,10 @@
(conj :rect :circle :path :bool))]
(or (= uuid/zero id)
(and (or (str/includes? (str/lower (:name shape)) (str/lower search))
(str/includes? (dm/str (:id shape)) (str/lower search)))
;; Only for local development we allow search for ids. Otherwise will be hard
;; search for numbers or single letter shape names (ie: "A")
(and *assert*
(str/includes? (dm/str (:id shape)) (str/lower search))))
(or (empty? filters)
(and (contains? filters :component)
(contains? shape :component-id))

View file

@ -616,9 +616,10 @@
[:div {:class (stl/css :name-wrapper)}
[:div {:class (stl/css :component-name)}
(if multi
(tr "settings.multiple")
(cfh/last-path shape-name))]
[:span {:class (stl/css :component-name-inside)}
(if multi
(tr "settings.multiple")
(cfh/last-path shape-name))]]
(when (and can-swap? (not multi))
[:div {:class (stl/css :component-parent-name)}

View file

@ -56,7 +56,6 @@
padding-right: 0.5rem;
.component-name-wrapper {
width: 100%;
border-radius: $br-8;
}
}
@ -93,6 +92,7 @@
min-height: $s-32;
padding: $s-8 0 $s-8 $s-2;
border-radius: $br-8 0 0 $br-8;
overflow: hidden;
}
.component-name {
@ -103,6 +103,11 @@
min-height: $s-16;
}
.component-name-inside {
direction: ltr;
unicode-bidi: bidi-override;
}
.component-parent-name {
@include bodySmallTypography;
@include textEllipsis;

View file

@ -189,6 +189,7 @@
;; shortcuts.unmask
;; shortcuts.v-distribute
;; shortcuts.zoom-selected
;; shortcuts.toggle-layout-grid
(let [translat-pre (case type
:sc "shortcuts."
:sec "shortcut-section."

View file

@ -335,8 +335,8 @@
flip-x (get shape :flip-x)
flip-y (get shape :flip-y)
half-flip? (or (and (some? flip-x) (not (some? flip-y)))
(and (some? flip-y) (not (some? flip-x))))]
half-flip? (or (and flip-x (not flip-y))
(and flip-y (not flip-x)))]
(when (and (not ^boolean read-only?)
(not (:transforming shape))
@ -357,7 +357,7 @@
(and ^boolean half-flip?
(or (= position :top-right)
(= position :bottom-left)))
(- rotation 90)
(+ rotation 90)
:else
rotation)

View file

@ -20,6 +20,8 @@
:height :size
:min-width :size
:min-height :size
:max-width :size
:max-height :size
:background :color
:border :border
:border-radius :string-or-size-array

View file

@ -3023,6 +3023,9 @@ msgstr "Zoom lense increase"
msgid "shortcuts.zoom-selected"
msgstr "Zoom to selected"
msgid "shortcuts.toggle-layout-grid"
msgstr "Add/remove grid layout"
#: src/app/main/ui/dashboard/team.cljs
msgid "team.webhooks.max-length"
msgstr "The webhook name must contain at most 2048 characters."

View file

@ -3069,6 +3069,9 @@ msgstr "Incrementar zoom a objetivo"
msgid "shortcuts.zoom-selected"
msgstr "Zoom a selección"
msgid "shortcuts.toggle-layout-grid"
msgstr "Añadir/eliminar grid layout"
#: src/app/main/ui/dashboard/team.cljs
msgid "team.webhooks.max-length"
msgstr "El nombre del webhook debe contener como máximo 2048 caracteres."