0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 06:58:58 -05:00

Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Alejandro Alonso 2023-07-03 09:38:18 +02:00
commit d22c47fc50
4 changed files with 12 additions and 8 deletions

View file

@ -246,9 +246,8 @@
(let [shape-old (dm/get-in data-old [:pages-index page-id :objects id])
shape-new (dm/get-in data-new [:pages-index page-id :objects id])]
;; If object has changed verify is correct
(when (and (some? shape-old)
(some? shape-new)
;; If object has changed or is new verify is correct
(when (and (some? shape-new)
(not= shape-old shape-new))
(dm/verify! (cts/shape? shape-new)))))]

View file

@ -22,14 +22,14 @@
[:map
[:color ::grid-color]
[:type [::sm/one-of #{:stretch :left :center :right}]]
[:size {:optional true} ::sm/safe-number]
[:size {:optional true} [:maybe ::sm/safe-number]]
[:margin {:optional true} [:maybe ::sm/safe-number]]
[:item-length {:optional true} [:maybe ::sm/safe-number]]
[:gutter {:optional true} [:maybe ::sm/safe-number]]])
(sm/def! ::square-params
[:map
[:size ::sm/safe-number]
[:size {:optional true} [:maybe ::sm/safe-number]]
[:color ::grid-color]])
(sm/def! ::grid

View file

@ -225,7 +225,7 @@
[:map {:title "TextAttrs"}
[:id ::sm/uuid]
[:type [:= :text]]
[:content ::ctsx/content]])
[:content {:optional true} [:maybe ::ctsx/content]]])
(sm/def! ::shape
[:multi {:dispatch :type :title "Shape"}

View file

@ -102,7 +102,10 @@
input (mf/use-ref)
fonts (mf/use-memo (mf/deps @state) #(filter-fonts @state @fonts/fonts))
recent-fonts (mf/deref refs/workspace-recent-fonts)
fontsdb (mf/deref fonts/fontsdb)
;; Filtering deleted fonts
recent-fonts (->> (mf/deref refs/workspace-recent-fonts)
(into [] (filter #(some? (get fontsdb (:id %))))))
select-next
(mf/use-callback
@ -259,7 +262,9 @@
fonts (mf/deref fonts/fontsdb)
font (get fonts font-id)
recent-fonts (mf/deref refs/workspace-recent-fonts)
;; Filtering deleted fonts
recent-fonts (->> (mf/deref refs/workspace-recent-fonts)
(into [] (filter #(some? (get fonts (:id %))))))
last-font (mf/use-ref nil)
open-selector? (mf/use-state false)