From db7c1fc7ddcbe791fc966849a6d76932d431d8d6 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 21 Nov 2024 12:33:19 +0100 Subject: [PATCH 1/2] :bug: Fix problem with some texts desynchronization --- CHANGES.md | 3 ++- frontend/src/app/main/ui/shapes/text/styles.cljs | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7c0dbac62..5afb9611d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,11 +24,12 @@ ### :sparkles: New features - Viewer role for team members [Taiga #1056 & #6590](https://tree.taiga.io/project/penpot/us/1056 & https://tree.taiga.io/project/penpot/us/6590) -- File history versions management [Taiga](https://tree.taiga.io/project/penpot/us/187?milestone=411120) +- File history versions management [Taiga #187](https://tree.taiga.io/project/penpot/us/187?milestone=411120) - Rename selected layer via keyboard shortcut and context menu option [Taiga #8882](https://tree.taiga.io/project/penpot/us/8882) ### :bug: Bugs fixed +- Fix problem with some texts desynchronization [Taiga #9379](https://tree.taiga.io/project/penpot/issue/9379) ## 2.3.3 diff --git a/frontend/src/app/main/ui/shapes/text/styles.cljs b/frontend/src/app/main/ui/shapes/text/styles.cljs index a65daafc6..67c3a0356 100644 --- a/frontend/src/app/main/ui/shapes/text/styles.cljs +++ b/frontend/src/app/main/ui/shapes/text/styles.cljs @@ -49,11 +49,16 @@ (defn generate-paragraph-styles [_shape data] - (let [line-height (:line-height data 1.2) + (let [line-height (:line-height data) + line-height + (if (and (some? line-height) (not= "" line-height)) + line-height + (:line-height txt/default-text-attrs)) + text-align (:text-align data "start") base #js {;; Fix a problem when exporting HTML :fontSize 0 ;;(str (:font-size data (:font-size txt/default-text-attrs)) "px") - :lineHeight (:line-height data (:line-height txt/default-text-attrs)) + :lineHeight line-height :margin 0}] (cond-> base From 39620fe9c4a17c8d967b23461e8690fc73d69b14 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 21 Nov 2024 12:37:15 +0100 Subject: [PATCH 2/2] :bug: Hover on history version entry to show options --- frontend/playwright/ui/specs/versions.spec.js | 9 +++++---- frontend/src/app/main/ui/workspace/sidebar/versions.cljs | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/playwright/ui/specs/versions.spec.js b/frontend/playwright/ui/specs/versions.spec.js index 40fac7d22..f99ae148c 100644 --- a/frontend/playwright/ui/specs/versions.spec.js +++ b/frontend/playwright/ui/specs/versions.spec.js @@ -58,10 +58,11 @@ test("Save and restore version", async ({ page }) => { await page.getByRole("textbox").press("Enter"); await page - .locator("li") - .filter({ hasText: "INIT" }) - .getByRole("button") - .click(); + .getByLabel("History", { exact: true }) + .locator("div") + .nth(3) + .hover(); + await page.getByRole("button", { name: "Open version menu" }).click(); await page.getByRole("button", { name: "Restore" }).click(); await workspacePage.mockRPC( diff --git a/frontend/src/app/main/ui/workspace/sidebar/versions.cljs b/frontend/src/app/main/ui/workspace/sidebar/versions.cljs index 31ec42c84..b96e99924 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/versions.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/versions.cljs @@ -134,7 +134,8 @@ time (dt/timeago (:created-at entry) {:locale locale})] [:span {:class (stl/css :date)} time])]] - [:> icon-button* {:variant "ghost" + [:> icon-button* {:class (stl/css :version-entry-options) + :variant "ghost" :aria-label (tr "workspace.versions.version-menu") :on-click handle-open-menu :icon "menu"}]]