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

This commit is contained in:
Andrey Antukh
2025-09-17 13:46:49 +02:00
11 changed files with 27 additions and 80 deletions

View File

@@ -21,6 +21,8 @@
### :rocket: Epics and highlights
- Variants
### :boom: Breaking changes & Deprecations
### :heart: Community contributions (Thank you!)
@@ -38,6 +40,18 @@
- New font weight token [Taiga #10939](https://tree.taiga.io/project/penpot/us/10939)
- Upgrade Node to v22.18.0 [Github #7283](https://github.com/penpot/penpot/pull/7283)
- Upgrade the base docker image for penpot frontend to v1.29.1 [Github #7283](https://github.com/penpot/penpot/pull/7283)
- Create variant from an existing component [Taiga #2088](https://tree.taiga.io/project/penpot/us/2088)
- Create variant from an existing variant [Taiga #8282](https://tree.taiga.io/project/penpot/us/8282)
- Actions over a component with variants [Taiga #10503](https://tree.taiga.io/project/penpot/us/10503)
- Create a variant by dragging a component into a component with variants [Taiga #8134](https://tree.taiga.io/project/penpot/us/8134)
- Transform a variant into an individual component [Taiga #8141](https://tree.taiga.io/project/penpot/us/8141)
- Delete variant [Taiga #6890](https://tree.taiga.io/project/penpot/us/6890)
- Restore an orphaned copy of a variant [Taiga #10446](https://tree.taiga.io/project/penpot/us/10446)
- Add, Edit & Delete variant properties name and value [Taiga #6892](https://tree.taiga.io/project/penpot/us/6892)
- Retrieve variants [Taiga #6888](https://tree.taiga.io/project/penpot/us/6888)
- Retrieve variants with nested components [Taiga #10277](https://tree.taiga.io/project/penpot/us/10277)
- Create variants in bulk from existing components [Taiga #7926](https://tree.taiga.io/project/penpot/us/7926)
- Alternative ways of creating variants - Button Design Tab [Taiga #10316](https://tree.taiga.io/project/penpot/us/10316)
### :bug: Bugs fixed
@@ -63,6 +77,7 @@
- Fix incorrect date displayed for support plan [Taiga #11986](https://tree.taiga.io/project/penpot/issue/11986)
- Fix can't import 'borderWidth' type token [#132](https://github.com/tokens-studio/penpot/issues/132)
- Fix moving elements up or down while pressing alt [Taiga Issue #11992](https://tree.taiga.io/project/penpot/issue/11992)
- Fix conflicting shortcuts (remove dec/inc line height and letter spacing) [Taiga #12102](https://tree.taiga.io/project/penpot/issue/12102)
## 2.9.0

View File

@@ -446,8 +446,8 @@
{:name "0140-add-locked-by-column-to-file-change-table"
:fn (mg/resource "app/migrations/sql/0140-add-locked-by-column-to-file-change-table.sql")}
{:name "0141-add-idx-to-file_library_rel"
:fn (mg/resource "app/migrations/sql/0141-add-idx-to-file_library_rel.sql")}])
{:name "0141-add-idx-to-file-library-rel"
:fn (mg/resource "app/migrations/sql/0141-add-idx-to-file-library-rel.sql")}])
(defn apply-migrations!
[pool name migrations]

View File

@@ -0,0 +1,2 @@
CREATE INDEX IF NOT EXISTS file_library_rel__library_file_id__idx
ON file_library_rel (library_file_id);

View File

@@ -1,2 +0,0 @@
CREATE INDEX file_library_rel__library_file_id__idx
ON file_library_rel (library_file_id);

View File

@@ -139,21 +139,11 @@
(defn- update-attrs [shape props]
(let [text-values (calculate-text-values shape)
font-size (d/parse-double (:font-size text-values))
line-height (d/parse-double (:line-height text-values))
letter-spacing (d/parse-double (:letter-spacing text-values))
props (cond
(:font-size-inc props)
{:font-size (str (inc font-size))}
(:font-size-dec props)
{:font-size (str (dec font-size))}
(:line-height-inc props)
{:line-height (str (+ line-height 0.1))}
(:line-height-dec props)
{:line-height (str (- line-height 0.1))}
(:letter-spacing-inc props)
{:letter-spacing (str (+ letter-spacing 0.1))}
(:letter-spacing-dec props)
{:letter-spacing (str (- letter-spacing 0.1))}
(= (:text-decoration props) "toggle-underline") ;;toggle
(if (= (:text-decoration text-values) "underline")
{:text-decoration "none"}
@@ -268,26 +258,6 @@
:subsections [:text-editor]
:fn #(update-attrs-when-no-readonly {:font-size-dec true})}
:line-height-inc {:tooltip (ds/alt-shift ds/up-arrow)
:command (ds/a-mod "shift+up")
:subsections [:text-editor]
:fn #(update-attrs-when-no-readonly {:line-height-inc true})}
:line-height-dec {:tooltip (ds/alt-shift ds/down-arrow)
:command (ds/a-mod "shift+down")
:subsections [:text-editor]
:fn #(update-attrs-when-no-readonly {:line-height-dec true})}
:letter-spacing-inc {:tooltip (ds/alt ds/up-arrow)
:command (ds/a-mod "up")
:subsections [:text-editor]
:fn #(update-attrs-when-no-readonly {:letter-spacing-inc true})}
:letter-spacing-dec {:tooltip (ds/alt ds/down-arrow)
:command (ds/a-mod "down")
:subsections [:text-editor]
:fn #(update-attrs-when-no-readonly {:letter-spacing-dec true})}
:bold {:tooltip (ds/meta "b")
:command (ds/c-mod "b")
:subsections [:text-editor]

View File

@@ -277,11 +277,11 @@
(dwu/commit-undo-transaction undo-id))))))
(defn- focus-property
[shape-id prop-num]
[variant-id]
(ptk/reify ::focus-property
ptk/EffectEvent
(effect [_ _ _]
(dom/focus! (dom/get-element (str "variant-prop-" shape-id prop-num))))))
(dom/focus! (dom/get-element (str "variant-prop-" variant-id "-0"))))))
(defn- resposition-and-resize-variant
"Resize the variant container, and move the shape (that is a variant) to the right"
@@ -347,7 +347,7 @@
(if multiselect?
(dws/shift-select-shapes new-shape-id)
(dws/select-shape new-shape-id)))
(->> (rx/of (focus-property new-shape-id prop-num))
(->> (rx/of (focus-property (:id variant-container)))
(rx/delay 250))))))))
(defn transform-in-variant

View File

@@ -9,6 +9,7 @@
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.files.variant :as cfv]
[app.common.types.components-list :as ctkl]
[app.common.types.file :as ctf]
[app.common.types.library :as ctl]
@@ -59,7 +60,8 @@
(let [colors (count (:colors data))
graphics 0
typographies (count (:typographies data))
components (count (ctkl/components-seq data))
components (count (->> (ctkl/components-seq data)
(remove #(cfv/is-secondary-variant? % data))))
empty? (and (zero? components)
(zero? graphics)
(zero? colors)

View File

@@ -126,10 +126,6 @@
(tr "shortcuts.insert-image")
(tr "shortcuts.italic")
(tr "shortcuts.join-nodes")
(tr "shortcuts.letter-spacing-dec")
(tr "shortcuts.letter-spacing-inc")
(tr "shortcuts.line-height-dec")
(tr "shortcuts.line-height-inc")
(tr "shortcuts.line-through")
(tr "shortcuts.make-corner")
(tr "shortcuts.make-curve")

View File

@@ -4081,22 +4081,6 @@ msgstr "Toggle italic"
msgid "shortcuts.join-nodes"
msgstr "Join nodes"
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:127
msgid "shortcuts.letter-spacing-dec"
msgstr "Decrement letter spacing"
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:128
msgid "shortcuts.letter-spacing-inc"
msgstr "Increment letter spacing"
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:129
msgid "shortcuts.line-height-dec"
msgstr "Decrement line height"
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:130
msgid "shortcuts.line-height-inc"
msgstr "Increment line height"
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:131
msgid "shortcuts.line-through"
msgstr "Toggle line through"
@@ -7496,7 +7480,7 @@ msgstr ""
#: src/app/main/ui/workspace/tokens/management/create/form.cljs:877, src/app/main/ui/workspace/tokens/management/create/form.cljs:889
msgid "workspace.tokens.font-weight-value-enter"
msgstr "Enter: 400, Bold, 700 Italic, or {alias}"
msgstr "Enter a value (300, Bold, Regular Italic...) or an {alias}"
#: src/app/main/ui/workspace/tokens/management/context_menu.cljs:229
msgid "workspace.tokens.gaps"

View File

@@ -4088,22 +4088,6 @@ msgstr "Alternar cursiva"
msgid "shortcuts.join-nodes"
msgstr "Unir nodos"
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:127
msgid "shortcuts.letter-spacing-dec"
msgstr "Decrementar el espaciado de letras"
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:128
msgid "shortcuts.letter-spacing-inc"
msgstr "Incrementar el espaciado de letras"
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:129
msgid "shortcuts.line-height-dec"
msgstr "Decrementar el interlineado"
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:130
msgid "shortcuts.line-height-inc"
msgstr "Incrementar el interlineado"
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:131
msgid "shortcuts.line-through"
msgstr "Alternar tachado"
@@ -7471,7 +7455,7 @@ msgstr ""
#: src/app/main/ui/workspace/tokens/management/create/form.cljs:877, src/app/main/ui/workspace/tokens/management/create/form.cljs:889
msgid "workspace.tokens.font-weight-value-enter"
msgstr "Introduce: 400, Bold, 700 Italic, o {alias}"
msgstr "Introduce un valor (300, Bold, Regular Italic...) o un {alias}"
#: src/app/main/ui/workspace/tokens/style_dictionary.cljs
#, unused

View File

@@ -7299,10 +7299,6 @@ msgstr "Voorbeeld:"
msgid "workspace.tokens.export.single-file"
msgstr "Enkel bestand"
#: src/app/main/ui/workspace/tokens/management/create/form.cljs:877, src/app/main/ui/workspace/tokens/management/create/form.cljs:889
msgid "workspace.tokens.font-weight-value-enter"
msgstr "Voer in: 400, Bold, 700 Italic, of {alias}"
#: src/app/main/ui/workspace/tokens/management/context_menu.cljs:229
msgid "workspace.tokens.gaps"
msgstr "Tussenruimtes"