diff --git a/CHANGES.md b/CHANGES.md index 05fa25ce0e..36a66f1de2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,17 @@ # CHANGELOG +## 1.12.1-beta +### :boom: Breaking changes + +### :sparkles: New features + +### :bug: Bugs fixed + +- Fix length of names in sidebar [Taiga #2962](https://tree.taiga.io/project/penpot/issue/2962) +- Fix issues on loki integration + +### :heart: Community contributions by (Thank you!) + ## 1.12.0-beta ### :boom: Breaking changes diff --git a/backend/src/app/loggers/loki.clj b/backend/src/app/loggers/loki.clj index 228877789b..d9631179e9 100644 --- a/backend/src/app/loggers/loki.clj +++ b/backend/src/app/loggers/loki.clj @@ -52,14 +52,14 @@ (let [labels {:host (cfg/get :host) :tenant (cfg/get :tenant) :version (:full cfg/version) - :logger (:logger event) - :level (:level event)}] + :logger (:logger/name event) + :level (:logger/level event)}] {:streams [{:stream labels :values [[(str (* (inst-ms (:created-at event)) 1000000)) (str (:message event) - (when-let [error (:error event)] - (str "\n" (:trace error))))]]}]})) + (when-let [error (:trace event)] + (str "\n" error)))]]}]})) (defn- send-log [uri payload i] diff --git a/backend/src/app/rpc/mutations/profile.clj b/backend/src/app/rpc/mutations/profile.clj index 4e2d207c8a..07f3866b6f 100644 --- a/backend/src/app/rpc/mutations/profile.clj +++ b/backend/src/app/rpc/mutations/profile.clj @@ -350,7 +350,6 @@ :opt-un [::lang ::theme])) (sv/defmethod ::update-profile - {::async/dispatch :default} [{:keys [pool] :as cfg} params] (db/with-atomic [conn pool] (let [profile (update-profile conn params)] diff --git a/backend/src/app/util/websocket.clj b/backend/src/app/util/websocket.clj index 6acbd9e363..1562dec30d 100644 --- a/backend/src/app/util/websocket.clj +++ b/backend/src/app/util/websocket.clj @@ -106,7 +106,7 @@ on-message (fn [_ message] - (mtx/run! metrics {:id :websocket-messages-total :labels ["send"] :inc 1}) + (mtx/run! metrics {:id :websocket-messages-total :labels ["recv"] :inc 1}) (try (let [message (t/decode-str message)] (a/offer! input-ch message)) diff --git a/backend/src/app/worker.clj b/backend/src/app/worker.clj index 44b72f63a5..cf19b41385 100644 --- a/backend/src/app/worker.clj +++ b/backend/src/app/worker.clj @@ -79,9 +79,9 @@ (letfn [(log-stats [scheduler state] (doseq [[key ^ForkJoinPool executor] executors] (let [labels (into-array String [(name key)]) - active (.getActiveThreadCount executor) running (.getRunningThreadCount executor) queued (.getQueuedSubmissionCount executor) + active (.getPoolSize executor) steals (.getStealCount executor) steals-increment (- steals (or (get-in @state [key :steals]) 0)) steals-increment (if (neg? steals-increment) 0 steals-increment)] diff --git a/common/src/app/common/spec/change.cljc b/common/src/app/common/spec/change.cljc index b38aa3e85f..db9847b753 100644 --- a/common/src/app/common/spec/change.cljc +++ b/common/src/app/common/spec/change.cljc @@ -6,6 +6,7 @@ (ns app.common.spec.change (:require + [app.common.spec :as us] [app.common.spec.color :as color] [app.common.spec.file :as file] [app.common.spec.page :as page] @@ -124,16 +125,25 @@ (defmethod change-spec :add-recent-color [_] (s/keys :req-un [:internal.changes.add-recent-color/color])) -(s/def :internal.changes.media/object ::file/media-object) +(s/def :internal.changes.add-media/object ::file/media-object) (defmethod change-spec :add-media [_] - (s/keys :req-un [:internal.changes.media/object])) + (s/keys :req-un [:internal.changes.add-media/object])) -(s/def :internal.changes.media.mod/object - (s/and ::file/media-object #(contains? % :id))) + +(s/def :internal.changes.mod-media/width ::us/safe-integer) +(s/def :internal.changes.mod-media/height ::us/safe-integer) +(s/def :internal.changes.mod-media/path (s/nilable string?)) +(s/def :internal.changes.mod-media/mtype string?) +(s/def :internal.changes.mod-media/object + (s/keys :req-un [::id] + :opt-un [:internal.changes.mod-media/width + :internal.changes.mod-media/height + :internal.changes.mod-media/path + :internal.changes.mod-media/mtype])) (defmethod change-spec :mod-media [_] - (s/keys :req-un [:internal.changes.media.mod/object])) + (s/keys :req-un [:internal.changes.mod-media/object])) (defmethod change-spec :del-media [_] (s/keys :req-un [::id])) diff --git a/common/src/app/common/spec/file.cljc b/common/src/app/common/spec/file.cljc index a1e538ecc2..2affdafbda 100644 --- a/common/src/app/common/spec/file.cljc +++ b/common/src/app/common/spec/file.cljc @@ -17,12 +17,18 @@ (s/def :internal.media-object/height ::us/safe-integer) (s/def :internal.media-object/mtype string?) +;; NOTE: This is marked as nilable for backward compatibility, but +;; right now is just exists or not exists. We can thin in a gradual +;; migration and then mark it as not nilable. +(s/def :internal.media-object/path (s/nilable string?)) + (s/def ::media-object (s/keys :req-un [::id ::name :internal.media-object/width :internal.media-object/height - :internal.media-object/mtype])) + :internal.media-object/mtype] + :opt-un [:internal.media-object/path])) (s/def ::colors (s/map-of uuid? ::color/color)) diff --git a/frontend/resources/styles/main/partials/sidebar-layers.scss b/frontend/resources/styles/main/partials/sidebar-layers.scss index e8747f1325..666319fe60 100644 --- a/frontend/resources/styles/main/partials/sidebar-layers.scss +++ b/frontend/resources/styles/main/partials/sidebar-layers.scss @@ -183,21 +183,19 @@ } input.element-name { - max-width: 130px; - width: 100%; + max-width: 75%; } span.element-name { color: $color-gray-20; display: block; font-size: $fs12; - max-width: 130px; + max-width: 75%; min-width: 40px; min-height: 16px; overflow-x: hidden; text-overflow: ellipsis; white-space: nowrap; - width: 100%; } .element-actions { diff --git a/frontend/src/app/main/ui/workspace/textpalette.cljs b/frontend/src/app/main/ui/workspace/textpalette.cljs index 4d9ca61586..10a71aab5e 100644 --- a/frontend/src/app/main/ui/workspace/textpalette.cljs +++ b/frontend/src/app/main/ui/workspace/textpalette.cljs @@ -51,7 +51,7 @@ (when-not name-only? [:* [:div.typography-font (:name font-data)] - [:div.typography-data (str (:font-size typography) "pt | " (:name variant-data))]])])) + [:div.typography-data (str (:font-size typography) "px | " (:name variant-data))]])])) (mf/defc palette [{:keys [selected-ids current-file-id file-typographies shared-libs]}]