0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-20 13:42:59 -05:00

🐛 Fix group blur toggle button icon not updating

This commit is contained in:
Belén Albeza 2025-01-10 12:14:22 +01:00
parent d500058aa9
commit a71fdd091a
5 changed files with 359 additions and 1 deletions

View file

@ -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
}
}
}

View file

@ -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"
}
}

View file

@ -0,0 +1 @@
{"~:revn":31,"~:lagged":[]}

View file

@ -143,3 +143,32 @@ test("BUG 7760 - Layout losing properties when changing parents", async ({
await expect(vAuto.locator("input")).toBeChecked(); await expect(vAuto.locator("input")).toBeChecked();
await expect(hAuto.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");
});

View file

@ -183,7 +183,7 @@
[v] [v]
(mapv #(select-keys % shadow-keys) v)) (mapv #(select-keys % shadow-keys) v))
(def blur-keys [:type :value]) (def blur-keys [:type :value :hidden])
(defn blur-eq (defn blur-eq
"Checks if two blurs are equivalent for the multiple selection" "Checks if two blurs are equivalent for the multiple selection"