From c752e194d66b3c237280a2880dc9136dc9ed3670 Mon Sep 17 00:00:00 2001 From: Alonso Torres Date: Thu, 14 May 2026 11:11:01 +0200 Subject: [PATCH 1/2] :bug: Fix problem with preview version in svg render (#9626) --- .../main/ui/ds/notifications/actionable.cljs | 2 ++ .../src/app/main/ui/workspace/shapes.cljs | 26 +++++++++++-------- .../src/app/main/ui/workspace/viewport.cljs | 4 ++- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/frontend/src/app/main/ui/ds/notifications/actionable.cljs b/frontend/src/app/main/ui/ds/notifications/actionable.cljs index f97ef075e0..c14370d121 100644 --- a/frontend/src/app/main/ui/ds/notifications/actionable.cljs +++ b/frontend/src/app/main/ui/ds/notifications/actionable.cljs @@ -34,12 +34,14 @@ on-accept (mf/use-fn + (mf/deps on-accept) (fn [e] (when (fn? on-accept) (on-accept e)))) on-cancel (mf/use-fn + (mf/deps on-cancel) (fn [e] (when on-cancel (on-cancel e))))] diff --git a/frontend/src/app/main/ui/workspace/shapes.cljs b/frontend/src/app/main/ui/workspace/shapes.cljs index d1889e620e..06f3731c5e 100644 --- a/frontend/src/app/main/ui/workspace/shapes.cljs +++ b/frontend/src/app/main/ui/workspace/shapes.cljs @@ -60,10 +60,11 @@ {::mf/wrap [mf/memo] ::mf/wrap-props false} [props] - (let [objects (obj/get props "objects") - active-frames (obj/get props "active-frames") - shapes (cfh/get-immediate-children objects) - vbox (mf/use-ctx ctx/current-vbox) + (let [objects (obj/get props "objects") + active-frames (obj/get props "active-frames") + disable-thumbnails (obj/get props "disable-thumbnails") + shapes (cfh/get-immediate-children objects) + vbox (mf/use-ctx ctx/current-vbox) frame-overlap? (mf/with-memo [vbox objects] #(make-is-frame-overlap vbox objects)) @@ -84,13 +85,16 @@ [:g.frame-children (for [shape shapes] - [:g.ws-shape-wrapper {:key (dm/str (dm/get-prop shape :id))} - (if ^boolean (cfh/frame-shape? shape) - [:& root-frame-wrapper - {:shape shape - :objects objects - :thumbnail? (not (contains? active-frames (dm/get-prop shape :id)))}] - [:& shape-wrapper {:shape shape}])])]]])) + (let [thumbnail? + (and (not disable-thumbnails) + (contains? active-frames (dm/get-prop shape :id)))] + [:g.ws-shape-wrapper {:key (dm/str (dm/get-prop shape :id))} + (if ^boolean (cfh/frame-shape? shape) + [:& root-frame-wrapper + {:shape shape + :objects objects + :thumbnail? thumbnail?}] + [:& shape-wrapper {:shape shape}])]))]]])) (mf/defc shape-wrapper {::mf/wrap [#(mf/memo' % common/check-shape-props)] diff --git a/frontend/src/app/main/ui/workspace/viewport.cljs b/frontend/src/app/main/ui/workspace/viewport.cljs index 9cd8c4ef6e..75cfbf4444 100644 --- a/frontend/src/app/main/ui/workspace/viewport.cljs +++ b/frontend/src/app/main/ui/workspace/viewport.cljs @@ -410,7 +410,9 @@ ;; Render root shape [:& shapes/root-shape {:key (str page-id) :objects base-objects - :active-frames @active-frames}]]]] + :active-frames @active-frames + ;; disable thumbnails when previewing a version + :disable-thumbnails (some? preview-id)}]]]] [:svg.viewport-controls {:xmlns "http://www.w3.org/2000/svg" From 8b060960193daed8f4c587e5828645b65eb0f2d5 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 14 May 2026 11:40:33 +0200 Subject: [PATCH 2/2] :bug: Fix playwright version inconsistencies --- frontend/package.json | 2 +- frontend/pnpm-lock.yaml | 30 ++++++------------------------ 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index d391219f87..921e0ff02f 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -56,7 +56,7 @@ "@penpot/text-editor": "workspace:./text-editor", "@penpot/tokenscript": "workspace:./packages/tokenscript", "@penpot/ui": "workspace:./packages/ui", - "@playwright/test": "1.59.1", + "@playwright/test": "1.60.0", "@storybook/addon-docs": "10.3.5", "@storybook/addon-themes": "10.3.5", "@storybook/addon-vitest": "10.3.5", diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 9e735488b9..04852ba1b0 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -35,8 +35,8 @@ importers: specifier: workspace:./packages/ui version: link:packages/ui '@playwright/test': - specifier: 1.59.1 - version: 1.59.1 + specifier: 1.60.0 + version: 1.60.0 '@storybook/addon-docs': specifier: 10.3.5 version: 10.3.5(@types/react@19.2.14)(esbuild@0.28.0)(rollup@4.57.1)(storybook@10.3.5(@testing-library/dom@10.4.1)(prettier@3.8.1)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(sass-embedded@1.99.0)(sass@1.99.0)(yaml@2.8.2)) @@ -1679,8 +1679,8 @@ packages: engines: {node: '>=18'} hasBin: true - '@playwright/test@1.59.1': - resolution: {integrity: sha512-PG6q63nQg5c9rIi4/Z5lR5IVF7yU5MqmKaPOe0HSc0O2cX1fPi96sUQu5j7eo4gKCkB2AnNGoWt7y4/Xx3Kcqg==} + '@playwright/test@1.60.0': + resolution: {integrity: sha512-O71yZIbAh/PxDMNGns37GHBIfrVkEVyn+AXyIa5dOTfb4/xNvRWV+Vv/NMbNCtODB/pO7vLlF2OTmMVLhmr7Ag==} engines: {node: '>=18'} hasBin: true @@ -4918,11 +4918,6 @@ packages: engines: {node: '>=18'} hasBin: true - playwright-core@1.59.1: - resolution: {integrity: sha512-HBV/RJg81z5BiiZ9yPzIiClYV/QMsDCKUyogwH9p3MCP6IYjUFu/MActgYAvK0oWyV9NlwM3GLBjADyWgydVyg==} - engines: {node: '>=18'} - hasBin: true - playwright-core@1.60.0: resolution: {integrity: sha512-9bW6zvX/m0lEbgTKJ6YppOKx8H3VOPBMOCFh2irXFOT4BbHgrx5hPjwJYLT40Lu+4qtD36qKc/Hn56StUW57IA==} engines: {node: '>=18'} @@ -4933,11 +4928,6 @@ packages: engines: {node: '>=18'} hasBin: true - playwright@1.59.1: - resolution: {integrity: sha512-C8oWjPR3F81yljW9o5OxcWzfh6avkVwDD2VYdwIGqTkl+OGFISgypqzfu7dOe4QNLL2aqcWBmI3PMtLIK233lw==} - engines: {node: '>=18'} - hasBin: true - playwright@1.60.0: resolution: {integrity: sha512-hheHdokM8cdqCb0lcE3s+zT4t4W+vvjpGxsZlDnikarzx8tSzMebh3UiFtgqwFwnTnjYQcsyMF8ei2mCO/tpeA==} engines: {node: '>=18'} @@ -7486,9 +7476,9 @@ snapshots: dependencies: playwright: 1.58.0 - '@playwright/test@1.59.1': + '@playwright/test@1.60.0': dependencies: - playwright: 1.59.1 + playwright: 1.60.0 '@polka/url@1.0.0-next.29': {} @@ -11033,8 +11023,6 @@ snapshots: playwright-core@1.58.0: {} - playwright-core@1.59.1: {} - playwright-core@1.60.0: {} playwright@1.58.0: @@ -11043,12 +11031,6 @@ snapshots: optionalDependencies: fsevents: 2.3.2 - playwright@1.59.1: - dependencies: - playwright-core: 1.59.1 - optionalDependencies: - fsevents: 2.3.2 - playwright@1.60.0: dependencies: playwright-core: 1.60.0