Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Andrey Antukh 2025-01-30 14:38:32 +01:00
commit f554de8859
12 changed files with 69 additions and 20 deletions

View file

@ -25,7 +25,8 @@
- Fix problem with strokes not refreshing in Safari [Taiga #9040](https://tree.taiga.io/project/penpot/issue/9040) - Fix problem with strokes not refreshing in Safari [Taiga #9040](https://tree.taiga.io/project/penpot/issue/9040)
- Fix problem with multiple color changes [Taiga #9631](https://tree.taiga.io/project/penpot/issue/9631) - Fix problem with multiple color changes [Taiga #9631](https://tree.taiga.io/project/penpot/issue/9631)
## 2.4.3 (Unreleased)
## 2.4.3
### :bug: Bugs fixed ### :bug: Bugs fixed

View file

@ -42,8 +42,8 @@
(def default-params (def default-params
{::port 6060 {::port 6060
::host "0.0.0.0" ::host "0.0.0.0"
::max-body-size (* 1024 1024 30) ; default 30 MiB ::max-body-size 31457280 ; default 30 MiB
::max-multipart-body-size (* 1024 1024 120)}) ; default 120 MiB ::max-multipart-body-size 367001600}) ; default 350 MiB
(defmethod ig/expand-key ::server (defmethod ig/expand-key ::server
[k v] [k v]

View file

@ -6,4 +6,4 @@
(ns app.common.files.defaults) (ns app.common.files.defaults)
(def version 64) (def version 67)

View file

@ -1179,7 +1179,25 @@
(update data :components update-vals update-component))) (update data :components update-vals update-component)))
(defn migrate-up-63 (defn migrate-up-65
[data]
(let [update-object
(fn [object]
(d/update-when object :plugin-data d/without-nils))
update-page
(fn [page]
(-> (update-object page)
(update :objects update-vals update-object)))]
(-> data
(update-object)
(d/update-when :pages-index update-vals update-page)
(d/update-when :colors update-vals update-object)
(d/update-when :typographies update-vals update-object)
(d/update-when :components update-vals update-object))))
(defn migrate-up-66
[data] [data]
(letfn [(update-object [object] (letfn [(update-object [object]
(if (and (:rx object) (not (:r1 object))) (if (and (:rx object) (not (:r1 object)))
@ -1197,7 +1215,7 @@
(update :pages-index update-vals update-container) (update :pages-index update-vals update-container)
(update :components update-vals update-container)))) (update :components update-vals update-container))))
(defn migrate-up-64 (defn migrate-up-67
[data] [data]
(letfn [(update-object [object] (letfn [(update-object [object]
(d/update-when object :shadow #(into [] (reverse %)))) (d/update-when object :shadow #(into [] (reverse %))))
@ -1260,5 +1278,6 @@
{:id 57 :migrate-up migrate-up-57} {:id 57 :migrate-up migrate-up-57}
{:id 59 :migrate-up migrate-up-59} {:id 59 :migrate-up migrate-up-59}
{:id 62 :migrate-up migrate-up-62} {:id 62 :migrate-up migrate-up-62}
{:id 63 :migrate-up migrate-up-63} {:id 65 :migrate-up migrate-up-65}
{:id 64 :migrate-up migrate-up-64}]) {:id 66 :migrate-up migrate-up-66}
{:id 67 :migrate-up migrate-up-67}])

View file

@ -29,6 +29,15 @@ x-flags: &penpot-flags
x-uri: &penpot-public-uri x-uri: &penpot-public-uri
PENPOT_PUBLIC_URI: http://localhost:9001 PENPOT_PUBLIC_URI: http://localhost:9001
x-body-size: &penpot-http-body-size
# Max body size (30MiB); Used for plain requests, should never be
# greater than multi-part size
PENPOT_HTTP_SERVER_MAX_BODY_SIZE: 31457280
# Max multipart body size (350MiB)
PENPOT_HTTP_SERVER_MAX_MULTIPART_BODY_SIZE: 367001600
networks: networks:
penpot: penpot:
@ -103,7 +112,7 @@ services:
# - "traefik.http.routers.penpot-https.tls.certresolver=letsencrypt" # - "traefik.http.routers.penpot-https.tls.certresolver=letsencrypt"
environment: environment:
<< : *penpot-flags << : [*penpot-flags, *penpot-http-body-size]
penpot-backend: penpot-backend:
image: "penpotapp/backend:latest" image: "penpotapp/backend:latest"
@ -125,7 +134,7 @@ services:
## container. ## container.
environment: environment:
<< : [*penpot-flags, *penpot-public-uri] << : [*penpot-flags, *penpot-public-uri, *penpot-http-body-size]
## Penpot SECRET KEY. It serves as a master key from which other keys for subsystems ## Penpot SECRET KEY. It serves as a master key from which other keys for subsystems
## (eg http sessions, or invitations) are derived. ## (eg http sessions, or invitations) are derived.
@ -283,5 +292,3 @@ services:
# ports: # ports:
# - 9000:9000 # - 9000:9000
# - 9001:9001 # - 9001:9001

View file

@ -22,7 +22,9 @@ update_flags /var/www/app/js/config.js
export PENPOT_BACKEND_URI=${PENPOT_BACKEND_URI:-http://penpot-backend:6060}; export PENPOT_BACKEND_URI=${PENPOT_BACKEND_URI:-http://penpot-backend:6060};
export PENPOT_EXPORTER_URI=${PENPOT_EXPORTER_URI:-http://penpot-exporter:6061}; export PENPOT_EXPORTER_URI=${PENPOT_EXPORTER_URI:-http://penpot-exporter:6061};
export PENPOT_INTERNAL_RESOLVER=${PENPOT_INTERNAL_RESOLVER:-127.0.0.11}; export PENPOT_INTERNAL_RESOLVER=${PENPOT_INTERNAL_RESOLVER:-127.0.0.11};
export PENPOT_HTTP_SERVER_MAX_MULTIPART_BODY_SIZE=${PENPOT_HTTP_SERVER_MAX_MULTIPART_BODY_SIZE:-367001600}; # Default to 350MiB
envsubst "\$PENPOT_BACKEND_URI,\$PENPOT_EXPORTER_URI,\$PENPOT_INTERNAL_RESOLVER" < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf envsubst "\$PENPOT_BACKEND_URI,\$PENPOT_EXPORTER_URI,\$PENPOT_INTERNAL_RESOLVER,\$PENPOT_HTTP_SERVER_MAX_MULTIPART_BODY_SIZE" \
< /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
exec "$@"; exec "$@";

View file

@ -64,7 +64,7 @@ http {
listen 8080 default_server; listen 8080 default_server;
server_name _; server_name _;
client_max_body_size 100M; client_max_body_size $PENPOT_HTTP_SERVER_MAX_MULTIPART_BODY_SIZE;
charset utf-8; charset utf-8;
proxy_http_version 1.1; proxy_http_version 1.1;

View file

@ -467,6 +467,7 @@
(defn create-file (defn create-file
[{:keys [project-id name] :as params}] [{:keys [project-id name] :as params}]
(dm/assert! (uuid? project-id)) (dm/assert! (uuid? project-id))
(ptk/reify ::create-file (ptk/reify ::create-file
ev/Event ev/Event
(-data [_] {:project-id project-id}) (-data [_] {:project-id project-id})

View file

@ -169,7 +169,7 @@
(let [mdata {:on-success on-file-created} (let [mdata {:on-success on-file-created}
params {:project-id (:id project)}] params {:project-id (:id project)}]
(st/emit! (-> (dd/create-file (with-meta params mdata)) (st/emit! (-> (dd/create-file (with-meta params mdata))
(with-meta {::ev/origin origin}))))))] (with-meta {::ev/origin origin :has-files (> file-count 0)}))))))]
(mf/with-effect [project] (mf/with-effect [project]
(when project (when project

View file

@ -20,7 +20,10 @@
(mf/use-fn (mf/use-fn
(mf/deps create-fn) (mf/deps create-fn)
(fn [_] (fn [_]
(create-fn "dashboard:empty-folder-placeholder")))] (create-fn "dashboard:empty-folder-placeholder")))
show-text (mf/use-state nil)
on-mouse-enter (mf/use-fn #(reset! show-text true))
on-mouse-leave (mf/use-fn #(reset! show-text nil))]
(cond (cond
(true? dragging?) (true? dragging?)
[:ul [:ul
@ -43,9 +46,15 @@
:else :else
[:div {:class (stl/css :grid-empty-placeholder)} [:div {:class (stl/css :grid-empty-placeholder)}
(if (cf/external-feature-flag "add-file-01" "test")
[:button {:class (stl/css :create-new)
:on-click on-click
:on-mouse-enter on-mouse-enter
:on-mouse-leave on-mouse-leave}
(if @show-text (tr "dashboard.add-file") i/add)]
[:button {:class (stl/css :create-new) [:button {:class (stl/css :create-new)
:on-click on-click} :on-click on-click}
(if (cf/external-feature-flag "add-file-01" "test") (tr "dashboard.add-file") i/add)]]))) i/add])])))
(mf/defc loading-placeholder (mf/defc loading-placeholder
[] []

View file

@ -181,7 +181,7 @@
(let [mdata {:on-success on-file-created} (let [mdata {:on-success on-file-created}
params {:project-id project-id}] params {:project-id project-id}]
(st/emit! (-> (dd/create-file (with-meta params mdata)) (st/emit! (-> (dd/create-file (with-meta params mdata))
(with-meta {::ev/origin origin})))))) (with-meta {::ev/origin origin :has-files (> file-count 0)}))))))
on-create-click on-create-click
(mf/use-fn (mf/use-fn

View file

@ -358,6 +358,16 @@ export class SelectionController extends EventTarget {
detail: this.#currentStyle, detail: this.#currentStyle,
}) })
); );
} else {
const firstInline = this.#textEditor.root?.firstElementChild?.firstElementChild;
if (firstInline) {
this.#updateCurrentStyle(firstInline);
this.dispatchEvent(
new CustomEvent("stylechange", {
detail: this.#currentStyle,
}),
);
}
} }
} }