From 6c9875e4f964d1c148dde2efe84244bb627c273b Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Mon, 17 Feb 2025 09:54:24 +0100 Subject: [PATCH 1/5] :bug: Fix add recent color while drag and drop --- .../app/main/ui/workspace/colorpicker.cljs | 27 ++++++++----------- .../main/ui/workspace/colorpicker/ramp.cljs | 24 +++++++++++------ 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/colorpicker.cljs b/frontend/src/app/main/ui/workspace/colorpicker.cljs index d6fcbc0e0..c982d8b4c 100644 --- a/frontend/src/app/main/ui/workspace/colorpicker.cljs +++ b/frontend/src/app/main/ui/workspace/colorpicker.cljs @@ -111,7 +111,8 @@ :radial :radial-gradient) :color)) active-color-tab (mf/use-state #(dc/get-active-color-tab)) - drag? (mf/use-state false) + drag?* (mf/use-state false) + drag? (deref drag?*) type (if (= @active-color-tab "hsva") :hsv :rgb) @@ -134,7 +135,7 @@ (st/emit! (dc/update-colorpicker-color {:image (-> (select-keys image [:id :width :height :mtype :name]) (assoc :keep-aspect-ratio true))} - (not @drag?))))) + (not drag?))))) on-fill-image-click (mf/use-fn #(dom/click (mf/ref-val fill-image-ref))) @@ -152,7 +153,6 @@ image (-> (:image current-color) (assoc :keep-aspect-ratio keep-aspect-ratio?))] - (st/emit! (dc/update-colorpicker-color {:image image} true) (ptk/data-event ::ev/event {::ev/name "toggle-image-aspect-ratio" @@ -176,16 +176,11 @@ handle-change-color (mf/use-fn - (mf/deps current-color @drag?) + (mf/deps current-color drag?) (fn [color] - (when (or (not= (str/lower (:hex color)) (str/lower (:hex current-color))) - (not= (:h color) (:h current-color)) - (not= (:s color) (:s current-color)) - (not= (:v color) (:v current-color)) - (not= (:alpha color) (:alpha current-color))) - (let [recent-color (merge current-color color) - recent-color (dc/materialize-color-components recent-color)] - (st/emit! (dc/update-colorpicker-color recent-color (not @drag?))))))) + (let [color (merge current-color color) + color (dc/materialize-color-components color)] + (st/emit! (dc/update-colorpicker-color color (not drag?)))))) handle-click-picker (mf/use-fn @@ -217,18 +212,18 @@ on-start-drag (mf/use-fn - (mf/deps drag? node-ref) + (mf/deps drag?* node-ref) (fn [] (reset! should-update? false) - (reset! drag? true) + (reset! drag?* true) (st/emit! (dwu/start-undo-transaction (mf/ref-val node-ref))))) on-finish-drag (mf/use-fn - (mf/deps drag? node-ref) + (mf/deps drag?* node-ref) (fn [] (reset! should-update? true) - (reset! drag? false) + (reset! drag?* false) (st/emit! (dwu/commit-undo-transaction (mf/ref-val node-ref))))) on-color-accept diff --git a/frontend/src/app/main/ui/workspace/colorpicker/ramp.cljs b/frontend/src/app/main/ui/workspace/colorpicker/ramp.cljs index a7bfee782..f9850579d 100644 --- a/frontend/src/app/main/ui/workspace/colorpicker/ramp.cljs +++ b/frontend/src/app/main/ui/workspace/colorpicker/ramp.cljs @@ -16,7 +16,8 @@ [rumext.v2 :as mf])) (mf/defc value-saturation-selector [{:keys [saturation value on-change on-start-drag on-finish-drag]}] - (let [dragging? (mf/use-state false) + (let [dragging?* (mf/use-state false) + dragging? (deref dragging?*) calculate-pos (fn [ev] (let [{:keys [left right top bottom]} (-> ev dom/get-target dom/get-bounding-rect) @@ -26,26 +27,33 @@ (on-change px py))) handle-start-drag - (mf/use-callback + (mf/use-fn (mf/deps on-start-drag) (fn [event] (dom/capture-pointer event) - (reset! dragging? true) + (reset! dragging?* true) (on-start-drag))) handle-stop-drag - (mf/use-callback + (mf/use-fn (mf/deps on-finish-drag) (fn [event] (dom/release-pointer event) - (reset! dragging? false) - (on-finish-drag)))] + (reset! dragging?* false) + (on-finish-drag))) + + handle-change-pointer-move + (mf/use-fn + (mf/deps calculate-pos dragging?) + (fn [event] + (when dragging? + (calculate-pos event))))] + [:div {:class (stl/css :value-saturation-selector) :on-pointer-down handle-start-drag :on-pointer-up handle-stop-drag - :on-lost-pointer-capture handle-stop-drag :on-click calculate-pos - :on-pointer-move #(when @dragging? (calculate-pos %))} + :on-pointer-move handle-change-pointer-move} [:div {:class (stl/css :handler) :style {:pointer-events "none" :left (str (* 100 saturation) "%") From b9629b7be60e857aea2534d32c6029d5d29de2b9 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 17 Feb 2025 11:23:46 +0100 Subject: [PATCH 2/5] :fire: Remove unused default flags on frontend --- frontend/src/app/config.cljs | 3 --- 1 file changed, 3 deletions(-) diff --git a/frontend/src/app/config.cljs b/frontend/src/app/config.cljs index bd73f025a..2684bccc8 100644 --- a/frontend/src/app/config.cljs +++ b/frontend/src/app/config.cljs @@ -65,9 +65,6 @@ (def default-flags [:enable-onboarding - :enable-onboarding-team - :enable-onboarding-questions - :enable-onboarding-newsletter :enable-dashboard-templates-section :enable-google-fonts-provider :enable-component-thumbnails]) From 66182152cbeadc6b75529b4ca4e256325ace82fe Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 17 Feb 2025 11:51:21 +0100 Subject: [PATCH 3/5] :bug: Set correct default for terms link --- frontend/src/app/config.cljs | 4 ++-- frontend/src/app/main/ui/dashboard/fonts.cljs | 8 +++++--- frontend/translations/ar.po | 2 +- frontend/translations/ca.po | 2 +- frontend/translations/cs.po | 2 +- frontend/translations/da.po | 2 +- frontend/translations/de.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/gl.po | 2 +- frontend/translations/he.po | 2 +- frontend/translations/hr.po | 2 +- frontend/translations/id.po | 2 +- frontend/translations/it.po | 2 +- frontend/translations/lt.po | 2 +- frontend/translations/lv.po | 2 +- frontend/translations/ms.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/th.po | 2 +- frontend/translations/tr.po | 2 +- frontend/translations/ukr_UA.po | 2 +- 31 files changed, 36 insertions(+), 34 deletions(-) diff --git a/frontend/src/app/config.cljs b/frontend/src/app/config.cljs index 2684bccc8..3a268027e 100644 --- a/frontend/src/app/config.cljs +++ b/frontend/src/app/config.cljs @@ -102,8 +102,8 @@ (def browser (parse-browser)) (def platform (parse-platform)) -(def terms-of-service-uri (obj/get global "penpotTermsOfServiceURI" "https://penpot.app/terms")) -(def privacy-policy-uri (obj/get global "penpotPrivacyPolicyURI" "https://penpot.app/privacy")) +(def terms-of-service-uri (obj/get global "penpotTermsOfServiceURI")) +(def privacy-policy-uri (obj/get global "penpotPrivacyPolicyURI")) (def flex-help-uri (obj/get global "penpotGridHelpURI" "https://help.penpot.app/user-guide/flexible-layouts/")) (def grid-help-uri (obj/get global "penpotGridHelpURI" "https://help.penpot.app/user-guide/flexible-layouts/")) (def plugins-list-uri (obj/get global "penpotPluginsListUri" "https://penpot.app/penpothub/plugins")) diff --git a/frontend/src/app/main/ui/dashboard/fonts.cljs b/frontend/src/app/main/ui/dashboard/fonts.cljs index c9cb383fd..bcda5f4b0 100644 --- a/frontend/src/app/main/ui/dashboard/fonts.cljs +++ b/frontend/src/app/main/ui/dashboard/fonts.cljs @@ -9,6 +9,7 @@ (:require [app.common.data.macros :as dm] [app.common.media :as cm] + [app.config :as cf] [app.main.data.fonts :as df] [app.main.data.modal :as modal] [app.main.data.notifications :as ntf] @@ -183,9 +184,10 @@ :ref input-ref :on-selected on-selected}]] - [:& context-notification {:content (tr "dashboard.fonts.hero-text2") - :level :default - :is-html true}] + (when-let [url cf/terms-of-service-uri] + [:& context-notification {:content (tr "dashboard.fonts.hero-text2" url) + :level :default + :is-html true}]) (when problematic-fonts? [:& context-notification {:content (tr "dashboard.fonts.warning-text") diff --git a/frontend/translations/ar.po b/frontend/translations/ar.po index 016af36d0..1928764b8 100644 --- a/frontend/translations/ar.po +++ b/frontend/translations/ar.po @@ -464,7 +464,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "يجب عليك فقط تحميل الخطوط التي تمتلكها أو لديك ترخيص لاستخدامها في Penpot. " "اكتشف المزيد في قسم حقوق المحتوى في [شروط خدمة Penpot] " -"(https://penpot.app/terms.html). قد ترغب أيضًا في القراءة عن [ترخيص الخطوط] " +"(%s). قد ترغب أيضًا في القراءة عن [ترخيص الخطوط] " "(2)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/ca.po b/frontend/translations/ca.po index c550ecf4f..ee9cbd35f 100644 --- a/frontend/translations/ca.po +++ b/frontend/translations/ca.po @@ -458,7 +458,7 @@ msgstr "" "Només podeu pujar tipografies de la vostra propietat o de les que tingueu " "una llicència que us permeti utilitzar-los al Penpot. Teniu més informació " "a la secció de drets de contingut de les [Condicions del servei del " -"Penpot](https://penpot.app/terms.html). També podeu llegir sobre les " +"Penpot](%s). També podeu llegir sobre les " "[llicències de les tipografies](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/cs.po b/frontend/translations/cs.po index 922bf1e5c..ebf3b792a 100644 --- a/frontend/translations/cs.po +++ b/frontend/translations/cs.po @@ -605,7 +605,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Měli byste nahrávat pouze písma, která vlastníte nebo máte licenci k " "použití v Penpotu. Další informace najdete v části Obsahová práva " -"[smluvních podmínek společnosti Penpot](https://penpot.app/terms.html). " +"[smluvních podmínek společnosti Penpot](%s). " "Můžete si také přečíst o [licencování " "písem](https://www.typography.com/faq)." diff --git a/frontend/translations/da.po b/frontend/translations/da.po index 9c6346109..8f3717335 100644 --- a/frontend/translations/da.po +++ b/frontend/translations/da.po @@ -189,7 +189,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Du bør kun uploade skrifttyper som du ejer eller har licens til at bruge i " "Penpot. Find ud af mere i sektionen om indholdsrettigheder i [Penpot's " -"Terms of Service] (https://penpot.app/terms.html). Du kan også læse om " +"Terms of Service] (%s). Du kan også læse om " "[font licensing](2)." #: src/app/main/ui/dashboard/team.cljs:116 diff --git a/frontend/translations/de.po b/frontend/translations/de.po index 75809df06..643442477 100644 --- a/frontend/translations/de.po +++ b/frontend/translations/de.po @@ -606,7 +606,7 @@ msgstr "" "Sie sollten nur Schriftarten hochladen, die Sie besitzen oder für die Sie " "eine Lizenz zur Verwendung in Penpot verfügen. Weitere Informationen finden " "Sie im Abschnitt über Inhaltsrechte in den [Nutzungsbedingungen von " -"Penpot](https://penpot.app/terms.html). Mehr über die [Lizenzierung von " +"Penpot](%s). Mehr über die [Lizenzierung von " "Schriftarten erfahren Sie hier](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/en.po b/frontend/translations/en.po index 3aae323d4..bfeefcde0 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -614,7 +614,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "You should only upload fonts you own or have license to use in Penpot. Find " "out more in the Content rights section of [Penpot's Terms of " -"Service](https://penpot.app/terms.html). You also might want to read about " +"Service](%s). You also might want to read about " "[font licensing](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/es.po b/frontend/translations/es.po index 2dd27b74a..544c4a958 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -620,7 +620,7 @@ msgstr "" "Sólo deberías cargar fuentes que te pertenecen o de las que tienes una " "licencia que te permita usarlas en Penpot. Encuentra más información en la " "sección de Derechos de Contenido: [Penpot's Terms of " -"Service](https://penpot.app/terms.html). También te puede interesar leer " +"Service](%s). También te puede interesar leer " "más sobre licencias tipográficas: [font " "licensing](https://www.typography.com/faq)." diff --git a/frontend/translations/eu.po b/frontend/translations/eu.po index 039fcf98e..fae56a29e 100644 --- a/frontend/translations/eu.po +++ b/frontend/translations/eu.po @@ -432,7 +432,7 @@ msgstr "" "Zureak diren edo Penpoten erabiltzeko lizentzia duzun letra-tipoak bakarrik " "kargatu ditzakezu. Informazio gehiago lortzeko irakurri Edukiaren " "eskubideen atala: [Penpoten erabilpen " -"baldintzak](https://penpot.app/terms.html). Letra-tipoen lizentzien " +"baldintzak](%s). Letra-tipoen lizentzien " "inguruan irakurtzea ere interesgarria izan daiteke: [letra-tipoen " "lizentziak](https://www.typography.com/faq)." diff --git a/frontend/translations/fa.po b/frontend/translations/fa.po index cc39e2c92..85d6fabd6 100644 --- a/frontend/translations/fa.po +++ b/frontend/translations/fa.po @@ -549,7 +549,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "شما فقط باید فونت‌هایی را که مالک آنها هستید یا مجوز استفاده از آنها را در " "Penpot دارید آپلود کنید. در بخش حقوق محتوا [شرایط خدمات Penpot] " -"(https://penpot.app/terms.html) اطلاعات بیشتری کسب کنید. همچنین ممکن است " +"(%s) اطلاعات بیشتری کسب کنید. همچنین ممکن است " "بخواهید درباره [مجوز فونت] (https://www.typography.com/faq) مطالعه کنید." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/fr.po b/frontend/translations/fr.po index f23f11584..42a346279 100644 --- a/frontend/translations/fr.po +++ b/frontend/translations/fr.po @@ -564,7 +564,7 @@ msgstr "" "Ne téléchargez que des polices que vous possédez ou dont la license vous " "permet de les utiliser dans Penpot. Vous trouverez plus d'informations dans " "la section Propriété des Contenus des [conditions générales d'utilisation " -"de Penpot](https://penpot.app/terms.html). Vous pouvez également vous " +"de Penpot](%s). Vous pouvez également vous " "renseigner sur les [licenses de polices](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/gl.po b/frontend/translations/gl.po index b83b6895a..85ae1b4ef 100644 --- a/frontend/translations/gl.po +++ b/frontend/translations/gl.po @@ -431,7 +431,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Só debes cargar fontes da túa propiedade ou das que teñas licenza para usar " "en Penpot. Atopa máis información na sección de dereitos de contido nas " -"[Condicións do servizo de Penpot](https://penpot.app/terms.html). Podes ler " +"[Condicións do servizo de Penpot](%s). Podes ler " "máis sobre [licenzas de fontes](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/he.po b/frontend/translations/he.po index 8f088fc93..b1d445025 100644 --- a/frontend/translations/he.po +++ b/frontend/translations/he.po @@ -589,7 +589,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "עליך להעלות גופנים בבעלותך או שיש לך רישיון להשתמש בהם ב־Penpot. ניתן למצוא " "על כך מידע נוסף בסעיף זכויות התוכן של [תנאי השירות של " -"Penpot](https://penpot.app/terms.html). אפשר גם לקרוא גם על [רישוי " +"Penpot](%s). אפשר גם לקרוא גם על [רישוי " "גופנים](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/hr.po b/frontend/translations/hr.po index 2cafd180b..7a769729f 100644 --- a/frontend/translations/hr.po +++ b/frontend/translations/hr.po @@ -433,7 +433,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Možeš učitavati samo fontove koje posjeduješ ili imaš licencu za korištenje " "u Penpotu. Saznaj više u odjeljku Prava na sadržaj [Penpotovih uvjeta " -"pružanja usluge](https://penpot.app/terms.html). Također možeš pročitati o " +"pružanja usluge](%s). Također možeš pročitati o " "[licenciranju fontova](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/id.po b/frontend/translations/id.po index 47c404d81..968eb1733 100644 --- a/frontend/translations/id.po +++ b/frontend/translations/id.po @@ -610,7 +610,7 @@ msgstr "" "Anda seharusnya hanya mengunggah fon yang Anda miliki atau memiliki izin " "untuk menggunakannya dalam Penpot. Ketahui lebih lanjut dalam bagian Hak " "konten (Content rights) dari [Ketentuan Layanan " -"Penpot](https://penpot.app/terms.html). Anda mungkin juga ingin membaca " +"Penpot](%s). Anda mungkin juga ingin membaca " "tentang [lisensi fon](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/it.po b/frontend/translations/it.po index 607296f52..259eb2024 100644 --- a/frontend/translations/it.po +++ b/frontend/translations/it.po @@ -615,7 +615,7 @@ msgstr "" "È consigliabile caricare unicamente font di cui si è proprietari o dei " "quali si possiede la licenza d'uso in Penpot. Ulteriori informazioni sui " "diritti dei contenuti sono disponibili nella sezione [Termini di Servizio " -"di Penpot](https://penpot.app/terms.html). Potresti anche voler " +"di Penpot](%s). Potresti anche voler " "approfondire le [licenze per i font](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/lt.po b/frontend/translations/lt.po index ce52fa6e2..5cb215ddc 100644 --- a/frontend/translations/lt.po +++ b/frontend/translations/lt.po @@ -412,7 +412,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Turėtumėte įkelti tik tuos šriftus, kurie jums priklauso arba kuriuos " "turite licenciją naudoti \"Penpot\". Daugiau informacijos rasite " -"[Penpot'paslaugų teikimo sąlygų](https://penpot.app/terms.html) skyriuje " +"[Penpot'paslaugų teikimo sąlygų](%s) skyriuje " "\"Turinio teisės\". Taip pat galite paskaityti apie [šriftų " "licencijavimą](https://www.typography.com/faq)." diff --git a/frontend/translations/lv.po b/frontend/translations/lv.po index c3c108c34..fde32f76c 100644 --- a/frontend/translations/lv.po +++ b/frontend/translations/lv.po @@ -609,7 +609,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Vajadzētu augšupielādēt tikai sev piederošus fontus vai tos, kuriem ir " "licence to izmantošanai Penpot. Vairāk var uzzināt [Penpot pakalpojuma " -"sniegšanas noteikumos](https://penpot.app/terms.html). Varētu būt noderīgi " +"sniegšanas noteikumos](%s). Varētu būt noderīgi " "izlasīt arī par [fontu licencēšanu](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/ms.po b/frontend/translations/ms.po index 6984b46b1..8c128adeb 100644 --- a/frontend/translations/ms.po +++ b/frontend/translations/ms.po @@ -501,7 +501,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Anda hanya perlu memuat naik fon yang anda miliki atau mempunyai lesen " "untuk digunakan dalam Penpot. Ketahui lebih lanjut dalam bahagian Hak " -"kandungan [Syarat Perkhidmatan Penpot](https://penpot.app/terms.html). Anda " +"kandungan [Syarat Perkhidmatan Penpot](%s). Anda " "juga mungkin ingin membaca tentang [pelesenan " "fon](https://www.typography.com/faq)." diff --git a/frontend/translations/nl.po b/frontend/translations/nl.po index 5d169181d..69cfd95ba 100644 --- a/frontend/translations/nl.po +++ b/frontend/translations/nl.po @@ -612,7 +612,7 @@ msgstr "" "Je mag alleen lettertypen uploaden waarvan je de eigenaar bent of waarvoor " "je een licentie hebt om te gebruiken in Penpot. Lees meer in de sectie " "Inhoudsrechten van [Penpot's " -"Servicevoorwaarden](https://penpot.app/terms.html). Misschien wil je ook " +"Servicevoorwaarden](%s). Misschien wil je ook " "meer lezen over [lettertypelicenties](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/pl.po b/frontend/translations/pl.po index 9b0afaa00..b5f430542 100644 --- a/frontend/translations/pl.po +++ b/frontend/translations/pl.po @@ -437,7 +437,7 @@ msgstr "" "Powinieneś przesyłać tylko czcionki, których jesteś właścicielem lub " "posiadasz licencję na używanie w Penpot. Dowiedz się więcej w sekcji " "dotyczącej praw do treści w [Warunkach świadczenia usług Penpot] " -"(https://penpot.app/terms.html). Możesz też przeczytać o [licencjonowaniu " +"(%s). Możesz też przeczytać o [licencjonowaniu " "czcionek](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/pt_BR.po b/frontend/translations/pt_BR.po index 4c65c24df..94564a14f 100644 --- a/frontend/translations/pt_BR.po +++ b/frontend/translations/pt_BR.po @@ -435,7 +435,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Envie somente fontes que você possui os direitos ou tem licença para usar " "no Penpot. Descubra mais na seção de Direitos de conteúdo nos [Termos de " -"Serviço do Penpot](https://penpot.app/terms.html). Caso queira saber mais, " +"Serviço do Penpot](%s). Caso queira saber mais, " "veja esta leitura sobre [licenciamento de " "fontes](https://www.typography.com/faq)." diff --git a/frontend/translations/pt_PT.po b/frontend/translations/pt_PT.po index bf12f0d30..e23495cd0 100644 --- a/frontend/translations/pt_PT.po +++ b/frontend/translations/pt_PT.po @@ -553,7 +553,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Deves carregar tipos de letra que possuas or tenhas licença para utilizar " "no Penpot. Sabe mais na secção de Direitos de Conteúdos dos [Termos de " -"serviço do Penpot](https://penpot.app/terms.html). Podes também ler mais " +"serviço do Penpot](%s). Podes também ler mais " "sobre [licenciamento de fontes](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/ro.po b/frontend/translations/ro.po index 4f886d561..b8f591a5a 100644 --- a/frontend/translations/ro.po +++ b/frontend/translations/ro.po @@ -614,7 +614,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Ar trebui să urcați doar fonturi la care aveți drept de folosință sau " "fonturi personale. Află mai multe despre Dreptul de conținut la secțiunea " -"[Termenii și Condițiile Penpot](https://penpot.app/terms.html). De " +"[Termenii și Condițiile Penpot](%s). De " "asemenea, vă recomandăm să citiți și despre [licențierea " "fonturilor](https://www.typography.com/faq)." diff --git a/frontend/translations/ru.po b/frontend/translations/ru.po index 9ef7143d3..c3d6d1b18 100644 --- a/frontend/translations/ru.po +++ b/frontend/translations/ru.po @@ -553,7 +553,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Вам следует загружать только собственные шрифты, или у которых есть " "лицензия на использование в Penpot. Больше информации в разделе \"Content " -"rights\" в [Условиях использования Penpot](https://penpot.app/terms.html). " +"rights\" в [Условиях использования Penpot](%s). " "Также можете прочитать о [лицензированием " "шрифтов](https://www.typography.com/faq) в целом." diff --git a/frontend/translations/sr.po b/frontend/translations/sr.po index fc808c2d7..afc0f1a8a 100644 --- a/frontend/translations/sr.po +++ b/frontend/translations/sr.po @@ -553,7 +553,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Требало би да отпремате само фонтове које поседујете или за које имате " "лиценцу за коришћење у Penpot-у. Сазнајте више у одељку о правима садржаја " -"у [Условима коришћења Penpot-а](https://penpot.app/terms.html). Такође, " +"у [Условима коришћења Penpot-а](%s). Такође, " "можете прочитати о [лиценцирању фонтовa](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/sv.po b/frontend/translations/sv.po index 2565586ca..64b3c8145 100644 --- a/frontend/translations/sv.po +++ b/frontend/translations/sv.po @@ -610,7 +610,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Du bör endast ladda upp teckensnitt som du äger eller har licens att " "använda i Penpot. Läs mer i avsnittet om innehållsrättigheter i [Penpots " -"användarvillkor](https://penpot.app/terms.html). Du kanske också vill läsa " +"användarvillkor](%s). Du kanske också vill läsa " "om [licensiering av teckensnitt](https://www.typography.com/faq)." #: src/app/main/ui/dashboard/fonts.cljs:206 diff --git a/frontend/translations/th.po b/frontend/translations/th.po index 918e962f7..0f884457a 100644 --- a/frontend/translations/th.po +++ b/frontend/translations/th.po @@ -450,7 +450,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "คุณควรอัปโหลดเฉพาะฟอนต์ที่คุณเป็นเจ้าของหรือมีสิทธิ์ในการใช้งานใน Penpot " "ดูรายละอียดเพิ่มเติมในส่วนเนื้อหาของ[ข้อกำหนดการให้บริการของ " -"Penpot](https://penpot.app/terms.html) " +"Penpot](%s) " "นอกจากนี้คุณอาจต้องการอ่านเพิ่มเติมเกี่ยวกับ[ลิขสิทธิ์ฟอนต์](https://www." "typography.com/faq)" diff --git a/frontend/translations/tr.po b/frontend/translations/tr.po index 02b8e9813..b24208632 100644 --- a/frontend/translations/tr.po +++ b/frontend/translations/tr.po @@ -555,7 +555,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Sadece kendinize ait veya Penpot'ta kullanılabilecek bir lisansa sahip olan " "yazi tiplerini yükleyebilirsiniz. [Penpot'un Kullanım " -"Şartları](https://penpot.app/terms.html) içindeki İçerik hakları bölümünden " +"Şartları](%s) içindeki İçerik hakları bölümünden " "ayrıntılı bilgi alabilirsiniz. Ayrıca [yazı tipi " "lisanslama](https://www.typography.com/faq) hakkında daha fazla bilgi almak " "isteyebilirsiniz." diff --git a/frontend/translations/ukr_UA.po b/frontend/translations/ukr_UA.po index e32f97c8f..78c46a869 100644 --- a/frontend/translations/ukr_UA.po +++ b/frontend/translations/ukr_UA.po @@ -618,7 +618,7 @@ msgid "dashboard.fonts.hero-text2" msgstr "" "Ви повинні завантажувати лише ті шрифти, якими ви володієте або маєте " "ліцензію на використання в Penpot. Дізнайтеся більше в розділі \"Content " -"Rights\" в [Умовах користування Penpot](https://penpot.app/terms.html). Ви " +"Rights\" в [Умовах користування Penpot](%s). Ви " "також можете прочитати про [ліцензування " "шрифтів](https://www.typography.com/faq)." From 5e3b47e45558d403e0de5c85ad3f3dd4572a8611 Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Mon, 17 Feb 2025 16:29:28 +0100 Subject: [PATCH 4/5] :tada: Add integration test for bug (#5875) --- .../playwright/ui/specs/workspace.spec.js | 42 +++++++++++++++++++ .../main/ui/workspace/colorpicker/ramp.cljs | 2 + 2 files changed, 44 insertions(+) diff --git a/frontend/playwright/ui/specs/workspace.spec.js b/frontend/playwright/ui/specs/workspace.spec.js index 34fa61bbf..f1f876d1e 100644 --- a/frontend/playwright/ui/specs/workspace.spec.js +++ b/frontend/playwright/ui/specs/workspace.spec.js @@ -172,6 +172,48 @@ test("User adds a library and its automatically selected in the color palette", ).toBeVisible(); }); +test("Bug 10179 - Drag & drop doesn't add colors to the Recent Colors palette", async ({ + page, +}) => { + const workspacePage = new WorkspacePage(page); + await workspacePage.setupEmptyFile(); + await workspacePage.goToWorkspace(); + + await workspacePage.page.keyboard.press("Alt+p"); + + await expect( + workspacePage.palette.getByText( + "There are no color styles in your library yet", + ), + ).toBeVisible(); + + await page.getByRole("button", { name: "#E8E9EA" }).click(); + await expect(page.getByTestId("colorpicker")).toBeVisible(); + const handler = await page.getByTestId("ramp-handler"); + await expect(handler).toBeVisible(); + const saturation_selection = await page.getByTestId( + "value-saturation-selector", + ); + await expect(saturation_selection).toBeVisible(); + const saturation_box = await saturation_selection.boundingBox(); + const handler_box = await handler.boundingBox(); + await page.mouse.move( + handler_box.x + handler_box.width, + handler_box.y + handler_box.height / 2, + ); + await page.mouse.down(); + await page.mouse.move( + saturation_box.x + saturation_box.width / 2, + saturation_box.y + saturation_box.height / 2, + ); + await page.mouse.up(); + await expect( + workspacePage.palette.getByText( + "There are no color styles in your library yet", + ), + ).not.toBeVisible(); +}); + test("Bug 7489 - Workspace-palette items stay hidden when opening with keyboard-shortcut", async ({ page, }) => { diff --git a/frontend/src/app/main/ui/workspace/colorpicker/ramp.cljs b/frontend/src/app/main/ui/workspace/colorpicker/ramp.cljs index f9850579d..64879eed2 100644 --- a/frontend/src/app/main/ui/workspace/colorpicker/ramp.cljs +++ b/frontend/src/app/main/ui/workspace/colorpicker/ramp.cljs @@ -50,11 +50,13 @@ (calculate-pos event))))] [:div {:class (stl/css :value-saturation-selector) + :data-testid "value-saturation-selector" :on-pointer-down handle-start-drag :on-pointer-up handle-stop-drag :on-click calculate-pos :on-pointer-move handle-change-pointer-move} [:div {:class (stl/css :handler) + :data-testid "ramp-handler" :style {:pointer-events "none" :left (str (* 100 saturation) "%") :top (str (* 100 (- 1 (/ value 255))) "%")}}]])) From 0900b7a5729efd74f297392bff82761ea19382e2 Mon Sep 17 00:00:00 2001 From: Alonso Torres Date: Tue, 18 Feb 2025 10:17:42 +0100 Subject: [PATCH 5/5] :bug: Fix problem with grid layout duplicate positioning (#5877) --- common/src/app/common/logic/libraries.cljc | 12 ++++++------ common/src/app/common/types/shape/layout.cljc | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/src/app/common/logic/libraries.cljc b/common/src/app/common/logic/libraries.cljc index adfea7774..be9c482b5 100644 --- a/common/src/app/common/logic/libraries.cljc +++ b/common/src/app/common/logic/libraries.cljc @@ -12,7 +12,6 @@ [app.common.files.helpers :as cfh] [app.common.geom.point :as gpt] [app.common.geom.shapes :as gsh] - [app.common.geom.shapes.grid-layout :as gslg] [app.common.logging :as log] [app.common.logic.shapes :as cls] [app.common.spec :as us] @@ -226,18 +225,19 @@ changes (if (ctl/grid-layout? objects (:parent-id first-shape)) (let [target-cell (-> position meta :cell) + [row column] - (if (some? target-cell) - [(:row target-cell) (:column target-cell)] - (gslg/get-drop-cell (:parent-id first-shape) objects position))] + (when (some? target-cell) + [(:row target-cell) (:column target-cell)])] (-> changes (pcb/update-shapes [(:parent-id first-shape)] (fn [shape objects] (-> shape (ctl/assign-cells objects) - (ctl/push-into-cell [(:id first-shape)] row column) - (ctl/assign-cells objects))) + (cond-> (and (some? row) (some? column)) + (-> (ctl/push-into-cell [(:id first-shape)] row column) + (ctl/assign-cells objects))))) {:with-objects? true}) (pcb/reorder-grid-children [(:parent-id first-shape)]))) changes) diff --git a/common/src/app/common/types/shape/layout.cljc b/common/src/app/common/types/shape/layout.cljc index 84a8f0000..423e2a4d2 100644 --- a/common/src/app/common/types/shape/layout.cljc +++ b/common/src/app/common/types/shape/layout.cljc @@ -1307,9 +1307,9 @@ "Push the shapes into the row/column cell and moves the rest" [parent shape-ids row column] - (let [cells (vec (get-cells parent {:sort? true})) + (let [parent (-> parent (free-cell-shapes shape-ids)) + cells (vec (get-cells parent {:sort? true})) [start-index start-cell] (seek-indexed-cell cells row column)] - (if (some? start-cell) (let [;; start-index => to-index is the range where the shapes inserted will be added to-index (min (+ start-index (count shape-ids)) (dec (count cells)))]