From bf898bfdc9cf3309675c3ddaa73e8fae90d7fb60 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Fri, 1 Mar 2024 11:08:49 +0100 Subject: [PATCH] :sparkles: Add debug old icons --- frontend/resources/styles/debug.scss | 5 +++++ frontend/src/app/main/ui/icons.clj | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/resources/styles/debug.scss b/frontend/resources/styles/debug.scss index 53abcb8eb..e54ea5153 100644 --- a/frontend/resources/styles/debug.scss +++ b/frontend/resources/styles/debug.scss @@ -12,3 +12,8 @@ body { color: yellow; } + +.deprecated-icon { + fill: red !important; + stroke: red !important; +} diff --git a/frontend/src/app/main/ui/icons.clj b/frontend/src/app/main/ui/icons.clj index 68edb7660..636f585c4 100644 --- a/frontend/src/app/main/ui/icons.clj +++ b/frontend/src/app/main/ui/icons.clj @@ -10,10 +10,18 @@ [cuerdas.core :as str] [rumext.v2])) +(def exceptions #{:penpot-logo-icon}) + (defmacro icon-xref [id & [class]] (let [href (str "#icon-" (name id)) - class (or class (str "icon-" (name id)))] + class (or class (str "icon-" (name id))) + + ;; FIXME: Debug tool. Remove when we remove the old icons + class (cond-> class + (and (not (str/ends-with? (name id) "-refactor")) + (not (contains? exceptions id))) + (str " deprecated-icon"))] `(rumext.v2/html [:svg {:width 500 :height 500 :class ~class} [:use {:href ~href}]])))