diff --git a/frontend/playwright/data/design/get-file-9061.json b/frontend/playwright/data/design/get-file-9061.json new file mode 100644 index 000000000..0966d38ab --- /dev/null +++ b/frontend/playwright/data/design/get-file-9061.json @@ -0,0 +1,49 @@ +{ + "~:features": { + "~#set": [ + "layout/grid", + "fdata/pointer-map", + "fdata/objects-map", + "components/v2", + "fdata/shape-data-type" + ] + }, + "~:permissions": { + "~:type": "~:membership", + "~:is-owner": true, + "~:is-admin": true, + "~:can-edit": true, + "~:can-read": true, + "~:is-logged": true + }, + "~:has-media-trimmed": false, + "~:comment-thread-seqn": 0, + "~:name": "Group Blur visibility", + "~:revn": 28, + "~:modified-at": "~m1736506184877", + "~:vern": 0, + "~:id": "~u61cfa81d-8cb2-81df-8005-8f3005841116", + "~:is-shared": false, + "~:version": 60, + "~:project-id": "~u61cfa81d-8cb2-81df-8005-8f3000c4d221", + "~:created-at": "~m1736503702035", + "~:data": { + "~:pages": [ + "~u61cfa81d-8cb2-81df-8005-8f3005841117" + ], + "~:pages-index": { + "~u61cfa81d-8cb2-81df-8005-8f3005841117": { + "~#penpot/pointer": [ + "~u61cfa81d-8cb2-81df-8005-8f397e2bd605", + { + "~:created-at": "~m1736506184879" + } + ] + } + }, + "~:id": "~u61cfa81d-8cb2-81df-8005-8f3005841116", + "~:options": { + "~:components-v2": true + } + } +} \ No newline at end of file diff --git a/frontend/playwright/data/design/get-file-fragment-9061.json b/frontend/playwright/data/design/get-file-fragment-9061.json new file mode 100644 index 000000000..26a5c1819 --- /dev/null +++ b/frontend/playwright/data/design/get-file-fragment-9061.json @@ -0,0 +1,279 @@ +{ + "~:id": "~u61cfa81d-8cb2-81df-8005-8f397e2bd605", + "~:file-id": "~u61cfa81d-8cb2-81df-8005-8f3005841116", + "~:created-at": "~m1736506184873", + "~:data": { + "~:options": {}, + "~:objects": { + "~u00000000-0000-0000-0000-000000000000": { + "~#shape": { + "~:y": 0, + "~:hide-fill-on-export": false, + "~:transform": { + "~#matrix": { + "~:a": 1.0, + "~:b": 0.0, + "~:c": 0.0, + "~:d": 1.0, + "~:e": 0.0, + "~:f": 0.0 + } + }, + "~:rotation": 0, + "~:name": "Root Frame", + "~:width": 0.01, + "~:type": "~:frame", + "~:points": [ + { + "~#point": { + "~:x": 0.0, + "~:y": 0.0 + } + }, + { + "~#point": { + "~:x": 0.01, + "~:y": 0.0 + } + }, + { + "~#point": { + "~:x": 0.01, + "~:y": 0.01 + } + }, + { + "~#point": { + "~:x": 0.0, + "~:y": 0.01 + } + } + ], + "~:r2": 0, + "~:proportion-lock": false, + "~:transform-inverse": { + "~#matrix": { + "~:a": 1.0, + "~:b": 0.0, + "~:c": 0.0, + "~:d": 1.0, + "~:e": 0.0, + "~:f": 0.0 + } + }, + "~:r3": 0, + "~:r1": 0, + "~:id": "~u00000000-0000-0000-0000-000000000000", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:strokes": [], + "~:x": 0, + "~:proportion": 1.0, + "~:r4": 0, + "~:selrect": { + "~#rect": { + "~:x": 0, + "~:y": 0, + "~:width": 0.01, + "~:height": 0.01, + "~:x1": 0, + "~:y1": 0, + "~:x2": 0.01, + "~:y2": 0.01 + } + }, + "~:fills": [ + { + "~:fill-color": "#FFFFFF", + "~:fill-opacity": 1 + } + ], + "~:flip-x": null, + "~:height": 0.01, + "~:flip-y": null, + "~:shapes": [ + "~u61bd7d91-7b08-806d-8005-8f3972d9957f" + ] + } + }, + "~u61bd7d91-7b08-806d-8005-8f3970eb2e42": { + "~#shape": { + "~:y": 143, + "~:transform": { + "~#matrix": { + "~:a": 1.0, + "~:b": 0.0, + "~:c": 0.0, + "~:d": 1.0, + "~:e": 0.0, + "~:f": 0.0 + } + }, + "~:rotation": 0, + "~:hide-in-viewer": false, + "~:name": "Rectangle", + "~:width": 100, + "~:type": "~:rect", + "~:points": [ + { + "~#point": { + "~:x": 542, + "~:y": 143 + } + }, + { + "~#point": { + "~:x": 642, + "~:y": 143 + } + }, + { + "~#point": { + "~:x": 642, + "~:y": 243 + } + }, + { + "~#point": { + "~:x": 542, + "~:y": 243 + } + } + ], + "~:r2": 0, + "~:proportion-lock": false, + "~:transform-inverse": { + "~#matrix": { + "~:a": 1.0, + "~:b": 0.0, + "~:c": 0.0, + "~:d": 1.0, + "~:e": 0.0, + "~:f": 0.0 + } + }, + "~:r3": 0, + "~:r1": 0, + "~:id": "~u61bd7d91-7b08-806d-8005-8f3970eb2e42", + "~:parent-id": "~u61bd7d91-7b08-806d-8005-8f3972d9957f", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:strokes": [], + "~:x": 542, + "~:proportion": 1, + "~:r4": 0, + "~:selrect": { + "~#rect": { + "~:x": 542, + "~:y": 143, + "~:width": 100, + "~:height": 100, + "~:x1": 542, + "~:y1": 143, + "~:x2": 642, + "~:y2": 243 + } + }, + "~:fills": [ + { + "~:fill-color": "#B1B2B5", + "~:fill-opacity": 1 + } + ], + "~:flip-x": null, + "~:height": 100, + "~:flip-y": null + } + }, + "~u61bd7d91-7b08-806d-8005-8f3972d9957f": { + "~#shape": { + "~:y": 143, + "~:transform": { + "~#matrix": { + "~:a": 1.0, + "~:b": 0.0, + "~:c": 0.0, + "~:d": 1.0, + "~:e": 0.0, + "~:f": 0.0 + } + }, + "~:rotation": 0, + "~:index": 1, + "~:name": "Group", + "~:width": 100, + "~:type": "~:group", + "~:points": [ + { + "~#point": { + "~:x": 542, + "~:y": 143 + } + }, + { + "~#point": { + "~:x": 642, + "~:y": 143 + } + }, + { + "~#point": { + "~:x": 642, + "~:y": 243 + } + }, + { + "~#point": { + "~:x": 542, + "~:y": 243 + } + } + ], + "~:proportion-lock": false, + "~:transform-inverse": { + "~#matrix": { + "~:a": 1.0, + "~:b": 0.0, + "~:c": 0.0, + "~:d": 1.0, + "~:e": 0.0, + "~:f": 0.0 + } + }, + "~:blur": { + "~:id": "~u61bd7d91-7b08-806d-8005-8f397b37e6c9", + "~:type": "~:layer-blur", + "~:value": 4, + "~:hidden": false + }, + "~:id": "~u61bd7d91-7b08-806d-8005-8f3972d9957f", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:strokes": [], + "~:x": 542, + "~:proportion": 1, + "~:selrect": { + "~#rect": { + "~:x": 542, + "~:y": 143, + "~:width": 100, + "~:height": 100, + "~:x1": 542, + "~:y1": 143, + "~:x2": 642, + "~:y2": 243 + } + }, + "~:fills": [], + "~:flip-x": null, + "~:height": 100, + "~:flip-y": null, + "~:shapes": [ + "~u61bd7d91-7b08-806d-8005-8f3970eb2e42" + ] + } + } + }, + "~:id": "~u61cfa81d-8cb2-81df-8005-8f3005841117", + "~:name": "Page 1" + } +} \ No newline at end of file diff --git a/frontend/playwright/data/design/update-file-9061.json b/frontend/playwright/data/design/update-file-9061.json new file mode 100644 index 000000000..d37781b37 --- /dev/null +++ b/frontend/playwright/data/design/update-file-9061.json @@ -0,0 +1 @@ +{"~:revn":31,"~:lagged":[]} \ No newline at end of file diff --git a/frontend/playwright/ui/specs/design-tab.spec.js b/frontend/playwright/ui/specs/design-tab.spec.js index 3b28bb534..38b347efe 100644 --- a/frontend/playwright/ui/specs/design-tab.spec.js +++ b/frontend/playwright/ui/specs/design-tab.spec.js @@ -143,3 +143,32 @@ test("BUG 7760 - Layout losing properties when changing parents", async ({ await expect(vAuto.locator("input")).toBeChecked(); await expect(hAuto.locator("input")).toBeChecked(); }); + +test("BUG 9061 - Group blur visibility toggle icon not updating", async ({ + page, +}) => { + const workspace = new WorkspacePage(page); + await workspace.setupEmptyFile(); + await workspace.mockRPC(/get\-file\?/, "design/get-file-9061.json"); + await workspace.mockRPC( + "get-file-fragment?file-id=*&fragment-id=*", + "design/get-file-fragment-9061.json", + ); + await workspace.mockRPC("update-file?id=*", "design/update-file-9061.json"); + + await workspace.goToWorkspace({ + fileId: "61cfa81d-8cb2-81df-8005-8f3005841116", + pageId: "61cfa81d-8cb2-81df-8005-8f3005841117", + }); + + await workspace.clickLeafLayer("Group"); + + const blurButton = workspace.page.getByRole("button", { + name: "Toggle blur", + }); + const blurIcon = blurButton.locator("svg use"); + await expect(blurIcon).toHaveAttribute("href", "#icon-shown"); + + await blurButton.click(); + await expect(blurIcon).toHaveAttribute("href", "#icon-hide"); +}); diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs index af81ea652..b96c8b454 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs @@ -183,7 +183,7 @@ [v] (mapv #(select-keys % shadow-keys) v)) -(def blur-keys [:type :value]) +(def blur-keys [:type :value :hidden]) (defn blur-eq "Checks if two blurs are equivalent for the multiple selection"