From 09ff7372da9c2630024cecebe43f2feca3133fcc Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Thu, 6 Mar 2025 12:29:48 +0100 Subject: [PATCH 1/2] =?UTF-8?q?:bug:=20Fix=20scroll=20on=20storybook=20doc?= =?UTF-8?q?=20files=C3=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 3 ++- .../resources/styles/common/dependencies/storybook.scss | 9 +++++++++ frontend/resources/styles/main-default.scss | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 frontend/resources/styles/common/dependencies/storybook.scss diff --git a/CHANGES.md b/CHANGES.md index f6316a330b..42366717db 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,8 +12,9 @@ ### :bug: Bugs fixed +- Fix scroll on storybook docs [taiga #9962](https://tree.taiga.io/project/penpot/issue/9962) - Navigate tracking event firing multiple times [Taiga #10415](https://tree.taiga.io/project/penpot/issue/10415) -- Fix problem with selection colors [Taiga #](https://tree.taiga.io/project/penpot/issue/10376) +- Fix problem with selection colors [Taiga #10376](https://tree.taiga.io/project/penpot/issue/10376) ## 2.5.1 diff --git a/frontend/resources/styles/common/dependencies/storybook.scss b/frontend/resources/styles/common/dependencies/storybook.scss new file mode 100644 index 0000000000..87cede4a6d --- /dev/null +++ b/frontend/resources/styles/common/dependencies/storybook.scss @@ -0,0 +1,9 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. +// +// Copyright (c) KALEIDOS INC + +.sb-show-main.sb-main-fullscreen { + overflow-y: auto; +} diff --git a/frontend/resources/styles/main-default.scss b/frontend/resources/styles/main-default.scss index dfd83571dc..341606c7ea 100644 --- a/frontend/resources/styles/main-default.scss +++ b/frontend/resources/styles/main-default.scss @@ -13,6 +13,7 @@ @import "common/dependencies/fonts"; @import "common/dependencies/animations"; @import "common/dependencies/highlight.scss"; +@import "common/dependencies/storybook.scss"; @import "common/refactor/themes.scss"; @import "common/refactor/design-tokens.scss"; From b8b3cc641ad37ad842f371e94ff121221e62ffc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marina=20L=C3=B3pez?= Date: Thu, 6 Mar 2025 11:23:53 +0100 Subject: [PATCH 2/2] :tada: Consolidate when workspace empty, board tool selected --- CHANGES.md | 1 + frontend/playwright/ui/pages/WorkspacePage.js | 1 + frontend/playwright/ui/specs/colorpicker.spec.js | 2 ++ frontend/playwright/ui/specs/workspace.spec.js | 1 + frontend/src/app/main/data/workspace.cljs | 3 +-- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f6316a330b..f2136fc72d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,7 @@ ### :heart: Community contributions (Thank you!) ### :sparkles: New features +- When the workspace is empty, set default the board creation tool [Taiga #9425](https://tree.taiga.io/project/penpot/us/9425) ### :bug: Bugs fixed diff --git a/frontend/playwright/ui/pages/WorkspacePage.js b/frontend/playwright/ui/pages/WorkspacePage.js index f905cf8b4d..f3398279fd 100644 --- a/frontend/playwright/ui/pages/WorkspacePage.js +++ b/frontend/playwright/ui/pages/WorkspacePage.js @@ -70,6 +70,7 @@ export class WorkspacePage extends BaseWebSocketPage { ); this.toolbarOptions = page.getByTestId("toolbar-options"); this.rectShapeButton = page.getByRole("button", { name: "Rectangle (R)" }); + this.moveButton = page.getByRole("button", { name: "Move (V)" }); this.boardButton = page.getByRole("button", { name: "Board (B)" }); this.toggleToolbarButton = page.getByRole("button", { name: "Toggle toolbar", diff --git a/frontend/playwright/ui/specs/colorpicker.spec.js b/frontend/playwright/ui/specs/colorpicker.spec.js index b5d9765ffb..d0356995d0 100644 --- a/frontend/playwright/ui/specs/colorpicker.spec.js +++ b/frontend/playwright/ui/specs/colorpicker.spec.js @@ -13,6 +13,7 @@ test("Bug 7549 - User clicks on color swatch to display the color picker next to await workspacePage.setupEmptyFile(page); await workspacePage.goToWorkspace(); + await workspacePage.moveButton.click(); const swatch = workspacePage.page.getByRole("button", { name: "E8E9EA" }); const swatchBox = await swatch.boundingBox(); await swatch.click(); @@ -171,6 +172,7 @@ test("Bug 9900 - Color picker has no inputs for HSV values", async ({ await workspacePage.setupEmptyFile(page); await workspacePage.goToWorkspace(); + await workspacePage.moveButton.click(); const swatch = workspacePage.page.getByRole("button", { name: "E8E9EA" }); await swatch.click(); diff --git a/frontend/playwright/ui/specs/workspace.spec.js b/frontend/playwright/ui/specs/workspace.spec.js index f1f876d1e3..676b2b8424 100644 --- a/frontend/playwright/ui/specs/workspace.spec.js +++ b/frontend/playwright/ui/specs/workspace.spec.js @@ -178,6 +178,7 @@ test("Bug 10179 - Drag & drop doesn't add colors to the Recent Colors palette", const workspacePage = new WorkspacePage(page); await workspacePage.setupEmptyFile(); await workspacePage.goToWorkspace(); + await workspacePage.moveButton.click(); await workspacePage.page.keyboard.press("Alt+p"); diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index 5f73315712..168e305c1a 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -478,8 +478,7 @@ (rx/of (initialize-page* file-id page-id page) (dwth/watch-state-changes file-id page-id) (dwl/watch-component-changes) - (when (cf/external-feature-flag "boards-02" "test") - (select-frame-tool file-id page-id))) + (select-frame-tool file-id page-id)) (rx/of (dcm/go-to-workspace :file-id file-id ::rt/replace true)))))) (defn finalize-page