diff --git a/CHANGES.md b/CHANGES.md index b46412d2ef..cc3aab50e7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,6 @@ # CHANGELOG +<<<<<<< HEAD ## :rocket: Next ### :boom: Breaking changes & Deprecations @@ -28,6 +29,8 @@ - To @ondrejkonec: for contributing to the code with: - Refactor CSS variables [Github #2948](https://github.com/penpot/penpot/pull/2948) +======= +>>>>>>> origin/staging ## 1.17.3 ### :bug: Bugs fixed @@ -35,6 +38,14 @@ - Fix custom fonts not rendered correctly [Taiga #4874](https://tree.taiga.io/project/penpot/issue/4874) - Fix problem with shadows and blur on multiple selection - Fix problem with redo shortcut +- Fix Component texts not displayed in assets panel [Taiga #4907](https://tree.taiga.io/project/penpot/issue/4907) +- Fix search field has implemented shared styles for "close icon" and "search icon" [Taiga #4927](https://tree.taiga.io/project/penpot/issue/4927) +- Fix Handling correctly slashes "/" in emails [Taiga #4906](https://tree.taiga.io/project/penpot/issue/4906) +- Fix Change text color from selected colors [Taiga #4933](https://tree.taiga.io/project/penpot/issue/4933) + +### :sparkles: Enhancements + +- Adds environment variables for specifying the export and backend URI for the frontend docker image, thanks to @Supernova3339 for the initial PR and suggestion [Github #2984](https://github.com/penpot/penpot/issues/2984) ## 1.17.2 diff --git a/common/src/app/common/spec.cljc b/common/src/app/common/spec.cljc index 2ec2279255..65926a005f 100644 --- a/common/src/app/common/spec.cljc +++ b/common/src/app/common/spec.cljc @@ -112,7 +112,7 @@ ;; --- SPEC: email -(def email-re #"[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+") +(def email-re #"[a-zA-Z0-9_.+-\\\\]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+") (defn parse-email [s] diff --git a/docker/images/Dockerfile.frontend b/docker/images/Dockerfile.frontend index 84b2493dc5..af5101b299 100644 --- a/docker/images/Dockerfile.frontend +++ b/docker/images/Dockerfile.frontend @@ -8,7 +8,7 @@ RUN set -ex; \ ADD ./bundle-frontend/ /var/www/app/ ADD ./files/config.js /var/www/app/js/config.js -ADD ./files/nginx.conf /etc/nginx/nginx.conf +ADD ./files/nginx.conf /etc/nginx/nginx.conf.template ADD ./files/nginx-entrypoint.sh /entrypoint.sh ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] diff --git a/docker/images/files/nginx-entrypoint.sh b/docker/images/files/nginx-entrypoint.sh index 1e349e5866..d8fc935675 100644 --- a/docker/images/files/nginx-entrypoint.sh +++ b/docker/images/files/nginx-entrypoint.sh @@ -1,9 +1,5 @@ #!/usr/bin/env bash -log() { - echo "[$(date +%Y-%m-%dT%H:%M:%S%:z)] $*" -} - ######################################### ## App Frontend config ######################################### @@ -17,4 +13,15 @@ update_flags() { } update_flags /var/www/app/js/config.js + + +######################################### +## Nginx Config +######################################### + +export PENPOT_BACKEND_URI=${PENPOT_BACKEND_URI:-http://penpot-backend:6060}; +export PENPOT_EXPORTER_URI=${PENPOT_EXPORTER_URI:-http://penpot-exporter}; + +envsubst "\$PENPOT_BACKEND_URI,\$PENPOT_EXPORTER_URI" < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf + exec "$@"; diff --git a/docker/images/files/nginx.conf b/docker/images/files/nginx.conf index a43f3bf66d..34b01a2efc 100644 --- a/docker/images/files/nginx.conf +++ b/docker/images/files/nginx.conf @@ -82,7 +82,7 @@ http { } location /assets { - proxy_pass http://penpot-backend:6060/assets; + proxy_pass $PENPOT_BACKEND_URI/assets; recursive_error_pages on; proxy_intercept_errors on; error_page 301 302 307 = @handle_redirect; @@ -95,21 +95,17 @@ http { } location /api/export { - proxy_pass http://penpot-exporter:6061; + proxy_pass $PENPOT_EXPORTER_URI; } location /api { - proxy_pass http://penpot-backend:6060/api; + proxy_pass $PENPOT_BACKEND_URI/api; } - # location /admin { - # proxy_pass http://penpot-admin:6065/admin; - # } - location /ws/notifications { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; - proxy_pass http://penpot-backend:6060/ws/notifications; + proxy_pass $PENPOT_BACKEND_URI/ws/notifications; } location / { diff --git a/frontend/resources/styles/main/partials/dashboard-sidebar.scss b/frontend/resources/styles/main/partials/dashboard-sidebar.scss index 986035aeea..128265a401 100644 --- a/frontend/resources/styles/main/partials/dashboard-sidebar.scss +++ b/frontend/resources/styles/main/partials/dashboard-sidebar.scss @@ -337,15 +337,15 @@ fill: $color-gray-30; height: 15px; width: 15px; - - &:hover { - fill: $color-danger; - } } } .clear-search svg { transform: rotate(45deg); + + &:hover { + fill: $color-danger; + } } } diff --git a/frontend/src/app/main/data/workspace/colors.cljs b/frontend/src/app/main/data/workspace/colors.cljs index c63ec6f6a0..b80654cae5 100644 --- a/frontend/src/app/main/data/workspace/colors.cljs +++ b/frontend/src/app/main/data/workspace/colors.cljs @@ -338,7 +338,7 @@ (defn change-text-color [old-color new-color index node] - (let [fills (:fills node) + (let [fills (map #(dissoc % :fill-color-ref-id :fill-color-ref-file) (:fills node)) parsed-color (d/without-nils (color-att->text old-color)) parsed-new-color (d/without-nils (color-att->text new-color)) has-color? (d/index-of fills parsed-color)] diff --git a/frontend/src/app/main/render.cljs b/frontend/src/app/main/render.cljs index 7e22ea699f..ff2c24ee87 100644 --- a/frontend/src/app/main/render.cljs +++ b/frontend/src/app/main/render.cljs @@ -287,7 +287,6 @@ :fill "none"} [:& shape-wrapper {:shape frame}]]])) - ;; Component for rendering a thumbnail of a single componenent. Mainly ;; used to render thumbnails on assets panel. (mf/defc component-svg @@ -334,7 +333,8 @@ :fill "none"} [:> shape-container {:shape root-shape} - [:& root-shape-wrapper {:shape root-shape :view-box vbox}]]])) + [:& (mf/provider muc/is-component?) {:value true} + [:& root-shape-wrapper {:shape root-shape :view-box vbox}]]]])) (mf/defc object-svg {::mf/wrap [mf/memo]} @@ -468,7 +468,7 @@ (let [texts (->> objects (vals) (filterv #(= (:type %) :text)) - (mapv :content)) ] + (mapv :content))] (->> (rx/from texts) (rx/map fonts/get-content-fonts) diff --git a/frontend/src/app/main/ui/context.cljs b/frontend/src/app/main/ui/context.cljs index 3b0f84bf15..244dbe9c22 100644 --- a/frontend/src/app/main/ui/context.cljs +++ b/frontend/src/app/main/ui/context.cljs @@ -27,3 +27,4 @@ (def current-zoom (mf/create-context nil)) (def workspace-read-only? (mf/create-context nil)) +(def is-component? (mf/create-context false)) diff --git a/frontend/src/app/main/ui/shapes/text.cljs b/frontend/src/app/main/ui/shapes/text.cljs index 26fdf23c7e..9dda49dad5 100644 --- a/frontend/src/app/main/ui/shapes/text.cljs +++ b/frontend/src/app/main/ui/shapes/text.cljs @@ -8,6 +8,8 @@ (:require [app.common.text :as txt] [app.main.fonts :as fonts] + [app.main.ui.context :as ctx] + [app.main.ui.shapes.text.fo-text :as fo] [app.main.ui.shapes.text.svg-text :as svg] [app.util.object :as obj] [rumext.v2 :as mf])) @@ -22,10 +24,13 @@ (mf/defc text-shape {::mf/wrap-props false} [props] - (let [{:keys [position-data content] :as shape} (obj/get props "shape")] + (let [{:keys [position-data content] :as shape} (obj/get props "shape") + is-component? (mf/use-ctx ctx/is-component?)] (mf/with-memo [content] (load-fonts! content)) - (when (some? position-data) - [:> svg/text-shape props]))) + ;; Old components can have texts without position data that must be rendered via foreign key + (cond + (some? position-data) [:> svg/text-shape props] + is-component? [:> fo/text-shape props]))) diff --git a/frontend/translations/ar.po b/frontend/translations/ar.po index 1f1325bd1b..73806e3a40 100644 --- a/frontend/translations/ar.po +++ b/frontend/translations/ar.po @@ -400,6 +400,7 @@ msgstr[3] "عدد قليل من الخطوط المضافة" msgstr[4] "تمت إضافة العديد من الخطوط" msgstr[5] "" +#, markdown msgid "dashboard.fonts.hero-text1" msgstr "" "ستتم إضافة أي خط ويب تقوم بتحميله هنا إلى قائمة عائلة الخطوط المتوفرة في " @@ -407,6 +408,7 @@ msgstr "" "عائلة الخطوط على أنها ** عائلة خط واحدة **. يمكنك تحميل الخطوط بالتنسيقات " "التالية: ** TTF و OTF و WOFF ** (ستحتاج إلى تنسيق واحد فقط)." +#, markdown msgid "dashboard.fonts.hero-text2" msgstr "" "يجب عليك فقط تحميل الخطوط التي تمتلكها أو لديك ترخيص لاستخدامها في Penpot. " diff --git a/frontend/translations/de.po b/frontend/translations/de.po index a1d478987e..812d019874 100644 --- a/frontend/translations/de.po +++ b/frontend/translations/de.po @@ -409,6 +409,7 @@ msgid_plural "dashboard.fonts.fonts-added" msgstr[0] "1 Schriftart hinzugefügt" msgstr[1] "%s Schriftarten hinzugefügt" +#, markdown msgid "dashboard.fonts.hero-text1" msgstr "" "Jede Webschriftart, die Sie hier hochladen, wird der Liste der Schriftarten " @@ -418,6 +419,7 @@ msgstr "" "den folgenden Formaten hochladen: **TTF, OTF und WOFF** (nur eine wird " "benötigt)." +#, markdown msgid "dashboard.fonts.hero-text2" msgstr "" "Sie sollten nur Schriftarten hochladen, die Sie besitzen oder für die Sie " diff --git a/frontend/translations/en.po b/frontend/translations/en.po index 16c448f36f..866a324a0c 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -780,7 +780,7 @@ msgstr "The email «%s» has been reported as spam or permanently bounce." #: src/app/main/errors.cljs msgid "errors.feature-mismatch" msgstr "" -"Looks like you are opening a file that has the feature '%s' enabled bug " +"Looks like you are opening a file that has the feature '%s' enabled but " "your penpot frontend does not supports it or has it disabled." #: src/app/main/errors.cljs diff --git a/frontend/translations/es.po b/frontend/translations/es.po index 4fae8acc92..8b50b06cf6 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -407,6 +407,7 @@ msgid_plural "dashboard.fonts.fonts-added" msgstr[0] "1 fuente añadida" msgstr[1] "%s fuentes añadidas" +#, markdown msgid "dashboard.fonts.hero-text1" msgstr "" "Cualquier fuente personalizada añadida aquí aparecerá en la lista de " @@ -415,6 +416,7 @@ msgstr "" "como una **única familia de fuentes**. Se pueden cargar fuentes con los " "siguientes formatos: **TTF, OTF and WOFF** (con uno es suficiente)." +#, markdown msgid "dashboard.fonts.hero-text2" msgstr "" "Sólo deberías cargar fuentes que te pertenecen o de las que tienes una " diff --git a/frontend/translations/fr.po b/frontend/translations/fr.po index 50851bdab4..34e7f93c07 100644 --- a/frontend/translations/fr.po +++ b/frontend/translations/fr.po @@ -411,6 +411,7 @@ msgid_plural "dashboard.fonts.fonts-added" msgstr[0] "1 police ajoutée" msgstr[1] "%s polices ajoutées" +#, markdown msgid "dashboard.fonts.hero-text1" msgstr "" "Toute police Web que vous téléchargez sera ajoutée à la liste de polices de " @@ -419,6 +420,7 @@ msgstr "" "**une seule famille de polices**. Vous pouvez télécharger les polices au " "formats suivants : **TTF, OTF et WOFF** (un seul format est nécessaire)." +#, markdown msgid "dashboard.fonts.hero-text2" msgstr "" "Ne téléchargez que des polices que vous possédez ou dont la license vous " diff --git a/frontend/translations/gl.po b/frontend/translations/gl.po index 2c0d4a272d..d56a876529 100644 --- a/frontend/translations/gl.po +++ b/frontend/translations/gl.po @@ -401,6 +401,7 @@ msgid_plural "dashboard.fonts.fonts-added" msgstr[0] "Engadiuse 1 fonte" msgstr[1] "Engadíronse % fontes" +#, markdown msgid "dashboard.fonts.hero-text1" msgstr "" "Calquera fonte que cargues aquí engadirase na listaxe de familias de fontes " @@ -409,6 +410,7 @@ msgstr "" "Podes cargar fontes cos seguintes formatos: **TTF, OFT e WOFF** (só se " "precisa un)." +#, markdown msgid "dashboard.fonts.hero-text2" msgstr "" "Só debes cargar fontes da túa propiedade ou das que teñas licenza para usar " diff --git a/frontend/translations/he.po b/frontend/translations/he.po index 42c8df443f..0f9258a4ae 100644 --- a/frontend/translations/he.po +++ b/frontend/translations/he.po @@ -390,6 +390,7 @@ msgstr[1] "נוספו 2 גופנים" msgstr[2] "נוספו %s גופנים" msgstr[3] "נוספו %s גופנים" +#, markdown msgid "dashboard.fonts.hero-text1" msgstr "" "כל גופן דפדפן שיועלה כאן יתווסף לרשימת משפחת הגופנים שזמין במאפייני הטקסט " @@ -397,6 +398,7 @@ msgstr "" "גופנים יחידה**. ניתן להעלות גופנים מהסוגים הבאים: **TTF,‏ OTF ו־WOFF** (אחד " "הסוגים יספיק)." +#, markdown msgid "dashboard.fonts.hero-text2" msgstr "" "עליך להעלות גופנים בבעלותך או שיש לך רישיון להשתמש בהם ב־Penpot. ניתן למצוא " diff --git a/frontend/translations/it.po b/frontend/translations/it.po index 325071d05b..586ad43540 100644 --- a/frontend/translations/it.po +++ b/frontend/translations/it.po @@ -398,6 +398,7 @@ msgid_plural "dashboard.fonts.fonts-added" msgstr[0] "1 font aggiunto" msgstr[1] "%s font aggiunti" +#, markdown msgid "dashboard.fonts.hero-text1" msgstr "" "Qualsiasi font web caricato qui verrà aggiunto alla lista dei font family " @@ -406,6 +407,7 @@ msgstr "" "**singolo font family**. È possibile caricare font con i seguenti " "formati:**TTF, OTF e WOFF**(uno solo di questi è necessario)." +#, markdown msgid "dashboard.fonts.hero-text2" msgstr "" "È consigliabile caricare unicamente font di cui si è proprietari o dei "