0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-27 23:21:47 -05:00

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

This commit is contained in:
Andrey Antukh 2022-03-07 13:11:38 +01:00
commit 7f8c217e7c
9 changed files with 43 additions and 18 deletions

View file

@ -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

View file

@ -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]

View file

@ -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)]

View file

@ -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))

View file

@ -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)]

View file

@ -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]))

View file

@ -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))

View file

@ -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 {

View file

@ -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]}]