diff --git a/CHANGES.md b/CHANGES.md index c740b6d96..0de1f25a4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -27,6 +27,7 @@ - Improve component testing - Increase default deletion delay to 7 days - 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 @@ -39,6 +40,7 @@ - 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 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 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) @@ -48,7 +50,6 @@ - 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) - ### Community contributions by (Thank you! :heart:) - abtinmo [#538](https://github.com/penpot/penpot/pull/538) diff --git a/backend/src/app/metrics.clj b/backend/src/app/metrics.clj index 9c20d6db6..a7e866068 100644 --- a/backend/src/app/metrics.clj +++ b/backend/src/app/metrics.clj @@ -155,11 +155,12 @@ :dec (.. ^Gauge instance (labels labels) (dec))))))) (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) instance (doto (Summary/build) (.name name) (.help help) + (.maxAgeSeconds max-age) (.quantile 0.75 0.02) (.quantile 0.99 0.001)) _ (when (seq labels) diff --git a/common/app/common/pages/helpers.cljc b/common/app/common/pages/helpers.cljc index 778968bf6..ca025949f 100644 --- a/common/app/common/pages/helpers.cljc +++ b/common/app/common/pages/helpers.cljc @@ -224,7 +224,9 @@ (defn select-toplevel-shapes ([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 %) root (lookup uuid/zero) root-children (:shapes root) @@ -241,7 +243,7 @@ (or (not= :frame typ) include-frames?) (d/concat [obj]) - (= :frame typ) + (and (= :frame typ) include-frame-children?) (d/concat (map lookup children))))))] (reduce lookup-shapes [] root-children)))) diff --git a/frontend/src/app/main/data/workspace/selection.cljs b/frontend/src/app/main/data/workspace/selection.cljs index a1f994a7d..11d982eb6 100644 --- a/frontend/src/app/main/data/workspace/selection.cljs +++ b/frontend/src/app/main/data/workspace/selection.cljs @@ -164,11 +164,10 @@ (not= (:id common-frame-id) uuid/zero)) (-> (get objects common-frame-id) :shapes) - (let [frames (cp/select-frames objects)] - (->> (if (seq frames) - frames - (cp/select-toplevel-shapes objects)) - (map :id))))) + (->> (cp/select-toplevel-shapes objects + {:include-frames? true + :include-frame-children? false}) + (map :id)))) is-not-blocked (fn [shape-id] (not (get-in state [:workspace-data :pages-index page-id diff --git a/frontend/src/app/main/refs.cljs b/frontend/src/app/main/refs.cljs index 74d35c0d5..f2bf529bb 100644 --- a/frontend/src/app/main/refs.cljs +++ b/frontend/src/app/main/refs.cljs @@ -96,6 +96,9 @@ (def current-hover (l/derived :hover workspace-local)) +(def editors + (l/derived :editors workspace-local)) + (def workspace-layout (l/derived :workspace-layout st/state)) diff --git a/frontend/src/app/main/ui/shapes/text/styles.cljs b/frontend/src/app/main/ui/shapes/text/styles.cljs index 509647beb..208dbf65b 100644 --- a/frontend/src/app/main/ui/shapes/text/styles.cljs +++ b/frontend/src/app/main/ui/shapes/text/styles.cljs @@ -45,11 +45,11 @@ auto-height? (= grow-type :auto-height) base #js {:display "inline-flex" - :flex-direction "column" - :justify-content "inherit" - :min-height (when-not (or auto-width? auto-height?) "100%") - :min-width (when-not auto-width? "100%") - :vertical-align "top"}] + :flexDirection "column" + :justifyContent "inherit" + :minHeight (when-not (or auto-width? auto-height?) "100%") + :minWidth (when-not auto-width? "100%") + :verticalAlign "top"}] base))) (defn generate-paragraph-styles diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/text.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/text.cljs index 0bbf925ab..3cdb576a0 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/text.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/text.cljs @@ -285,8 +285,8 @@ (let [ids [(:id shape)] type (:type shape) - local (deref refs/workspace-local) - editor (get-in local [:editors (:id shape)]) + editors (mf/deref refs/editors) + editor (get editors (:id shape)) measure-values (select-keys shape measure-attrs)