diff --git a/CHANGES.md b/CHANGES.md index b01d7191b..93a9de8a8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -36,7 +36,8 @@ - Fix problem with line-height and texts [Taiga #3578](https://tree.taiga.io/project/penpot/issue/3578) - Fix moving frame-guides outside frames [Taiga #3839](https://tree.taiga.io/project/penpot/issue/3839) - Fix problem with 180 degree rotations [#2082](https://github.com/penpot/penpot/issues/2082) - +- Fix font rendering on grid thumbnails [Taiga #3473](https://tree.taiga.io/project/penpot/issue/3473) +- Fix Drag and drop font assets in groups ### :arrow_up: Deps updates ### :heart: Community contributions by (Thank you!) diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets.cljs index 1352747f0..8e408c060 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets.cljs @@ -1621,6 +1621,17 @@ local-data (mf/deref typography-data) menu-state (mf/use-state auto-pos-menu-state) + + extract-path-if-missing + (fn [typography] + (let [[path name] (cph/parse-path-name (:name typography))] + (if (= (:name typography) name) + typography + (assoc typography :path path :name name)))) + + typographies (->> typographies + (map extract-path-if-missing)) + groups (group-assets typographies reverse-sort?) selected-typographies (:typographies selected-assets) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs index ee70c8d50..ff3d77aca 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs @@ -10,7 +10,6 @@ [app.common.data :as d] [app.common.data.macros :as dm] [app.common.exceptions :as ex] - [app.common.pages.helpers :as cph] [app.common.text :as txt] [app.main.data.fonts :as fts] [app.main.data.shortcuts :as dsc] @@ -565,7 +564,7 @@ [:input.element-name.adv-typography-name {:type "text" :ref name-input-ref - :default-value (cph/merge-path-item (:path typography) (:name typography)) + :default-value (:name typography) :on-blur on-name-blur}] [:div.element-set-actions-button