Merge branch 'release-1.2.0' into develop

This commit is contained in:
Andrey Antukh 2021-02-15 13:29:11 +01:00
commit 101027e6b8
7 changed files with 22 additions and 16 deletions

View file

@ -27,6 +27,7 @@
- Improve component testing - Improve component testing
- Increase default deletion delay to 7 days - Increase default deletion delay to 7 days
- Show a pixel grid when zoom greater than 800% [#519](https://github.com/penpot/penpot/discussions/519) - Show a pixel grid when zoom greater than 800% [#519](https://github.com/penpot/penpot/discussions/519)
- Fix behavior of select all command when there are objects outside frames [Taiga #1209](https://tree.taiga.io/project/penpot/issue/1209)
### Bugs fixed ### Bugs fixed
@ -39,6 +40,7 @@
- Fix ldap function called on login click - Fix ldap function called on login click
- Fix logo icon in viewer should go to dashboard [Taiga #1149](https://tree.taiga.io/project/penpot/issue/1149) - Fix logo icon in viewer should go to dashboard [Taiga #1149](https://tree.taiga.io/project/penpot/issue/1149)
- Fix ordering when restoring deleted shapes in sync [Taiga #1163](https://tree.taiga.io/project/penpot/issue/1163) - Fix ordering when restoring deleted shapes in sync [Taiga #1163](https://tree.taiga.io/project/penpot/issue/1163)
- Fix problem when editing text immediately after creating [Taiga #1207](https://tree.taiga.io/project/penpot/issue/1207)
- Fix problem when pasting URL's copied from the browser url bar [Taiga #1187](https://tree.taiga.io/project/penpot/issue/1187) - Fix problem when pasting URL's copied from the browser url bar [Taiga #1187](https://tree.taiga.io/project/penpot/issue/1187)
- Fix problem with multiple selection and groups [Taiga #1128](https://tree.taiga.io/project/penpot/issue/1128) - Fix problem with multiple selection and groups [Taiga #1128](https://tree.taiga.io/project/penpot/issue/1128)
- Fix problem with red handler indicator on resize [Taiga #1188](https://tree.taiga.io/project/penpot/issue/1188) - Fix problem with red handler indicator on resize [Taiga #1188](https://tree.taiga.io/project/penpot/issue/1188)
@ -48,7 +50,6 @@
- Fix updates on collaborative editing not updating selection rectangles [Taiga #1127](https://tree.taiga.io/project/penpot/issue/1127) - Fix updates on collaborative editing not updating selection rectangles [Taiga #1127](https://tree.taiga.io/project/penpot/issue/1127)
- Make the team deletion deferred (in the same way other objects) - Make the team deletion deferred (in the same way other objects)
### Community contributions by (Thank you! :heart:) ### Community contributions by (Thank you! :heart:)
- abtinmo [#538](https://github.com/penpot/penpot/pull/538) - abtinmo [#538](https://github.com/penpot/penpot/pull/538)

View file

@ -155,11 +155,12 @@
:dec (.. ^Gauge instance (labels labels) (dec))))))) :dec (.. ^Gauge instance (labels labels) (dec)))))))
(defn make-summary (defn make-summary
[{:keys [name help registry reg labels] :as props}] [{:keys [name help registry reg labels max-age] :or {max-age 3600} :as props}]
(let [registry (or registry reg) (let [registry (or registry reg)
instance (doto (Summary/build) instance (doto (Summary/build)
(.name name) (.name name)
(.help help) (.help help)
(.maxAgeSeconds max-age)
(.quantile 0.75 0.02) (.quantile 0.75 0.02)
(.quantile 0.99 0.001)) (.quantile 0.99 0.001))
_ (when (seq labels) _ (when (seq labels)

View file

@ -224,7 +224,9 @@
(defn select-toplevel-shapes (defn select-toplevel-shapes
([objects] (select-toplevel-shapes objects nil)) ([objects] (select-toplevel-shapes objects nil))
([objects {:keys [include-frames?] :or {include-frames? false}}] ([objects {:keys [include-frames? include-frame-children?]
:or {include-frames? false
include-frame-children? true}}]
(let [lookup #(get objects %) (let [lookup #(get objects %)
root (lookup uuid/zero) root (lookup uuid/zero)
root-children (:shapes root) root-children (:shapes root)
@ -241,7 +243,7 @@
(or (not= :frame typ) include-frames?) (or (not= :frame typ) include-frames?)
(d/concat [obj]) (d/concat [obj])
(= :frame typ) (and (= :frame typ) include-frame-children?)
(d/concat (map lookup children))))))] (d/concat (map lookup children))))))]
(reduce lookup-shapes [] root-children)))) (reduce lookup-shapes [] root-children))))

View file

@ -164,11 +164,10 @@
(not= (:id common-frame-id) uuid/zero)) (not= (:id common-frame-id) uuid/zero))
(-> (get objects common-frame-id) (-> (get objects common-frame-id)
:shapes) :shapes)
(let [frames (cp/select-frames objects)] (->> (cp/select-toplevel-shapes objects
(->> (if (seq frames) {:include-frames? true
frames :include-frame-children? false})
(cp/select-toplevel-shapes objects)) (map :id))))
(map :id)))))
is-not-blocked (fn [shape-id] (not (get-in state [:workspace-data is-not-blocked (fn [shape-id] (not (get-in state [:workspace-data
:pages-index page-id :pages-index page-id

View file

@ -96,6 +96,9 @@
(def current-hover (def current-hover
(l/derived :hover workspace-local)) (l/derived :hover workspace-local))
(def editors
(l/derived :editors workspace-local))
(def workspace-layout (def workspace-layout
(l/derived :workspace-layout st/state)) (l/derived :workspace-layout st/state))

View file

@ -45,11 +45,11 @@
auto-height? (= grow-type :auto-height) auto-height? (= grow-type :auto-height)
base #js {:display "inline-flex" base #js {:display "inline-flex"
:flex-direction "column" :flexDirection "column"
:justify-content "inherit" :justifyContent "inherit"
:min-height (when-not (or auto-width? auto-height?) "100%") :minHeight (when-not (or auto-width? auto-height?) "100%")
:min-width (when-not auto-width? "100%") :minWidth (when-not auto-width? "100%")
:vertical-align "top"}] :verticalAlign "top"}]
base))) base)))
(defn generate-paragraph-styles (defn generate-paragraph-styles

View file

@ -285,8 +285,8 @@
(let [ids [(:id shape)] (let [ids [(:id shape)]
type (:type shape) type (:type shape)
local (deref refs/workspace-local) editors (mf/deref refs/editors)
editor (get-in local [:editors (:id shape)]) editor (get editors (:id shape))
measure-values (select-keys shape measure-attrs) measure-values (select-keys shape measure-attrs)