From 6c59d633cd21a3671542df605bea86caad440824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Mon, 8 Sep 2025 18:25:23 +0200 Subject: [PATCH 1/5] :whale: Update the version of node and nginx-unprivileged --- CHANGES.md | 2 ++ docker/images/Dockerfile.backend | 2 +- docker/images/Dockerfile.exporter | 2 +- docker/images/Dockerfile.frontend | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b63144e782..3eaf1ac98d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,8 @@ - New text-decoration token [Taiga #10941](https://tree.taiga.io/project/penpot/us/10941) - New letter spacing token [Taiga #10940](https://tree.taiga.io/project/penpot/us/10940) - 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) ### :bug: Bugs fixed diff --git a/docker/images/Dockerfile.backend b/docker/images/Dockerfile.backend index 3535cffd0c..2ea46d58ee 100644 --- a/docker/images/Dockerfile.backend +++ b/docker/images/Dockerfile.backend @@ -5,7 +5,7 @@ ENV LANG='C.UTF-8' \ LC_ALL='C.UTF-8' \ JAVA_HOME="/opt/jdk" \ DEBIAN_FRONTEND=noninteractive \ - NODE_VERSION=v22.16.0 \ + NODE_VERSION=v22.18.0 \ TZ=Etc/UTC RUN set -ex; \ diff --git a/docker/images/Dockerfile.exporter b/docker/images/Dockerfile.exporter index 43167cf2db..d8acf70cf7 100644 --- a/docker/images/Dockerfile.exporter +++ b/docker/images/Dockerfile.exporter @@ -3,7 +3,7 @@ LABEL maintainer="Penpot " ENV LANG=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 \ - NODE_VERSION=v22.16.0 \ + NODE_VERSION=v22.18.0 \ DEBIAN_FRONTEND=noninteractive \ PATH=/opt/node/bin:$PATH diff --git a/docker/images/Dockerfile.frontend b/docker/images/Dockerfile.frontend index 0b3b93a127..e6e5e0fadb 100644 --- a/docker/images/Dockerfile.frontend +++ b/docker/images/Dockerfile.frontend @@ -1,4 +1,4 @@ -FROM nginxinc/nginx-unprivileged:1.28.0 +FROM nginxinc/nginx-unprivileged:1.29.1 LABEL maintainer="Penpot " USER root From a403af7ebd93b5b67e262bdcb180fff22260907c Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Mon, 8 Sep 2025 09:42:37 +0200 Subject: [PATCH 2/5] :bug: Fix plugin installation link --- common/src/app/common/types/plugins.cljc | 2 +- frontend/src/app/plugins/register.cljs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/app/common/types/plugins.cljc b/common/src/app/common/types/plugins.cljc index b582da3583..e2188d3585 100644 --- a/common/src/app/common/types/plugins.cljc +++ b/common/src/app/common/types/plugins.cljc @@ -27,7 +27,7 @@ schema:string schema:string]]) -(def ^:private schema:registry-entry +(def schema:registry-entry [:map [:plugin-id :string] [:name :string] diff --git a/frontend/src/app/plugins/register.cljs b/frontend/src/app/plugins/register.cljs index c7865eb6cc..aba49133d8 100644 --- a/frontend/src/app/plugins/register.cljs +++ b/frontend/src/app/plugins/register.cljs @@ -71,9 +71,9 @@ :code code :icon icon :permissions (into #{} (map str) permissions)})] - (if (sm/validate ::ctp/registry-entry manifest) + (if (sm/validate ctp/schema:registry-entry manifest) manifest - (.error js/console (clj->js (sm/explain ::ctp/registry-entry manifest)))))) + (.error js/console (clj->js (sm/explain ctp/schema:registry-entry manifest)))))) (defn save-to-store [] From ff96f7be8552d97acc4fc31d3fb1447e5d1024be Mon Sep 17 00:00:00 2001 From: Aitor Moreno Date: Wed, 3 Sep 2025 17:49:28 +0200 Subject: [PATCH 3/5] :bug: Fix moving elements up or down while pressing alt --- CHANGES.md | 1 + frontend/src/app/main/data/workspace/shortcuts.cljs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b63144e782..c6380b2fe4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -43,6 +43,7 @@ - Layout item tokens should be unapplied when moving out of a layout [Taiga #11012](https://tree.taiga.io/project/penpot/issue/11012) - 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) ## 2.9.0 diff --git a/frontend/src/app/main/data/workspace/shortcuts.cljs b/frontend/src/app/main/data/workspace/shortcuts.cljs index de041ba2ee..c1741df475 100644 --- a/frontend/src/app/main/data/workspace/shortcuts.cljs +++ b/frontend/src/app/main/data/workspace/shortcuts.cljs @@ -233,12 +233,12 @@ :fn #(emit-when-no-readonly (dwt/move-selected :left true))} :move-unit-up {:tooltip ds/up-arrow - :command ["up"] + :command ["up" "alt+up"] :subsections [:modify-layers] :fn #(emit-when-no-readonly (dwt/move-selected :up false))} :move-unit-down {:tooltip ds/down-arrow - :command ["down"] + :command ["down" "alt+down"] :subsections [:modify-layers] :fn #(emit-when-no-readonly (dwt/move-selected :down false))} From 1a4594a6153fe2038ba6f4da5fe7accc31759d71 Mon Sep 17 00:00:00 2001 From: Aitor Moreno Date: Tue, 9 Sep 2025 10:41:55 +0200 Subject: [PATCH 4/5] :bug: Fix text editor v1 paste HTML --- .../src/editor/content/dom/Content.js | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/frontend/text-editor/src/editor/content/dom/Content.js b/frontend/text-editor/src/editor/content/dom/Content.js index 8b3f1e8e69..aa550e9724 100644 --- a/frontend/text-editor/src/editor/content/dom/Content.js +++ b/frontend/text-editor/src/editor/content/dom/Content.js @@ -14,6 +14,11 @@ import { } from "./Paragraph.js"; import { isDisplayBlock, normalizeStyles } from "./Style.js"; +const DEFAULT_FONT_SIZE = "14px"; +const DEFAULT_FONT_WEIGHT = 400; +const DEFAULT_FONT_FAMILY = "sourcesanspro"; +const DEFAULT_FILLS = '[["^ ","~:fill-color", "#000000","~:fill-opacity", 1]]'; + /** * Returns if the content fragment should be treated as * inline content and not a paragraphed one. @@ -72,11 +77,26 @@ export function mapContentFragmentFromDocument(document, root, styleDefaults) { } const inline = createInline(new Text(currentNode.nodeValue), currentStyle); const fontSize = inline.style.getPropertyValue("font-size"); - if (!fontSize) console.warn("font-size", fontSize); + if (!fontSize) { + console.warn("font-size", fontSize); + inline.style.setProperty("font-size", styleDefaults?.getPropertyValue("font-size") ?? DEFAULT_FONT_SIZE); + } const fontFamily = inline.style.getPropertyValue("font-family"); - if (!fontFamily) console.warn("font-family", fontFamily); + if (!fontFamily) { + console.warn("font-family", fontFamily); + inline.style.setProperty("font-family", styleDefaults?.getPropertyValue("font-family") ?? DEFAULT_FONT_FAMILY); + } const fontWeight = inline.style.getPropertyValue("font-weight"); - if (!fontWeight) console.warn("font-weight", fontWeight); + if (!fontWeight) { + console.warn("font-weight", fontWeight); + inline.style.setProperty("font-weight", styleDefaults?.getPropertyValue("font-weight") ?? DEFAULT_FONT_WEIGHT) + } + const fills = inline.style.getPropertyValue('--fills'); + if (!fills) { + console.warn("fills", fills); + inline.style.setProperty("--fills", styleDefaults?.getPropertyValue("--fills") ?? DEFAULT_FILLS); + } + currentParagraph.appendChild(inline); currentNode = nodeIterator.nextNode(); From f22eef5bf60bb54d7877602d208a10f2a304fa7b Mon Sep 17 00:00:00 2001 From: Luis de Dios Date: Tue, 9 Sep 2025 15:59:04 +0200 Subject: [PATCH 5/5] :bug: Fix create a variant using the contextual menu --- frontend/src/app/main/ui/workspace/context_menu.cljs | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/app/main/ui/workspace/context_menu.cljs b/frontend/src/app/main/ui/workspace/context_menu.cljs index c56291be03..87d8a50dd9 100644 --- a/frontend/src/app/main/ui/workspace/context_menu.cljs +++ b/frontend/src/app/main/ui/workspace/context_menu.cljs @@ -568,7 +568,6 @@ [{:keys [shapes]}] (let [single? (= (count shapes) 1) objects (deref refs/workspace-page-objects) - shapes (keep (d/getf objects) shapes) can-make-component (every? true? (map #(ctn/valid-shape-for-component? objects %) shapes)) heads (filter ctk/instance-head? shapes) components-menu-entries (cmm/generate-components-menu-entries heads)