From ec7f8a6aa7be03870a69be123d54b309de75e9b9 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Tue, 3 Dec 2024 15:40:27 +0100 Subject: [PATCH 1/9] :sparkles: Add test AB renaming "Libraries" to "Add library" --- .../app/main/ui/workspace/sidebar/assets.cljs | 20 +++++++++++----- .../app/main/ui/workspace/sidebar/assets.scss | 23 +++++++++++++++++++ frontend/translations/en.po | 3 +++ frontend/translations/es.po | 3 +++ 4 files changed, 43 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets.cljs index 6c4d03a07..4ec585f2d 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets.cljs @@ -8,6 +8,7 @@ (:require-macros [app.main.style :as stl]) (:require [app.common.data.macros :as dm] + [app.config :as cf] [app.main.data.modal :as modal] [app.main.data.workspace :as dw] [app.main.data.workspace.assets :as dwa] @@ -86,6 +87,7 @@ section (:section filters) ordering (:ordering filters) reverse-sort? (= :desc ordering) + num-libs (count (mf/deref refs/workspace-libraries)) toggle-ordering (mf/use-fn @@ -155,12 +157,18 @@ [:article {:class (stl/css :assets-bar)} [:div {:class (stl/css :assets-header)} (when-not ^boolean read-only? - [:button {:class (stl/css :libraries-button) - :on-click show-libraries-dialog - :data-testid "libraries"} - [:span {:class (stl/css :libraries-icon)} - i/library] - (tr "workspace.assets.libraries")]) + (if (and (cf/external-feature-flag "templates-02" "test") + (zero? num-libs)) + [:button {:class (stl/css :add-library-button) + :on-click show-libraries-dialog + :data-testid "libraries"} + (tr "workspace.assets.add-library")] + [:button {:class (stl/css :libraries-button) + :on-click show-libraries-dialog + :data-testid "libraries"} + [:span {:class (stl/css :libraries-icon)} + i/library] + (tr "workspace.assets.libraries")])) [:div {:class (stl/css :search-wrapper)} [:& search-bar {:on-change on-search-term-change diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets.scss b/frontend/src/app/main/ui/workspace/sidebar/assets.scss index acb9f3431..21f7af9d5 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets.scss +++ b/frontend/src/app/main/ui/workspace/sidebar/assets.scss @@ -25,34 +25,50 @@ width: 100%; margin-bottom: $s-4; border-radius: $s-8; + .libraries-icon { @include flexCenter; width: $s-24; height: 100%; + svg { @include flexCenter; @extend .button-icon; stroke: var(--icon-foreground); } } + &:hover { background-color: var(--button-secondary-background-color-hover); color: var(--button-secondary-foreground-color-hover); border: $s-1 solid var(--button-secondary-border-color-hover); + svg { stroke: var(--button-secondary-foreground-color-hover); } } + &:focus { background-color: var(--button-secondary-background-color-focus); color: var(--button-secondary-foreground-color-focus); border: $s-1 solid var(--button-secondary-border-color-focus); + svg { stroke: var(--button-secondary-foreground-color-focus); } } } +.add-library-button { + @extend .button-primary; + text-transform: uppercase; + gap: $s-2; + height: $s-32; + width: 100%; + margin-bottom: $s-4; + border-radius: $s-8; +} + .section-button { @include flexCenter; @include buttonStyle; @@ -62,32 +78,39 @@ border: $s-1 solid var(--input-border-color-rest); border-radius: $br-8 $br-2 $br-2 $br-8; background-color: var(--input-background-color-rest); + svg { height: $s-16; width: $s-16; stroke: var(--icon-foreground); } + &:focus { border: $s-1 solid var(--input-border-color-focus); outline: 0; background-color: var(--input-background-color-focus); color: var(--input-foreground-color-focus); + svg { background-color: var(--input-background-color-focus); } } + &:hover { border: $s-1 solid var(--input-border-color-hover); background-color: var(--input-background-color-hover); + svg { background-color: var(--input-background-color-hover); stroke: var(--button-foreground-hover); } + &:focus { border: $s-1 solid var(--input-border-color-focus); outline: 0; background-color: var(--input-background-color-focus); color: var(--input-foreground-color-focus); + svg { background-color: var(--input-background-color-focus); } diff --git a/frontend/translations/en.po b/frontend/translations/en.po index e001ffb0e..a7a4bc79c 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -4058,6 +4058,9 @@ msgstr "Group name" msgid "workspace.assets.libraries" msgstr "Libraries" +msgid "workspace.assets.add-library" +msgstr "Add library" + #: src/app/main/ui/workspace/sidebar/assets/components.cljs:523 msgid "workspace.assets.list-view" msgstr "List view" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index 1c904b1b1..817abd93b 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -4058,6 +4058,9 @@ msgstr "Nombre del grupo" msgid "workspace.assets.libraries" msgstr "Bibliotecas" +msgid "workspace.assets.add-library" +msgstr "Añadir biblioteca" + #: src/app/main/ui/workspace/sidebar/assets/components.cljs:523 msgid "workspace.assets.list-view" msgstr "Ver como lista" From bf40cd98e8227bbaeffb709fa72fd3172dc27a84 Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Wed, 4 Dec 2024 17:36:36 +0100 Subject: [PATCH 2/9] :bug: Fix admin can demote owner --- .../dashboard/get-team-members-admin.json | 30 +++++++++++++++++++ .../logged-in-user/get-teams-complete.json | 2 +- .../playwright/ui/specs/dashboard.spec.js | 17 +++++++++++ frontend/src/app/main/ui/dashboard/team.cljs | 13 ++++---- 4 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 frontend/playwright/data/dashboard/get-team-members-admin.json diff --git a/frontend/playwright/data/dashboard/get-team-members-admin.json b/frontend/playwright/data/dashboard/get-team-members-admin.json new file mode 100644 index 000000000..04237e11f --- /dev/null +++ b/frontend/playwright/data/dashboard/get-team-members-admin.json @@ -0,0 +1,30 @@ +[ + { + "~:is-admin": true, + "~:email": "bar@example.com", + "~:team-id": "~udd33ff88-f4e5-8033-8003-8096cc07bdf3", + "~:name": "Han Solo", + "~:fullname": "Han Solo", + "~:is-owner": true, + "~:modified-at": "~m1713533116365", + "~:can-edit": true, + "~:is-active": true, + "~:id": "~u1e162163-87b7-805b-8005-5fd05514b6d3", + "~:profile-id": "~u1e162163-87b7-805b-8005-5fd05514b6d3", + "~:created-at": "~m1733324626956" + }, + { + "~:is-admin": true, + "~:email": "foo@example.com", + "~:team-id": "~udd33ff88-f4e5-8033-8003-8096cc07bdf3", + "~:name": "Princesa Leia", + "~:fullname": "Princesa Leia", + "~:is-owner": false, + "~:modified-at": "~m1713533116365", + "~:can-edit": true, + "~:is-active": true, + "~:id": "~uc7ce0794-0992-8105-8004-38e630f29a9b", + "~:profile-id": "~uf56647eb-19a7-8115-8003-b6bc939ecd1b", + "~:created-at": "~m1713533116365" + } +] diff --git a/frontend/playwright/data/logged-in-user/get-teams-complete.json b/frontend/playwright/data/logged-in-user/get-teams-complete.json index 910e1543f..9ec9e90a0 100644 --- a/frontend/playwright/data/logged-in-user/get-teams-complete.json +++ b/frontend/playwright/data/logged-in-user/get-teams-complete.json @@ -35,7 +35,7 @@ }, "~:permissions": { "~:type": "~:membership", - "~:is-owner": true, + "~:is-owner": false, "~:is-admin": true, "~:can-edit": true }, diff --git a/frontend/playwright/ui/specs/dashboard.spec.js b/frontend/playwright/ui/specs/dashboard.spec.js index b11e1a326..5945045bd 100644 --- a/frontend/playwright/ui/specs/dashboard.spec.js +++ b/frontend/playwright/ui/specs/dashboard.spec.js @@ -52,3 +52,20 @@ test("Lists files in the drafts page", async ({ page }) => { dashboardPage.page.getByRole("button", { name: /New File 2/ }), ).toBeVisible(); }); + +test("Bug 9443, Admin can not demote owner", async ({ page }) => { + const dashboardPage = new DashboardPage(page); + await dashboardPage.setupDashboardFull(); + await DashboardPage.mockRPC( + page, + "get-team-members?team-id=*", + "dashboard/get-team-members-admin.json", + ); + + await dashboardPage.goToSecondTeamMembersSection(); + + await expect(page.getByRole("heading", { name: "Members" })).toBeVisible(); + await expect(page.getByRole("combobox", { name: "Admin" })).toBeVisible(); + await expect(page.getByText("Owner")).toBeVisible(); + await expect(page.getByRole("combobox", { name: "Owner" })).toHaveCount(0); +}); diff --git a/frontend/src/app/main/ui/dashboard/team.cljs b/frontend/src/app/main/ui/dashboard/team.cljs index 431dd2711..34a3d20e7 100644 --- a/frontend/src/app/main/ui/dashboard/team.cljs +++ b/frontend/src/app/main/ui/dashboard/team.cljs @@ -278,27 +278,30 @@ is-you (= (:id profile) (:id member)) can-change-rol (or is-owner is-admin) - not-superior (or is-admin (and can-change-rol (or member-is-admin member-is-editor member-is-viewer))) + not-superior (or (and (not member-is-owner) is-admin) (and can-change-rol (or member-is-admin member-is-editor member-is-viewer))) role (cond member-is-owner "labels.owner" member-is-admin "labels.admin" member-is-editor "labels.editor" - :else "labels.viewer") - + :else "labels.viewer") on-show (mf/use-fn #(reset! show? true)) on-hide (mf/use-fn #(reset! show? false))] [:* (if (and can-change-rol not-superior (not (and is-you is-owner))) [:div {:class (stl/css :rol-selector :has-priv) + :role "combobox" + :aria-labelledby "role-label-id" :on-click on-show} - [:span {:class (stl/css :rol-label)} (tr role)] + [:span {:class (stl/css :rol-label) + :id "role-label-id"} (tr role)] arrow-icon] [:div {:class (stl/css :rol-selector)} [:span {:class (stl/css :rol-label)} (tr role)]]) [:& dropdown {:show @show? :on-close on-hide} - [:ul {:class (stl/css :roles-dropdown)} + [:ul {:class (stl/css :roles-dropdown) + :role "listbox"} [:li {:on-click on-set-viewer :class (stl/css :rol-dropdown-item)} (tr "labels.viewer")] From 630f42f7ac53bbc7720283217970c80acce4ca2c Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 5 Dec 2024 09:30:10 +0100 Subject: [PATCH 3/9] :bug: Fix internal error when creating a guide --- common/src/app/common/types/page.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/app/common/types/page.cljc b/common/src/app/common/types/page.cljc index 6a03e3a49..8c57f3309 100644 --- a/common/src/app/common/types/page.cljc +++ b/common/src/app/common/types/page.cljc @@ -33,7 +33,7 @@ [:id ::sm/uuid] [:axis [::sm/one-of #{:x :y}]] [:position ::sm/safe-number] - [:frame-id {:optional true} ::sm/uuid]]) + [:frame-id {:optional true} [:maybe ::sm/uuid]]]) (def schema:guides [:map-of {:gen/max 2} ::sm/uuid schema:guide]) From 12e97c73f36399171131608f17e1663f513c92d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Valderrama?= Date: Fri, 29 Nov 2024 11:30:19 +0100 Subject: [PATCH 4/9] :bug: Fix missing rename shortcut translation --- frontend/src/app/main/ui/workspace/sidebar/shortcuts.cljs | 1 + frontend/translations/en.po | 3 +++ frontend/translations/es.po | 3 +++ 3 files changed, 7 insertions(+) diff --git a/frontend/src/app/main/ui/workspace/sidebar/shortcuts.cljs b/frontend/src/app/main/ui/workspace/sidebar/shortcuts.cljs index d2877b8a4..dad7ddcf2 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/shortcuts.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/shortcuts.cljs @@ -163,6 +163,7 @@ (tr "shortcuts.paste") (tr "shortcuts.prev-frame") (tr "shortcuts.redo") + (tr "shortcuts.rename") (tr "shortcuts.reset-zoom") (tr "shortcuts.scale") (tr "shortcuts.search-placeholder") diff --git a/frontend/translations/en.po b/frontend/translations/en.po index e001ffb0e..f28d24983 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -3622,6 +3622,9 @@ msgstr "Previous board" msgid "shortcuts.redo" msgstr "Redo" +msgid "shortcuts.rename" +msgstr "Rename" + #: src/app/main/ui/workspace/sidebar/shortcuts.cljs:166 msgid "shortcuts.reset-zoom" msgstr "Reset zoom" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index 1c904b1b1..c28bc92d5 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -3625,6 +3625,9 @@ msgstr "Tablero anterior" msgid "shortcuts.redo" msgstr "Rehacer" +msgid "shortcuts.rename" +msgstr "Renombrar" + #: src/app/main/ui/workspace/sidebar/shortcuts.cljs:166 msgid "shortcuts.reset-zoom" msgstr "Reiniciar zoom" From 4114d9b56fee8a0f536a2b93ba6a991b3132f553 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 5 Dec 2024 10:18:55 +0100 Subject: [PATCH 5/9] :bug: Fix shortcut for history not working --- docs/user-guide/workspace-basics/index.njk | 2 +- frontend/playwright/ui/specs/versions.spec.js | 2 +- frontend/src/app/main/data/workspace/shortcuts.cljs | 5 ----- frontend/src/app/main/ui/workspace/right_header.cljs | 4 ++-- frontend/translations/ar.po | 2 +- frontend/translations/ca.po | 2 +- frontend/translations/cs.po | 2 +- frontend/translations/de.po | 2 +- frontend/translations/el.po | 2 +- frontend/translations/en.po | 2 +- frontend/translations/es.po | 2 +- frontend/translations/eu.po | 2 +- frontend/translations/fa.po | 2 +- frontend/translations/fr.po | 2 +- frontend/translations/ha.po | 2 +- frontend/translations/he.po | 2 +- frontend/translations/hr.po | 2 +- frontend/translations/id.po | 2 +- frontend/translations/lv.po | 2 +- frontend/translations/nl.po | 2 +- frontend/translations/pl.po | 2 +- frontend/translations/pt_BR.po | 2 +- frontend/translations/pt_PT.po | 2 +- frontend/translations/ro.po | 2 +- frontend/translations/ru.po | 2 +- frontend/translations/sr.po | 2 +- frontend/translations/sv.po | 2 +- frontend/translations/tr.po | 2 +- frontend/translations/ukr_UA.po | 2 +- frontend/translations/yo.po | 2 +- frontend/translations/zh_CN.po | 2 +- 31 files changed, 31 insertions(+), 36 deletions(-) diff --git a/docs/user-guide/workspace-basics/index.njk b/docs/user-guide/workspace-basics/index.njk index 24d7ad360..55e98657a 100644 --- a/docs/user-guide/workspace-basics/index.njk +++ b/docs/user-guide/workspace-basics/index.njk @@ -203,7 +203,7 @@ geometric structure. In Penpot there are three types of guides:

The history panel keeps track of the latest changes on an opened file.

View history

-

To view the recent history of a file at the workspace press Ctrl/⌘ + H or click at the history icon on the toolbar at the left.

+

To view the recent history of a file at the workspace click at the history icon on the toolbar at the left.

At the history you can see items with information about the last changes. At first sight you have object type (rectangle, text, image...) and type of change (New, Modified, Deleted...). If you press the item further details are shown.

History panel diff --git a/frontend/playwright/ui/specs/versions.spec.js b/frontend/playwright/ui/specs/versions.spec.js index f99ae148c..8d26c10c5 100644 --- a/frontend/playwright/ui/specs/versions.spec.js +++ b/frontend/playwright/ui/specs/versions.spec.js @@ -30,7 +30,7 @@ test("Save and restore version", async ({ page }) => { "workspace/versions-snapshot-1.json", ); - await page.getByLabel("History (Alt+H)").click(); + await page.getByLabel("History").click(); await workspacePage.mockRPC( "create-file-snapshot", diff --git a/frontend/src/app/main/data/workspace/shortcuts.cljs b/frontend/src/app/main/data/workspace/shortcuts.cljs index 3e87114af..7d6ca0600 100644 --- a/frontend/src/app/main/data/workspace/shortcuts.cljs +++ b/frontend/src/app/main/data/workspace/shortcuts.cljs @@ -447,11 +447,6 @@ :subsections [:panels] :fn #(st/emit! (dw/go-to-layout :assets))} - :toggle-history {:tooltip (ds/alt "H") - :command (ds/a-mod "h") - :subsections [:panels] - :fn #(emit-when-no-readonly (dw/go-to-layout :document-history))} - :toggle-colorpalette {:tooltip (ds/alt "P") :command (ds/a-mod "p") :subsections [:panels] diff --git a/frontend/src/app/main/ui/workspace/right_header.cljs b/frontend/src/app/main/ui/workspace/right_header.cljs index 5c1cc9df0..17ea3f5ce 100644 --- a/frontend/src/app/main/ui/workspace/right_header.cljs +++ b/frontend/src/app/main/ui/workspace/right_header.cljs @@ -243,8 +243,8 @@ (when-not ^boolean read-only? [:div {:class (stl/css :history-section)} [:button - {:title (tr "workspace.sidebar.history" (sc/get-tooltip :toggle-history)) - :aria-label (tr "workspace.sidebar.history" (sc/get-tooltip :toggle-history)) + {:title (tr "workspace.sidebar.history") + :aria-label (tr "workspace.sidebar.history") :class (stl/css-case :selected (contains? layout :document-history) :history-button true) :on-click toggle-history} diff --git a/frontend/translations/ar.po b/frontend/translations/ar.po index 67aeb19b1..dc5453048 100644 --- a/frontend/translations/ar.po +++ b/frontend/translations/ar.po @@ -4452,7 +4452,7 @@ msgstr "توسيع الشريط الجانبي" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "التاريخ (%s)" +msgstr "التاريخ" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/ca.po b/frontend/translations/ca.po index f86166527..8220a452c 100644 --- a/frontend/translations/ca.po +++ b/frontend/translations/ca.po @@ -4281,7 +4281,7 @@ msgstr "Actualitza el component principal" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Historial (%s)" +msgstr "Historial" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/cs.po b/frontend/translations/cs.po index 8eb708a46..caa94d251 100644 --- a/frontend/translations/cs.po +++ b/frontend/translations/cs.po @@ -5797,7 +5797,7 @@ msgstr "Rozbalit postranní panel" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Historie (%s)" +msgstr "Historie" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/de.po b/frontend/translations/de.po index c3e611ac4..106ddc76c 100644 --- a/frontend/translations/de.po +++ b/frontend/translations/de.po @@ -5795,7 +5795,7 @@ msgstr "Seitenleiste einblenden" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Verlauf (%s)" +msgstr "Verlauf" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/el.po b/frontend/translations/el.po index f2171732e..28bd42937 100644 --- a/frontend/translations/el.po +++ b/frontend/translations/el.po @@ -1965,7 +1965,7 @@ msgstr "Ανακάλυψη" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Ιστορικό (%s)" +msgstr "Ιστορικό" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/en.po b/frontend/translations/en.po index e001ffb0e..3677fa540 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -6105,7 +6105,7 @@ msgstr "Expand sidebar" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "History (%s)" +msgstr "History" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index 1c904b1b1..fc2ee44b4 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -6109,7 +6109,7 @@ msgstr "Abrir barra lateral" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Historial (%s)" +msgstr "Historial" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/eu.po b/frontend/translations/eu.po index d46b8dc99..aed3343cb 100644 --- a/frontend/translations/eu.po +++ b/frontend/translations/eu.po @@ -4693,7 +4693,7 @@ msgstr "Ireki alboko barra" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Historikoa (%s)" +msgstr "Historikoa" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/fa.po b/frontend/translations/fa.po index 3cc6a13bf..e7d2f6bfa 100644 --- a/frontend/translations/fa.po +++ b/frontend/translations/fa.po @@ -3033,7 +3033,7 @@ msgstr "گسترش نوار کناری" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "تاریخچه (%s)" +msgstr "تاریخچه" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/fr.po b/frontend/translations/fr.po index 01c4b3ef1..ca02d7b28 100644 --- a/frontend/translations/fr.po +++ b/frontend/translations/fr.po @@ -5656,7 +5656,7 @@ msgstr "Ouvrir la barre latérale" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Historique (%s)" +msgstr "Historique" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/ha.po b/frontend/translations/ha.po index 3fbf53ca9..395d32a30 100644 --- a/frontend/translations/ha.po +++ b/frontend/translations/ha.po @@ -5042,7 +5042,7 @@ msgstr "kara yankin ma'agiyar bayani" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "labari (%s)" +msgstr "labari" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/he.po b/frontend/translations/he.po index dff9ea49d..a275e7962 100644 --- a/frontend/translations/he.po +++ b/frontend/translations/he.po @@ -5776,7 +5776,7 @@ msgstr "הרחבת סרגל צד" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "היסטוריה (%s)" +msgstr "היסטוריה" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/hr.po b/frontend/translations/hr.po index 350ab8824..e5723bcf1 100644 --- a/frontend/translations/hr.po +++ b/frontend/translations/hr.po @@ -4294,7 +4294,7 @@ msgstr "Ažuriraj glavnu komponentu" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Povijest (%s)" +msgstr "Povijest" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/id.po b/frontend/translations/id.po index e368467f1..d1a6b3ca0 100644 --- a/frontend/translations/id.po +++ b/frontend/translations/id.po @@ -5823,7 +5823,7 @@ msgstr "Buka bilah samping" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Riwayat (%s)" +msgstr "Riwayat" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/lv.po b/frontend/translations/lv.po index 4b593f0bf..732ad1551 100644 --- a/frontend/translations/lv.po +++ b/frontend/translations/lv.po @@ -5833,7 +5833,7 @@ msgstr "Izvērst sānjoslu" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Vēsture (%s)" +msgstr "Vēsture" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/nl.po b/frontend/translations/nl.po index e082f4eff..d2a91aa0b 100644 --- a/frontend/translations/nl.po +++ b/frontend/translations/nl.po @@ -5838,7 +5838,7 @@ msgstr "Zijbalk uitklappen" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Geschiedenis (%s)" +msgstr "Geschiedenis" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/pl.po b/frontend/translations/pl.po index 60f1e57cf..6b7de1af3 100644 --- a/frontend/translations/pl.po +++ b/frontend/translations/pl.po @@ -4589,7 +4589,7 @@ msgstr "Rozwiń pasek boczny" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Historia (%s)" +msgstr "Historia" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/pt_BR.po b/frontend/translations/pt_BR.po index c30d36cad..b23f720c2 100644 --- a/frontend/translations/pt_BR.po +++ b/frontend/translations/pt_BR.po @@ -4572,7 +4572,7 @@ msgstr "Expandir a barra lateral" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Histórico (%s)" +msgstr "Histórico" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/pt_PT.po b/frontend/translations/pt_PT.po index a4ae5c293..c9e9ed632 100644 --- a/frontend/translations/pt_PT.po +++ b/frontend/translations/pt_PT.po @@ -5629,7 +5629,7 @@ msgstr "Expandir barra lateral" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Histórico (%s)" +msgstr "Histórico" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/ro.po b/frontend/translations/ro.po index 0dc3d14e0..7990ab0ff 100644 --- a/frontend/translations/ro.po +++ b/frontend/translations/ro.po @@ -5113,7 +5113,7 @@ msgstr "Extindeți bara laterală" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Istoric (%s)" +msgstr "Istoric" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/ru.po b/frontend/translations/ru.po index f276bce68..718a3fa48 100644 --- a/frontend/translations/ru.po +++ b/frontend/translations/ru.po @@ -5603,7 +5603,7 @@ msgstr "Расширить боковую панель" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "История (%s)" +msgstr "История" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/sr.po b/frontend/translations/sr.po index 8cc263841..f12a6dcdc 100644 --- a/frontend/translations/sr.po +++ b/frontend/translations/sr.po @@ -5624,7 +5624,7 @@ msgstr "Прошири бочну траку" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Историја (%s)" +msgstr "Историја" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/sv.po b/frontend/translations/sv.po index 152f1e201..cb5688fc8 100644 --- a/frontend/translations/sv.po +++ b/frontend/translations/sv.po @@ -5814,7 +5814,7 @@ msgstr "Expandera sidonavigation" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Historia (%s)" +msgstr "Historia" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/tr.po b/frontend/translations/tr.po index d92f2e15a..c190e4d30 100644 --- a/frontend/translations/tr.po +++ b/frontend/translations/tr.po @@ -5813,7 +5813,7 @@ msgstr "Kenar çubuğunu genişlet" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Geçmiş (%s)" +msgstr "Geçmiş" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/ukr_UA.po b/frontend/translations/ukr_UA.po index d57edab81..073ba2f94 100644 --- a/frontend/translations/ukr_UA.po +++ b/frontend/translations/ukr_UA.po @@ -5401,7 +5401,7 @@ msgstr "Розкрити панель інструментів" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Історія (%s)" +msgstr "Історія" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/yo.po b/frontend/translations/yo.po index 08e48d15e..b20ec117a 100644 --- a/frontend/translations/yo.po +++ b/frontend/translations/yo.po @@ -4765,7 +4765,7 @@ msgstr "Fẹ òpó ẹ̀gbẹ́" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "Ìtàn (%s)" +msgstr "Ìtàn" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" diff --git a/frontend/translations/zh_CN.po b/frontend/translations/zh_CN.po index f6d9fda18..821f749de 100644 --- a/frontend/translations/zh_CN.po +++ b/frontend/translations/zh_CN.po @@ -5400,7 +5400,7 @@ msgstr "展开侧边栏" #: src/app/main/ui/workspace/right_header.cljs:246, src/app/main/ui/workspace/right_header.cljs:247 msgid "workspace.sidebar.history" -msgstr "历史(%s)" +msgstr "历史" #: src/app/main/ui/workspace/sidebar/layers.cljs:524, src/app/main/ui/workspace/sidebar.cljs:110, src/app/main/ui/workspace/sidebar.cljs:114, src/app/main/ui/workspace/sidebar.cljs:123 msgid "workspace.sidebar.layers" From b58830260c63b6e84c4775fe3d0f89b5586386f0 Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Thu, 5 Dec 2024 12:21:22 +0100 Subject: [PATCH 6/9] :bug: Fix horizontal scroll on firefox --- frontend/resources/styles/common/base.scss | 7 ------- 1 file changed, 7 deletions(-) diff --git a/frontend/resources/styles/common/base.scss b/frontend/resources/styles/common/base.scss index 078593de0..0d61ab7eb 100644 --- a/frontend/resources/styles/common/base.scss +++ b/frontend/resources/styles/common/base.scss @@ -41,13 +41,6 @@ body { scrollbar-width: thin; } -// Firefox-only hack -@-moz-document url-prefix() { - * { - scrollbar-width: auto; - } -} - img { height: auto; width: 100%; From c68a0d3967999503237fea17695f74ac4eebeca9 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 5 Dec 2024 13:15:46 +0100 Subject: [PATCH 7/9] :sparkles: Add autosaved versions warning --- .../main/ui/workspace/sidebar/versions.cljs | 14 ++++++++++++- .../main/ui/workspace/sidebar/versions.scss | 21 +++++++++++++++++++ frontend/translations/en.po | 7 +++++++ frontend/translations/es.po | 7 +++++++ 4 files changed, 48 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/versions.cljs b/frontend/src/app/main/ui/workspace/sidebar/versions.cljs index b96e99924..f940022ca 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/versions.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/versions.cljs @@ -31,6 +31,8 @@ (def versions (l/derived :workspace-versions st/state)) +(def versions-stored-days 7) + (defn group-snapshots [data] (->> (concat @@ -388,4 +390,14 @@ :on-restore-snapshot handle-restore-version-snapshot :on-pin-snapshot handle-pin-version}] - nil))])])])) + nil))]) + + [:div {:class (stl/css :autosave-warning)} + [:div {:class (stl/css :autosave-warning-text)} + (tr "workspace.versions.warning.text" versions-stored-days)] + + [:div {:class (stl/css :autosave-warning-subtext)} + [:> i18n/tr-html* + {:tag-name "div" + :content (tr "workspace.versions.warning.subtext" + "mailto:support@penpot.app")}]]]])])) diff --git a/frontend/src/app/main/ui/workspace/sidebar/versions.scss b/frontend/src/app/main/ui/workspace/sidebar/versions.scss index a924ae31d..4ab415408 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/versions.scss +++ b/frontend/src/app/main/ui/workspace/sidebar/versions.scss @@ -230,3 +230,24 @@ .version-snapshot-menu-btn { visibility: hidden; } + +.autosave-warning { + display: flex; + flex-direction: column; + gap: $s-8; + padding: $s-16; +} + +.autosave-warning-text { + color: var(--color-foreground-primary); + font-size: $fs-12; + text-transform: uppercase; +} + +.autosave-warning-subtext { + color: var(--color-foreground-secondary); + font-size: $fs-12; + a { + color: var(--color-accent-primary); + } +} diff --git a/frontend/translations/en.po b/frontend/translations/en.po index f28d24983..a5e4a7e2d 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -6560,6 +6560,13 @@ msgstr "Loading..." msgid "workspace.versions.restore-warning" msgstr "Do you want to restore this version?" +msgid "workspace.versions.warning.text" +msgstr "Autosaved versions will be kept for %s days." + +#, markdown +msgid "workspace.versions.warning.subtext" +msgstr "If you'd like to increase this limit, write to us at [support@penpot.app](%s)" + #: src/app/main/ui/workspace/sidebar/versions.cljs:207 msgid "workspace.versions.snapshot-menu" msgstr "Open snapshot menu" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index c28bc92d5..cadaff917 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -6555,6 +6555,13 @@ msgstr "Cargando..." msgid "workspace.versions.restore-warning" msgstr "¿Quieres restaurar esta versión?" +msgid "workspace.versions.warning.text" +msgstr "Los autoguardados duran %s días." + +#, markdown +msgid "workspace.versions.warning.subtext" +msgstr "Si quieres aumentar este límite, contáctanos en [support@penpot.app](%s)" + #: src/app/main/ui/workspace/sidebar/versions.cljs:207 msgid "workspace.versions.snapshot-menu" msgstr "Abrir menu de versiones" From 6a624ae94a1918148feb351f7ea9380033fd1b36 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 9 Dec 2024 13:15:09 +0100 Subject: [PATCH 8/9] :bug: Fix incorrect navegation handling on change team --- frontend/src/app/main/ui/dashboard/sidebar.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/dashboard/sidebar.cljs b/frontend/src/app/main/ui/dashboard/sidebar.cljs index 990019067..f4f56e9ad 100644 --- a/frontend/src/app/main/ui/dashboard/sidebar.cljs +++ b/frontend/src/app/main/ui/dashboard/sidebar.cljs @@ -9,6 +9,7 @@ (:require [app.common.data.macros :as dm] [app.common.spec :as us] + [app.common.uuid :as uuid] [app.config :as cf] [app.main.data.auth :as da] [app.main.data.common :as dcm] @@ -280,7 +281,8 @@ (mf/use-fn (fn [event] (let [team-id (-> (dom/get-current-target event) - (dom/get-data "value"))] + (dom/get-data "value") + (uuid/parse))] (st/emit! (dcm/go-to-dashboard-recent :team-id team-id))))) From 7c6ad334e718601e9e86cc4b4a2d1d666ad644ef Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 9 Dec 2024 13:25:17 +0100 Subject: [PATCH 9/9] :bug: Fix incorrect rendering of team members page when projects are not loaded --- frontend/src/app/main/ui/dashboard.cljs | 42 ++++++++++---------- frontend/src/app/main/ui/dashboard/team.cljs | 1 - 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/frontend/src/app/main/ui/dashboard.cljs b/frontend/src/app/main/ui/dashboard.cljs index 23bc172c0..cad843859 100644 --- a/frontend/src/app/main/ui/dashboard.cljs +++ b/frontend/src/app/main/ui/dashboard.cljs @@ -85,19 +85,20 @@ :ref container} (case section :dashboard-recent - [:* - [:> projects-section* - {:team team - :projects projects - :profile profile}] + (when (seq projects) + [:* + [:> projects-section* + {:team team + :projects projects + :profile profile}] - (when ^boolean show-templates? - [:> templates-section* - {:profile profile - :project-id project-id - :team-id team-id - :default-project-id default-project-id - :content-width @content-width}])] + (when ^boolean show-templates? + [:> templates-section* + {:profile profile + :project-id project-id + :team-id team-id + :default-project-id default-project-id + :content-width @content-width}])]) :dashboard-fonts [:> fonts-page* {:team team}] @@ -256,12 +257,11 @@ :profile profile :section section :search-term search-term}] - (when (seq projects) - [:> dashboard-content* - {:projects projects - :profile profile - :project project - :default-project default-project - :section section - :search-term search-term - :team team}])]])) + [:> dashboard-content* + {:projects projects + :profile profile + :project project + :default-project default-project + :section section + :search-term search-term + :team team}]]])) diff --git a/frontend/src/app/main/ui/dashboard/team.cljs b/frontend/src/app/main/ui/dashboard/team.cljs index 09fe162bd..ce2b9b791 100644 --- a/frontend/src/app/main/ui/dashboard/team.cljs +++ b/frontend/src/app/main/ui/dashboard/team.cljs @@ -491,7 +491,6 @@ total-members (count members) - owner (mf/with-memo [members] (d/seek :is-owner members))