🐛 Fix default path stroke thickness

This commit is contained in:
Belén Albeza 2026-05-27 14:47:11 +02:00 committed by GitHub
parent 0fe59cac94
commit 0dd40776f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 161 additions and 11 deletions

View File

@ -525,7 +525,7 @@
:fills []
:strokes [{:stroke-style :solid
:stroke-alignment :inner
:stroke-width 2
:stroke-width 1
:stroke-color clr/black
:stroke-opacity 1}]})

View File

@ -0,0 +1,133 @@
{
"~:revn": 2,
"~:lagged": [
{
"~:id": "~u7f0e4986-db88-8130-8008-1573f690be15",
"~:revn": 2,
"~:file-id": "~u7f0e4986-db88-8130-8008-1573e577911a",
"~:session-id": "~u71a5dd44-23e8-8036-8008-1573e19c6190",
"~:changes": [
{
"~:type": "~:mod-page",
"~:id": "~u7f0e4986-db88-8130-8008-1573e577911b",
"~:background": "#e8e9ea"
}
]
},
{
"~:id": "~u7f0e4986-db88-8130-8008-1573ff5a4706",
"~:revn": 3,
"~:file-id": "~u7f0e4986-db88-8130-8008-1573e577911a",
"~:session-id": "~u71a5dd44-23e8-8036-8008-1573e19c6190",
"~:changes": [
{
"~:ignore-touched": false,
"~:index": null,
"~:type": "~:add-obj",
"~:page-id": "~u7f0e4986-db88-8130-8008-1573e577911b",
"~:id": "~u71a5dd44-23e8-8036-8008-1573f8419e2f",
"~:parent-id": "~u00000000-0000-0000-0000-000000000000",
"~:frame-id": "~u00000000-0000-0000-0000-000000000000",
"~:obj": {
"~#shape": {
"~:y": null,
"~:transform": {
"~#matrix": {
"~:a": 1.0,
"~:b": 0.0,
"~:c": 0.0,
"~:d": 1.0,
"~:e": 0.0,
"~:f": 0.0
}
},
"~:rotation": 0,
"~:grow-type": "~:fixed",
"~:content": {
"~#penpot/path-data": "~bAQAAAAAAAAAAAAAAAAAAAAAAAAAAwEJEAAAjQwIAAAAAAAAAAAAAAAAAAAAAAAAAAMBtRAAAgUM="
},
"~:name": "Path",
"~:width": null,
"~:type": "~:path",
"~:points": [
{
"~#point": {
"~:x": 779,
"~:y": 163
}
},
{
"~#point": {
"~:x": 951,
"~:y": 163
}
},
{
"~#point": {
"~:x": 951,
"~:y": 258
}
},
{
"~#point": {
"~:x": 779,
"~:y": 258
}
}
],
"~:proportion-lock": false,
"~:transform-inverse": {
"~#matrix": {
"~:a": 1.0,
"~:b": 0.0,
"~:c": 0.0,
"~:d": 1.0,
"~:e": 0.0,
"~:f": 0.0
}
},
"~:id": "~u71a5dd44-23e8-8036-8008-1573f8419e2f",
"~:parent-id": "~u00000000-0000-0000-0000-000000000000",
"~:frame-id": "~u00000000-0000-0000-0000-000000000000",
"~:strokes": [
{
"~:stroke-style": "~:solid",
"~:stroke-alignment": "~:inner",
"~:stroke-width": 1,
"~:stroke-color": "#000000",
"~:stroke-opacity": 1
}
],
"~:x": null,
"~:proportion": 1,
"~:selrect": {
"~#rect": {
"~:x": 779,
"~:y": 163,
"~:width": 172,
"~:height": 95,
"~:x1": 779,
"~:y1": 163,
"~:x2": 951,
"~:y2": 258
}
},
"~:fills": [],
"~:flip-x": null,
"~:height": null,
"~:flip-y": null
}
}
},
{
"~:type": "~:mov-objects",
"~:parent-id": "~u00000000-0000-0000-0000-000000000000",
"~:page-id": "~u7f0e4986-db88-8130-8008-1573e577911b",
"~:shapes": [
"~u71a5dd44-23e8-8036-8008-1573f8419e2f"
]
}
]
}
]
}

View File

@ -1,9 +1,4 @@
[
{
"~:id": "~u088df3d4-d383-80f6-8004-527e50ea4f1f",
"~:revn": 21,
"~:file-id": "~uc7ce0794-0992-8105-8004-38f280443849",
"~:session-id": "~u1dc6d4fa-7bd3-803a-8004-527dd9df2c62",
"~:changes": []
}
]
{
"~:revn": 2,
"~:lagged": []
}

View File

@ -175,6 +175,7 @@ export class WorkspacePage extends BaseWebSocketPage {
this.textShapeButton = page.getByRole("button", { name: "Text (T)" });
this.moveButton = page.getByRole("button", { name: "Move (V)" });
this.boardButton = page.getByRole("button", { name: "Board (B)" });
this.pathButton = page.getByRole("button", { name: "Path (P)" });
this.toggleToolbarButton = page.getByRole("button", {
name: "Toggle toolbar",
});

View File

@ -532,7 +532,7 @@ test("BUG 13415 - Grid layout overlay is not removed when deleting a board", asy
await expect(workspacePage.canvas).toHaveScreenshot();
});
test("BUG 13822 - Problems with z-index", async({
test("BUG 13822 - Problems with z-index", async ({
page
}) => {
const workspacePage = new WasmWorkspacePage(page);
@ -547,3 +547,24 @@ test("BUG 13822 - Problems with z-index", async({
await workspacePage.waitForFirstRenderWithoutUI();
await expect(workspacePage.canvas).toHaveScreenshot();
});
test("BUG 14239 - Fix default path thickness", async ({
page
}) => {
const workspacePage = new WasmWorkspacePage(page);
await workspacePage.setupEmptyFile();
await workspacePage.mockRPC("update-file?id=*", "workspace/update-file-empty.json");
await workspacePage.goToWorkspace();
// (Workaround a bug in which mouse position can be nil and path editor crashes
// if we click on the Path tool without hovering over the viewport first)
await workspacePage.viewport.hover();
// 1. Draw a path
await workspacePage.pathButton.click();
await workspacePage.clickAt(779, 163);
await workspacePage.clickAt(951, 258);
// 2. Close it
await page.keyboard.press("Escape");
await expect(workspacePage.rightSidebar.getByRole("textbox", { name: "Stroke width" })).toHaveValue("1");
});