mirror of
https://github.com/penpot/penpot.git
synced 2025-03-18 10:41:29 -05:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
888ffa1bcd
13 changed files with 90 additions and 62 deletions
13
CHANGES.md
13
CHANGES.md
|
@ -23,6 +23,19 @@
|
|||
- Readability improvements of user guide (by @PaulSchulz) [Penpot-docs #50](https://github.com/penpot/penpot-docs/pull/50).
|
||||
|
||||
|
||||
# 1.10.2-beta
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
- Fix corner case issues with media file uploads.
|
||||
- Fix issue with default page grids validation.
|
||||
- Fix issue related to some raceconditions on workspace navigation events.
|
||||
|
||||
### :arrow_up: Deps updates
|
||||
|
||||
- Update log4j2 dependency.
|
||||
|
||||
|
||||
# 1.10.1-beta
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
|
|
@ -2,13 +2,18 @@
|
|||
|
||||
export PENPOT_FLAGS="enable-asserts enable-audit-log $PENPOT_FLAGS"
|
||||
|
||||
export OPTIONS="-A:jmx-remote:dev \
|
||||
-J-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager \
|
||||
-J-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector \
|
||||
-J-Dlog4j2.configurationFile=log4j2-devenv.xml \
|
||||
-J-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory \
|
||||
-J-XX:+UseShenandoahGC -J-XX:-OmitStackTraceInFastThrow -J-Xms50m -J-Xmx512m";
|
||||
#-J-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
|
||||
|
||||
export OPTIONS="
|
||||
-A:jmx-remote:dev \
|
||||
-J-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager \
|
||||
-J-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory \
|
||||
-J-Dlog4j2.configurationFile=log4j2-devenv.xml \
|
||||
-J-XX:+UseShenandoahGC \
|
||||
-J-XX:-OmitStackTraceInFastThrow \
|
||||
-J-Xms50m -J-Xmx512m";
|
||||
|
||||
# export OPTIONS="$OPTIONS -J-XX:+UnlockDiagnosticVMOptions";
|
||||
# export OPTIONS="$OPTIONS -J-XX:-TieredCompilation -J-XX:CompileThreshold=10000";
|
||||
|
||||
export OPTIONS_EVAL="nil"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
(ns app.loggers.zmq
|
||||
"A generic ZMQ listener."
|
||||
(:require
|
||||
[app.common.exceptions :as ex]
|
||||
[app.common.logging :as l]
|
||||
[app.common.spec :as us]
|
||||
[app.util.json :as json]
|
||||
|
@ -14,7 +15,8 @@
|
|||
[clojure.core.async :as a]
|
||||
[clojure.spec.alpha :as s]
|
||||
[cuerdas.core :as str]
|
||||
[integrant.core :as ig])
|
||||
[integrant.core :as ig]
|
||||
[jsonista.core :as j])
|
||||
(:import
|
||||
org.zeromq.SocketType
|
||||
org.zeromq.ZMQ$Socket
|
||||
|
@ -33,7 +35,7 @@
|
|||
(l/info :msg "initializing ZMQ receiver" :bind endpoint)
|
||||
(let [buffer (a/chan 1)
|
||||
output (a/chan 1 (comp (filter map?)
|
||||
(map prepare)))
|
||||
(keep prepare)))
|
||||
mult (a/mult output)]
|
||||
(when endpoint
|
||||
(a/thread (start-rcv-loop {:out buffer :endpoint endpoint})))
|
||||
|
@ -52,6 +54,11 @@
|
|||
[_ f]
|
||||
(a/close! (::buffer (meta f))))
|
||||
|
||||
(def json-mapper
|
||||
(j/object-mapper
|
||||
{:encode-key-fn str/camel
|
||||
:decode-key-fn (comp keyword str/kebab)}))
|
||||
|
||||
(defn- start-rcv-loop
|
||||
([] (start-rcv-loop nil))
|
||||
([{:keys [out endpoint] :or {endpoint "tcp://localhost:5556"}}]
|
||||
|
@ -63,7 +70,7 @@
|
|||
(.. socket (setReceiveTimeOut 5000))
|
||||
(loop []
|
||||
(let [msg (.recv ^ZMQ$Socket socket)
|
||||
msg (json/decode msg)
|
||||
msg (ex/ignoring (j/read-value msg json-mapper))
|
||||
msg (if (nil? msg) :empty msg)]
|
||||
(if (a/>!! out msg)
|
||||
(recur)
|
||||
|
@ -71,18 +78,35 @@
|
|||
(.close ^java.lang.AutoCloseable socket)
|
||||
(.close ^java.lang.AutoCloseable zctx))))))))
|
||||
|
||||
|
||||
(s/def ::logger-name string?)
|
||||
(s/def ::level string?)
|
||||
(s/def ::thread string?)
|
||||
(s/def ::time-millis integer?)
|
||||
(s/def ::message string?)
|
||||
(s/def ::context-map map?)
|
||||
(s/def ::throw map?)
|
||||
|
||||
(s/def ::log4j-event
|
||||
(s/keys :req-un [::logger-name ::level ::thread ::time-millis ::message]
|
||||
:opt-un [::context-map ::thrown]))
|
||||
|
||||
(defn- prepare
|
||||
[event]
|
||||
(merge
|
||||
{:logger (:loggerName event)
|
||||
:level (str/lower (:level event))
|
||||
:thread (:thread event)
|
||||
:created-at (dt/instant (:timeMillis event))
|
||||
:message (:message event)}
|
||||
(when-let [ctx (:contextMap event)]
|
||||
{:context ctx})
|
||||
(when-let [thrown (:thrown event)]
|
||||
{:error
|
||||
{:class (:name thrown)
|
||||
:message (:message thrown)
|
||||
:trace (:extendedStackTrace thrown)}})))
|
||||
(if (s/valid? ::log4j-event event)
|
||||
(merge
|
||||
{:logger (:logger-name event)
|
||||
:level (str/lower (:level event))
|
||||
:thread (:thread event)
|
||||
:created-at (dt/instant (:time-millis event))
|
||||
:message (:message event)}
|
||||
(when-let [ctx (:context-map event)]
|
||||
{:context ctx})
|
||||
(when-let [thrown (:thrown event)]
|
||||
{:error
|
||||
{:class (:name thrown)
|
||||
:message (:message thrown)
|
||||
:trace (:extended-stack-trace thrown)}}))
|
||||
(do
|
||||
(l/warn :hint "invalid event" :event event)
|
||||
nil)))
|
||||
|
|
|
@ -158,7 +158,6 @@
|
|||
|
||||
nil)))
|
||||
|
||||
|
||||
;; --- Mutation: Delete Team
|
||||
|
||||
(s/def ::delete-team
|
||||
|
|
|
@ -7,18 +7,13 @@
|
|||
org.clojure/clojurescript {:mvn/version "1.10.891"}
|
||||
|
||||
;; Logging
|
||||
org.clojure/tools.logging {:mvn/version "1.1.0"}
|
||||
org.apache.logging.log4j/log4j-api {:mvn/version "2.16.0"}
|
||||
org.apache.logging.log4j/log4j-core {:mvn/version "2.16.0"}
|
||||
org.apache.logging.log4j/log4j-web {:mvn/version "2.16.0"}
|
||||
org.apache.logging.log4j/log4j-jul {:mvn/version "2.16.0"}
|
||||
org.apache.logging.log4j/log4j-slf4j18-impl {:mvn/version "2.16.0"}
|
||||
org.clojure/tools.logging {:mvn/version "1.2.3"}
|
||||
org.apache.logging.log4j/log4j-api {:mvn/version "2.17.0"}
|
||||
org.apache.logging.log4j/log4j-core {:mvn/version "2.17.0"}
|
||||
org.apache.logging.log4j/log4j-web {:mvn/version "2.17.0"}
|
||||
org.apache.logging.log4j/log4j-jul {:mvn/version "2.17.0"}
|
||||
org.apache.logging.log4j/log4j-slf4j18-impl {:mvn/version "2.17.0"}
|
||||
org.slf4j/slf4j-api {:mvn/version "2.0.0-alpha1"}
|
||||
org.slf4j/jcl-over-slf4j {:mvn/version "2.0.0-alpha1"}
|
||||
org.slf4j/log4j-over-slf4j {:mvn/version "2.0.0-alpha1"}
|
||||
org.slf4j/osgi-over-slf4j {:mvn/version "2.0.0-alpha1"}
|
||||
org.slf4j/jul-to-slf4j {:mvn/version "2.0.0-alpha1"}
|
||||
com.lmax/disruptor {:mvn/version "3.4.4"}
|
||||
|
||||
selmer/selmer {:mvn/version "1.12.45"}
|
||||
expound/expound {:mvn/version "0.8.10"}
|
||||
|
|
|
@ -65,8 +65,7 @@
|
|||
}
|
||||
|
||||
.af-divider-block {
|
||||
margin-bottom: 2rem;
|
||||
|
||||
/* margin-bottom: 2rem; */
|
||||
p {
|
||||
&::after,
|
||||
&::before {
|
||||
|
@ -101,7 +100,7 @@
|
|||
}
|
||||
|
||||
.af-field-input {
|
||||
margin: 2rem 0;
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
|
||||
.af-choice-option input:checked+label:before,
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(declare fetch-projects)
|
||||
(declare fetch-team-members)
|
||||
|
||||
(defn initialize
|
||||
[{:keys [id] :as params}]
|
||||
|
@ -85,6 +86,7 @@
|
|||
(rx/merge
|
||||
(ptk/watch (df/load-team-fonts id) state stream)
|
||||
(ptk/watch (fetch-projects) state stream)
|
||||
(ptk/watch (fetch-team-members) state stream)
|
||||
(ptk/watch (du/fetch-teams) state stream)
|
||||
(ptk/watch (du/fetch-users {:team-id id}) state stream)))))
|
||||
|
||||
|
|
|
@ -145,7 +145,8 @@
|
|||
(rx/mapcat (fn [profile]
|
||||
(if (= uuid/zero (:id profile))
|
||||
(rx/empty)
|
||||
(rx/of (fetch-teams))))))))))
|
||||
(rx/of (fetch-teams)))))
|
||||
(rx/observe-on :async))))))
|
||||
|
||||
;; --- EVENT: login
|
||||
|
||||
|
@ -155,13 +156,8 @@
|
|||
accepting invitation, or third party auth signup or singin."
|
||||
[profile]
|
||||
(letfn [(get-redirect-event []
|
||||
(if-let [{:keys [data path-params query-params]} (::redirect-to @storage)]
|
||||
(do
|
||||
(swap! storage dissoc ::redirect-to)
|
||||
(rt/nav' (:name data) path-params query-params))
|
||||
(let [team-id (:default-team-id profile)]
|
||||
(rt/nav' :dashboard-projects {:team-id team-id}))))]
|
||||
|
||||
(let [team-id (:default-team-id profile)]
|
||||
(rt/nav' :dashboard-projects {:team-id team-id})))]
|
||||
(ptk/reify ::logged-in
|
||||
IDeref
|
||||
(-deref [_] profile)
|
||||
|
@ -254,17 +250,13 @@
|
|||
(with-meta profile
|
||||
{::ev/source "register"})))
|
||||
(rx/map logged-in)
|
||||
(rx/observe-on :async))))
|
||||
|
||||
ptk/EffectEvent
|
||||
(effect [_ _ _]
|
||||
(swap! storage dissoc ::redirect-to))))
|
||||
(rx/observe-on :async))))))
|
||||
|
||||
;; --- EVENT: logout
|
||||
|
||||
(defn logged-out
|
||||
([] (logged-out {}))
|
||||
([{:keys [capture-redirect?] :or {capture-redirect? false}}]
|
||||
([_params]
|
||||
(ptk/reify ::logged-out
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
|
@ -278,10 +270,8 @@
|
|||
(rx/observe-on :async)))
|
||||
|
||||
ptk/EffectEvent
|
||||
(effect [_ state _]
|
||||
(when capture-redirect?
|
||||
(let [route (into {} (:route state))]
|
||||
(reset! storage {::redirect-to route})))
|
||||
(effect [_ _ _]
|
||||
(reset! storage {})
|
||||
(i18n/reset-locale)))))
|
||||
|
||||
(defn logout
|
||||
|
@ -391,7 +381,6 @@
|
|||
(rx/empty)))
|
||||
(rx/ignore))))))
|
||||
|
||||
|
||||
(defn mark-onboarding-as-viewed
|
||||
([] (mark-onboarding-as-viewed nil))
|
||||
([{:keys [version]}]
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
(defmethod ptk/handle-error :authentication
|
||||
[_]
|
||||
(let [msg (tr "errors.auth.unable-to-login")]
|
||||
(st/emit! (du/logout {:capture-redirect? true}))
|
||||
(st/emit! (du/logout {:capture-redirect true}))
|
||||
(ts/schedule 500 (st/emitf (dm/warn msg)))))
|
||||
|
||||
|
||||
|
|
|
@ -522,7 +522,7 @@
|
|||
[:li.feedback {:on-click (partial on-click :settings-feedback)}
|
||||
[:span.icon i/msg-info]
|
||||
[:span.text (tr "labels.give-feedback")]
|
||||
[:span.primary-badge "ALPHA"]])]]]
|
||||
[:span.primary-badge "BETA"]])]]]
|
||||
|
||||
(when (and team profile)
|
||||
[:& comments-section {:profile profile
|
||||
|
|
|
@ -19,10 +19,12 @@
|
|||
(letfn [(on-init []
|
||||
(when-let [container (mf/ref-val container-ref)]
|
||||
(-> (.embed js/ArenguForms form-id container)
|
||||
(p/then (fn [form] (.setHiddenField ^js form "email" email))))))
|
||||
(p/then (fn [form]
|
||||
(.setHiddenField ^js form "email" email))))))
|
||||
|
||||
(on-submit-success [_]
|
||||
(st/emit! (du/mark-questions-as-answered)))]
|
||||
(on-submit-success [_event]
|
||||
(st/emit! (du/mark-questions-as-answered)))
|
||||
]
|
||||
|
||||
(let [script (dom/create-element "script")
|
||||
head (unchecked-get js/document "head")
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
[app.main.ui.releases.v1-7]
|
||||
[app.main.ui.releases.v1-8]
|
||||
[app.main.ui.releases.v1-9]
|
||||
[app.main.ui.releases.v1-10]
|
||||
[app.util.object :as obj]
|
||||
[app.util.timers :as tm]
|
||||
[rumext.alpha :as mf]))
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
[props]
|
||||
(let [children (obj/get props "children")
|
||||
on-click (mf/use-callback #(set! (.-href globals/location) ""))]
|
||||
|
||||
[:section.exception-layout
|
||||
[:div.exception-header
|
||||
{:on-click on-click}
|
||||
|
|
Loading…
Add table
Reference in a new issue