diff --git a/CHANGES.md b/CHANGES.md index 033dcc348..5739dd035 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -92,6 +92,11 @@ - Fix unnecessary button [Taiga #3312](https://tree.taiga.io/project/penpot/issue/3312) - Fix copy color information in several formats [Taiga #4723](https://tree.taiga.io/project/penpot/issue/4723) - Fix dropdown width [Taiga #5541](https://tree.taiga.io/project/penpot/issue/5541) +- Fix enable comment mode and insert image keeps on comment mode [Taiga #5678](https://tree.taiga.io/project/penpot/issue/5678) +- Fix enable undo just after using pencil [Taiga #5674](https://tree.taiga.io/project/penpot/issue/5674) +- Fix 400 error when user changes password [Taiga #5643](https://tree.taiga.io/project/penpot/issue/5643) +- Fix cannot undo layer styles [Taiga #5676](https://tree.taiga.io/project/penpot/issue/5676) + ### :arrow_up: Deps updates - Update google fonts catalog (at 2023/07/06) [Taiga #5592](https://tree.taiga.io/project/penpot/issue/5592) diff --git a/frontend/src/app/main/data/workspace/common.cljs b/frontend/src/app/main/data/workspace/common.cljs index 11fef1fd5..c4ea1a7e9 100644 --- a/frontend/src/app/main/data/workspace/common.cljs +++ b/frontend/src/app/main/data/workspace/common.cljs @@ -119,7 +119,7 @@ (watch [it state _] (let [edition (get-in state [:workspace-local :edition]) drawing (get state :workspace-drawing)] - (when-not (or (some? edition) (not-empty drawing)) + (when-not (or (some? edition) (some? (:object drawing))) (let [undo (:workspace-undo state) items (:items undo) index (or (:index undo) (dec (count items)))] diff --git a/frontend/src/app/main/ui/components/forms.cljs b/frontend/src/app/main/ui/components/forms.cljs index deb8f6a46..9c415a4e5 100644 --- a/frontend/src/app/main/ui/components/forms.cljs +++ b/frontend/src/app/main/ui/components/forms.cljs @@ -439,3 +439,13 @@ (cond-> errors (all-spaces? (get data field)) (assoc field {:message error-msg})))) + +(defn validate-not-all-spaces + [field error-msg] + (fn [errors data] + (let [value (get data field)] + (cond-> errors + (and + (all-spaces? value) + (> (count value) 0)) + (assoc field {:message error-msg}))))) diff --git a/frontend/src/app/main/ui/settings/password.cljs b/frontend/src/app/main/ui/settings/password.cljs index 48f15b00b..a2f2c727b 100644 --- a/frontend/src/app/main/ui/settings/password.cljs +++ b/frontend/src/app/main/ui/settings/password.cljs @@ -71,7 +71,8 @@ [{:keys [locale] :as props}] (let [initial (mf/use-memo (constantly {:password-old nil})) form (fm/use-form :spec ::password-form - :validators [(fm/validate-not-empty :password-1 (tr "auth.password-not-empty")) + :validators [(fm/validate-not-all-spaces :password-old (tr "auth.password-not-empty")) + (fm/validate-not-empty :password-1 (tr "auth.password-not-empty")) (fm/validate-not-empty :password-2 (tr "auth.password-not-empty")) password-equality] :initial initial)] diff --git a/frontend/src/app/main/ui/workspace/left_toolbar.cljs b/frontend/src/app/main/ui/workspace/left_toolbar.cljs index 6439725af..2a61a3120 100644 --- a/frontend/src/app/main/ui/workspace/left_toolbar.cljs +++ b/frontend/src/app/main/ui/workspace/left_toolbar.cljs @@ -30,7 +30,10 @@ file-id (mf/use-ctx ctx/current-file-id) on-click - (mf/use-fn #(dom/click (mf/ref-val ref))) + (mf/use-fn + (fn [] + (st/emit! :interrupt dw/clear-edition-mode) + (dom/click (mf/ref-val ref)))) on-selected (mf/use-fn diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layer.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layer.cljs index be41c258d..c76fcb474 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layer.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layer.cljs @@ -62,6 +62,7 @@ :selected-blend-mode value :option-highlighted? false :preview-complete? true) + (st/emit! (dw/unset-preview-blend-mode ids)) (on-change :blend-mode value))) handle-blend-mode-enter