From f20032199abb86d02a1b908ff2d633962b18ec9d Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 16 Jun 2025 09:24:00 +0200 Subject: [PATCH 1/4] :tada: Add Serbian lang --- CHANGES.md | 1 + frontend/scripts/_helpers.js | 1 + frontend/src/app/util/i18n.cljs | 1 + 3 files changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index fcc74d90a0..71c897c0e2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -38,6 +38,7 @@ on-premises instances** that want to keep up to date. - Update google fonts (at 2025/05/19) [Taiga 10792](https://tree.taiga.io/project/penpot/us/10792) - Add tooltip component to DS [Taiga 9220](https://tree.taiga.io/project/penpot/us/9220) - Allow multi file token export [Taiga #10144](https://tree.taiga.io/project/penpot/us/10144) +- Add Serbian language ### :bug: Bugs fixed diff --git a/frontend/scripts/_helpers.js b/frontend/scripts/_helpers.js index 7602b9c149..ffa74c1889 100644 --- a/frontend/scripts/_helpers.js +++ b/frontend/scripts/_helpers.js @@ -274,6 +274,7 @@ async function readTranslations() { "fa", "fr", "he", + "sr", "nb_NO", "pl", "pt_BR", diff --git a/frontend/src/app/util/i18n.cljs b/frontend/src/app/util/i18n.cljs index 06aecacc84..66f262f0e9 100644 --- a/frontend/src/app/util/i18n.cljs +++ b/frontend/src/app/util/i18n.cljs @@ -43,6 +43,7 @@ {:label "Украї́нська мо́ва (community)" :value "uk"} {:label "Český jazyk (community)" :value "cs"} {:label "Latviešu valoda (community)" :value "lv"} + {:label "Српски (community)" :value "sr"} {:label "Føroyskt mál (community)" :value "fo"} {:label "Korean (community)" :value "ko"} {:label "עִבְרִית (community)" :value "he"} From c6f4ee1974e72b2dead4e1b4f44af9153d7608f6 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 16 Jun 2025 11:55:11 +0200 Subject: [PATCH 2/4] :arrow_up: Update cuerdas dependency Fixes a corner case with camel->kebab casing --- CHANGES.md | 2 +- common/deps.edn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 71c897c0e2..512173f424 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -49,7 +49,7 @@ on-premises instances** that want to keep up to date. - Fix palette is over sidebar [#11160](https://tree.taiga.io/project/penpot/issue/11160) - Fix font size input not displaying "mixed" when multiple texts are selected [Taiga #11177](https://tree.taiga.io/project/penpot/issue/11177) - Misalignments at Create account [Taiga #11315](https://tree.taiga.io/project/penpot/issue/11315) - +- Fix issue with importing files where flex/grid is used [Taiga #11334](https://tree.taiga.io/project/penpot/issue/11334) ## 2.7.2 diff --git a/common/deps.edn b/common/deps.edn index bffd94a026..f6e54ae876 100644 --- a/common/deps.edn +++ b/common/deps.edn @@ -28,7 +28,7 @@ integrant/integrant {:mvn/version "0.13.1"} funcool/tubax {:mvn/version "2021.05.20-0"} - funcool/cuerdas {:mvn/version "2025.05.26-411"} + funcool/cuerdas {:mvn/version "2025.06.16-414"} funcool/promesa {:git/sha "f52f58cfacf62f59eab717e2637f37729d0cc383" :git/url "https://github.com/funcool/promesa"} From 481d1ec53a48e418f4ae4f4d83a4096388641eb5 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 16 Jun 2025 12:20:40 +0200 Subject: [PATCH 3/4] :sparkles: Normalize layout schemas --- .../src/app/common/files/shapes_helpers.cljc | 8 +- common/src/app/common/types/shape.cljc | 44 ++---- common/src/app/common/types/shape/layout.cljc | 127 ++++++++---------- 3 files changed, 73 insertions(+), 106 deletions(-) diff --git a/common/src/app/common/files/shapes_helpers.cljc b/common/src/app/common/files/shapes_helpers.cljc index fa1ba12bd0..a6421f9405 100644 --- a/common/src/app/common/files/shapes_helpers.cljc +++ b/common/src/app/common/files/shapes_helpers.cljc @@ -91,10 +91,10 @@ parent-id (or parent-id (get selected-obj :parent-id)) base-parent (get objects parent-id) - layout-props + layout-attrs (when (and (= 1 (count selected)) (ctl/any-layout? base-parent)) - (select-keys selected-obj ctl/layout-item-props)) + (select-keys selected-obj ctl/layout-child-attrs)) target-cell-id (if (and (nil? target-cell-id) @@ -129,8 +129,8 @@ :parent-id parent-id :shapes (into [] selected)) - (some? layout-props) - (d/patch-object layout-props) + (some? layout-attrs) + (d/patch-object layout-attrs) ;; Frames from shapes will not be displayed in viewer and no clipped (or (not= frame-id uuid/zero) without-fill?) diff --git a/common/src/app/common/types/shape.cljc b/common/src/app/common/types/shape.cljc index aac6b018e8..ed0ba5ae3a 100644 --- a/common/src/app/common/types/shape.cljc +++ b/common/src/app/common/types/shape.cljc @@ -313,7 +313,7 @@ :title "Shape"} [:group [:merge {:title "GroupShape"} - ctsl/schema:layout-attrs + ctsl/schema:layout-child-attrs schema:group-attrs schema:shape-generic-attrs schema:shape-geom-attrs @@ -321,8 +321,8 @@ [:frame [:merge {:title "FrameShape"} + ctsl/schema:layout-child-attrs ctsl/schema:layout-attrs - ::ctsl/layout-attrs schema:frame-attrs schema:shape-generic-attrs schema:shape-geom-attrs @@ -332,14 +332,14 @@ [:bool [:merge {:title "BoolShape"} - ctsl/schema:layout-attrs + ctsl/schema:layout-child-attrs schema:bool-attrs schema:shape-generic-attrs schema:shape-base-attrs]] [:rect [:merge {:title "RectShape"} - ctsl/schema:layout-attrs + ctsl/schema:layout-child-attrs schema:rect-attrs schema:shape-generic-attrs schema:shape-geom-attrs @@ -347,7 +347,7 @@ [:circle [:merge {:title "CircleShape"} - ctsl/schema:layout-attrs + ctsl/schema:layout-child-attrs schema:circle-attrs schema:shape-generic-attrs schema:shape-geom-attrs @@ -355,7 +355,7 @@ [:image [:merge {:title "ImageShape"} - ctsl/schema:layout-attrs + ctsl/schema:layout-child-attrs schema:image-attrs schema:shape-generic-attrs schema:shape-geom-attrs @@ -363,7 +363,7 @@ [:svg-raw [:merge {:title "SvgRawShape"} - ctsl/schema:layout-attrs + ctsl/schema:layout-child-attrs schema:svg-raw-attrs schema:shape-generic-attrs schema:shape-geom-attrs @@ -371,14 +371,14 @@ [:path [:merge {:title "PathShape"} - ctsl/schema:layout-attrs + ctsl/schema:layout-child-attrs schema:path-attrs schema:shape-generic-attrs schema:shape-base-attrs]] [:text [:merge {:title "TextShape"} - ctsl/schema:layout-attrs + ctsl/schema:layout-child-attrs schema:text-attrs schema:shape-generic-attrs schema:shape-geom-attrs @@ -682,23 +682,6 @@ :r3 :r4}) -(def ^:private layout-extract-props - #{:layout - :layout-flex-dir - :layout-gap-type - :layout-gap - :layout-wrap-type - :layout-align-items - :layout-align-content - :layout-justify-items - :layout-justify-content - :layout-padding-type - :layout-padding - :layout-grid-dir - :layout-grid-rows - :layout-grid-columns - :layout-grid-cells}) - (defn extract-props "Retrieves an object with the 'pasteable' properties for a shape." [shape] @@ -729,9 +712,8 @@ (assoc-props node txt/text-node-attrs))) props))) - (extract-layout-props - [props shape] - (d/patch-object props (select-keys shape layout-extract-props)))] + (extract-layout-attrs [props shape] + (d/patch-object props (select-keys shape ctsl/layout-attrs)))] (let [;; For texts we don't extract the fill extract-props @@ -739,7 +721,7 @@ (-> shape (select-keys extract-props) (cond-> (cfh/text-shape? shape) (extract-text-props shape)) - (cond-> (ctsl/any-layout? shape) (extract-layout-props shape)))))) + (cond-> (ctsl/any-layout? shape) (extract-layout-attrs shape)))))) (defn patch-props "Given the object of `extract-props` applies it to a shape. Adapt the shape if necesary" @@ -764,7 +746,7 @@ (d/patch-object (select-keys props txt/text-node-attrs)))))))))) (patch-layout-props [shape props] - (let [shape (d/patch-object shape (select-keys props layout-extract-props))] + (let [shape (d/patch-object shape (select-keys props ctsl/layout-attrs))] (cond-> shape (ctsl/grid-layout? shape) (ctsl/assign-cells objects))))] diff --git a/common/src/app/common/types/shape/layout.cljc b/common/src/app/common/types/shape/layout.cljc index e66016502f..10051ee759 100644 --- a/common/src/app/common/types/shape/layout.cljc +++ b/common/src/app/common/types/shape/layout.cljc @@ -43,7 +43,6 @@ ;; :layout-item-absolute ;; boolean ;; :layout-item-z-index ;; int - (def layout-types #{:flex :grid}) @@ -74,49 +73,6 @@ (def justify-items-types #{:start :end :center :stretch}) -(def layout-item-props - [:layout-item-margin - :layout-item-margin-type - :layout-item-h-sizing - :layout-item-v-sizing - :layout-item-max-h - :layout-item-min-h - :layout-item-max-w - :layout-item-min-w - :layout-item-absolute - :layout-item-z-index]) - -(sm/register! - ^{::sm/type ::layout-attrs} - [:map {:title "LayoutAttrs"} - [:layout {:optional true} [::sm/one-of layout-types]] - [:layout-flex-dir {:optional true} [::sm/one-of flex-direction-types]] - [:layout-gap {:optional true} - [:map - [:row-gap {:optional true} ::sm/safe-number] - [:column-gap {:optional true} ::sm/safe-number]]] - [:layout-gap-type {:optional true} [::sm/one-of gap-types]] - [:layout-wrap-type {:optional true} [::sm/one-of wrap-types]] - [:layout-padding-type {:optional true} [::sm/one-of padding-type]] - [:layout-padding {:optional true} - [:map - [:p1 ::sm/safe-number] - [:p2 ::sm/safe-number] - [:p3 ::sm/safe-number] - [:p4 ::sm/safe-number]]] - [:layout-justify-content {:optional true} [::sm/one-of justify-content-types]] - [:layout-justify-items {:optional true} [::sm/one-of justify-items-types]] - [:layout-align-content {:optional true} [::sm/one-of align-content-types]] - [:layout-align-items {:optional true} [::sm/one-of align-items-types]] - - [:layout-grid-dir {:optional true} [::sm/one-of grid-direction-types]] - [:layout-grid-rows {:optional true} - [:vector {:gen/max 2} ::grid-track]] - [:layout-grid-columns {:optional true} - [:vector {:gen/max 2} ::grid-track]] - [:layout-grid-cells {:optional true} - [:map-of {:gen/max 5} ::sm/uuid ::grid-cell]]]) - ;; Grid types (def grid-track-types #{:percent :flex :auto :fixed}) @@ -130,29 +86,59 @@ (def grid-cell-justify-self-types #{:auto :start :center :end :stretch}) -(sm/register! - ^{::sm/type ::grid-cell} - [:map {:title "GridCell"} - [:id ::sm/uuid] - [:area-name {:optional true} :string] - [:row ::sm/safe-int] - [:row-span ::sm/safe-int] - [:column ::sm/safe-int] - [:column-span ::sm/safe-int] - [:position {:optional true} [::sm/one-of grid-position-types]] - [:align-self {:optional true} [::sm/one-of grid-cell-align-self-types]] - [:justify-self {:optional true} [::sm/one-of grid-cell-justify-self-types]] - [:shapes - [:vector {:gen/max 1} ::sm/uuid]]]) +(def ^:private schema:grid-cell + [:map {:title "GridCell"} + [:id ::sm/uuid] + [:area-name {:optional true} :string] + [:row ::sm/safe-int] + [:row-span ::sm/safe-int] + [:column ::sm/safe-int] + [:column-span ::sm/safe-int] + [:position {:optional true} [::sm/one-of grid-position-types]] + [:align-self {:optional true} [::sm/one-of grid-cell-align-self-types]] + [:justify-self {:optional true} [::sm/one-of grid-cell-justify-self-types]] + [:shapes + [:vector {:gen/max 1} ::sm/uuid]]]) -(sm/register! - ^{::sm/type ::grid-track} - [:map {:title "GridTrack"} - [:type [::sm/one-of grid-track-types]] - [:value {:optional true} [:maybe ::sm/safe-number]]]) +(def ^:private schema:grid-track + [:map {:title "GridTrack"} + [:type [::sm/one-of grid-track-types]] + [:value {:optional true} [:maybe ::sm/safe-number]]]) -(def check-grid-track! - (sm/check-fn ::grid-track)) +(def schema:layout-attrs + [:map {:title "LayoutAttrs"} + [:layout {:optional true} [::sm/one-of layout-types]] + [:layout-flex-dir {:optional true} [::sm/one-of flex-direction-types]] + [:layout-gap {:optional true} + [:map + [:row-gap {:optional true} ::sm/safe-number] + [:column-gap {:optional true} ::sm/safe-number]]] + [:layout-gap-type {:optional true} [::sm/one-of gap-types]] + [:layout-wrap-type {:optional true} [::sm/one-of wrap-types]] + [:layout-padding-type {:optional true} [::sm/one-of padding-type]] + [:layout-padding {:optional true} + [:map + [:p1 ::sm/safe-number] + [:p2 ::sm/safe-number] + [:p3 ::sm/safe-number] + [:p4 ::sm/safe-number]]] + [:layout-justify-content {:optional true} [::sm/one-of justify-content-types]] + [:layout-justify-items {:optional true} [::sm/one-of justify-items-types]] + [:layout-align-content {:optional true} [::sm/one-of align-content-types]] + [:layout-align-items {:optional true} [::sm/one-of align-items-types]] + [:layout-grid-dir {:optional true} [::sm/one-of grid-direction-types]] + [:layout-grid-rows {:optional true} + [:vector {:gen/max 2} schema:grid-track]] + [:layout-grid-columns {:optional true} + [:vector {:gen/max 2} schema:grid-track]] + [:layout-grid-cells {:optional true} + [:map-of {:gen/max 5} ::sm/uuid schema:grid-cell]]]) + +(def ^:private check-grid-track + (sm/check-fn schema:grid-track)) + +(def layout-attrs + (sm/keys schema:layout-attrs)) ;; LAYOUT CHILDREN @@ -168,7 +154,7 @@ (def item-align-self-types #{:start :end :center :stretch}) -(def schema:layout-attrs +(def schema:layout-child-attrs [:map {:title "LayoutChildAttrs"} [:layout-item-margin-type {:optional true} [::sm/one-of item-margin-types]] [:layout-item-margin {:optional true} @@ -187,6 +173,9 @@ [:layout-item-absolute {:optional true} :boolean] [:layout-item-z-index {:optional true} ::sm/safe-number]]) +(def layout-child-attrs + (sm/keys schema:layout-child-attrs)) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; SCHEMAS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -194,8 +183,6 @@ (def valid-layouts #{:flex :grid}) -(sm/register! ::layout [::sm/one-of valid-layouts]) - (defn flex-layout? ([objects id] (flex-layout? (get objects id))) @@ -754,9 +741,7 @@ ([type parent value] (add-grid-track type parent value nil)) ([type parent value index] - (dm/assert! - "expected a valid grid definition for `value`" - (check-grid-track! value)) + (assert (check-grid-track value)) (let [[tracks-prop tracks-prop-other prop prop-other prop-span prop-span-other] (if (= type :column) From 34d6e86e42becf1fb81f6e421da105b841f88d8d Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 16 Jun 2025 12:50:10 +0200 Subject: [PATCH 4/4] :bug: Fix incorrect theem selection on export progress bar color --- CHANGES.md | 1 + frontend/src/app/main/ui/exports/assets.cljs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 512173f424..31e97a26e0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -50,6 +50,7 @@ on-premises instances** that want to keep up to date. - Fix font size input not displaying "mixed" when multiple texts are selected [Taiga #11177](https://tree.taiga.io/project/penpot/issue/11177) - Misalignments at Create account [Taiga #11315](https://tree.taiga.io/project/penpot/issue/11315) - Fix issue with importing files where flex/grid is used [Taiga #11334](https://tree.taiga.io/project/penpot/issue/11334) +- Fix wrong color in the export progress bar [Taiga #11299](https://tree.taiga.io/project/penpot/issue/11299) ## 2.7.2 diff --git a/frontend/src/app/main/ui/exports/assets.cljs b/frontend/src/app/main/ui/exports/assets.cljs index 633bceed7d..4544fc171a 100644 --- a/frontend/src/app/main/ui/exports/assets.cljs +++ b/frontend/src/app/main/ui/exports/assets.cljs @@ -21,6 +21,7 @@ [app.util.dom :as dom] [app.util.i18n :as i18n :refer [tr c]] [app.util.strings :as ust] + [app.util.theme :as theme] [cuerdas.core :as str] [rumext.v2 :as mf])) @@ -208,8 +209,8 @@ [] (let [state (mf/deref refs/export) profile (mf/deref refs/profile) - theme (or (:theme profile) "default") - is-default-theme? (= "default" theme) + theme (or (:theme profile) theme/default) + is-default-theme? (= theme/default theme) error? (:error state) healthy? (:healthy? state) detail-visible? (:detail-visible state)