From b672770fc50737d69872d8d626a371e82cf64a1a Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Wed, 27 Nov 2024 11:14:25 +0200 Subject: [PATCH] minor fixes --- src/renderer/attribute/views.cljs | 6 ++++-- src/renderer/document/db.cljs | 6 +----- src/renderer/menubar/filters.cljs | 3 +++ src/renderer/snap/events.cljs | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/renderer/attribute/views.cljs b/src/renderer/attribute/views.cljs index e5195d5b..c06e0399 100644 --- a/src/renderer/attribute/views.cljs +++ b/src/renderer/attribute/views.cljs @@ -154,12 +154,14 @@ [property k] (when-let [v (get property k)] [:<> - [:h3.font-bold (-> k csk/->kebab-case-string (str/replace "-" " ") str/capitalize)] + [:h3.font-bold (if (= k :appliesto) + "Applies to" + (-> k csk/->kebab-case-string (str/replace "-" " ") str/capitalize))] [:p (cond->> v (vector? v) (str/join " | "))]])) (defn property-list [property] - (->> [:appliesto :computed :percentages :animatable :animationType :styleDeclaration :syntax] + (->> [:appliesto :computed :percentages :animatable :animationType :syntax] (map #(property-list-item property %)) (into [:<>]))) diff --git a/src/renderer/document/db.cljs b/src/renderer/document/db.cljs index ca90f0b8..9ba32e56 100644 --- a/src/renderer/document/db.cljs +++ b/src/renderer/document/db.cljs @@ -4,15 +4,12 @@ [malli.transform :as mt] [renderer.element.db :refer [Element]] [renderer.history.db :refer [History]] - [renderer.menubar.filters :as filters] + [renderer.menubar.filters :refer [A11yFilter]] [renderer.utils.math :refer [Vec2D]])) (def ZoomFactor [:and number? [:>= 0.01] [:<= 100]]) -(def A11yFilter - (into [:enum] (map :id filters/accessibility))) - (def Document [:map {:closed true} [:id {:optional true :persist true} uuid?] @@ -44,4 +41,3 @@ (def explain (m/explainer Document)) (def default (m/decode Document {} mt/default-value-transformer)) - diff --git a/src/renderer/menubar/filters.cljs b/src/renderer/menubar/filters.cljs index 3d6e89af..ef7cd278 100644 --- a/src/renderer/menubar/filters.cljs +++ b/src/renderer/menubar/filters.cljs @@ -71,3 +71,6 @@ 0.163, 0.775, 0.062, 0, 0 0.163, 0.320, 0.516, 0, 0 0, 0, 0, 1, 0]}}]) + +(def A11yFilter + (into [:enum] (map :id accessibility))) diff --git a/src/renderer/snap/events.cljs b/src/renderer/snap/events.cljs index 738e53ba..3915df6d 100644 --- a/src/renderer/snap/events.cljs +++ b/src/renderer/snap/events.cljs @@ -22,7 +22,7 @@ (rf/reg-global-interceptor (rf/->interceptor - :id ::auto-rebuild-tree + :id ::auto-update-tree :after (fn [context] (let [db (rf/get-effect context :db)] (if (:active-document db)