From 34cc0e9d566d5a3ab9a08a55bc422194d28edda8 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 6 May 2026 09:11:50 +0000 Subject: [PATCH] :fire: Materialize the canary feature flag across the codebase Remove the :canary flag from the flags definition and make all features gated behind it always available: - Enable "download font" option in dashboard fonts context menu - Enable Tab/Shift+Tab keyboard navigation for renaming shapes in layer items - Enable "duplicate color" option in asset panel when applicable - Enable "duplicate typography" option in asset panel when applicable - Enable "copy as image" context menu option for frame shapes Also remove unused [app.config :as cf] requires from files that no longer reference it after the materialization. Signed-off-by: Andrey Antukh --- common/src/app/common/flags.cljc | 4 --- frontend/src/app/main/ui/dashboard/fonts.cljs | 7 ++--- .../app/main/ui/workspace/context_menu.cljs | 3 +- .../ui/workspace/sidebar/assets/colors.cljs | 4 +-- .../sidebar/assets/typographies.cljs | 4 +-- .../main/ui/workspace/sidebar/layer_item.cljs | 28 +++++++++---------- 6 files changed, 19 insertions(+), 31 deletions(-) diff --git a/common/src/app/common/flags.cljc b/common/src/app/common/flags.cljc index 7a6dc625f9..1cec7db935 100644 --- a/common/src/app/common/flags.cljc +++ b/common/src/app/common/flags.cljc @@ -148,10 +148,6 @@ ;; Enable performance logs in devconsole (disabled by default) :perf-logs - ;; Used for designate features that will be available in the next - ;; release - :canary - ;; Security layer middleware that filters request by fetch ;; metadata headers :sec-fetch-metadata-middleware diff --git a/frontend/src/app/main/ui/dashboard/fonts.cljs b/frontend/src/app/main/ui/dashboard/fonts.cljs index eaefe3925f..ab513250d7 100644 --- a/frontend/src/app/main/ui/dashboard/fonts.cljs +++ b/frontend/src/app/main/ui/dashboard/fonts.cljs @@ -263,10 +263,9 @@ [{:name (tr "labels.edit") :id "font-edit" :handler on-edit} - (when (contains? cf/flags :canary) - {:name (tr "labels.download-simple") - :id "font-download" - :handler on-download}) + {:name (tr "labels.download-simple") + :id "font-download" + :handler on-download} {:name (tr "labels.delete") :id "font-delete" :handler on-delete}])] diff --git a/frontend/src/app/main/ui/workspace/context_menu.cljs b/frontend/src/app/main/ui/workspace/context_menu.cljs index c70764ffd3..20ceb46dde 100644 --- a/frontend/src/app/main/ui/workspace/context_menu.cljs +++ b/frontend/src/app/main/ui/workspace/context_menu.cljs @@ -226,8 +226,7 @@ [:> menu-entry* {:title (tr "workspace.shape.menu.copy-svg") :on-click handle-copy-svg}] - (when (and (some cfh/frame-shape? shapes) - (contains? cf/flags :canary)) + (when (some cfh/frame-shape? shapes) [:> menu-entry* {:title (tr "workspace.shape.menu.copy-as-image") :disabled multiple? :on-click handle-copy-as-image}]) diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets/colors.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets/colors.cljs index b4e94bb92d..9dd803ef2c 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets/colors.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets/colors.cljs @@ -11,7 +11,6 @@ [app.common.data.macros :as dm] [app.common.math :as mth] [app.common.path-names :as cpn] - [app.config :as cf] [app.main.constants :refer [max-input-length]] [app.main.data.event :as ev] [app.main.data.modal :as modal] @@ -261,8 +260,7 @@ {:name (tr "workspace.assets.edit") :id "assets-edit-color" :handler edit-color-clicked}) - (when (and (not (or multi-colors? multi-assets?)) - (contains? cf/flags :canary)) + (when-not (or multi-colors? multi-assets?) {:name (tr "workspace.assets.duplicate") :id "assets-duplicate-color" :handler duplicate-color}) diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets/typographies.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets/typographies.cljs index 174648e8ca..2a61045e48 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets/typographies.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets/typographies.cljs @@ -10,7 +10,6 @@ [app.common.data :as d] [app.common.data.macros :as dm] [app.common.path-names :as cpn] - [app.config :as cf] [app.main.data.event :as ev] [app.main.data.modal :as modal] [app.main.data.workspace :as dw] @@ -469,8 +468,7 @@ :id "assets-edit-typography" :handler handle-edit-typography-clicked}) - (when (and (not (or multi-typographies? multi-assets?)) - (contains? cf/flags :canary)) + (when-not (or multi-typographies? multi-assets?) {:name (tr "workspace.assets.duplicate") :id "assets-duplicate-typography" :handler handle-duplicate-typography}) diff --git a/frontend/src/app/main/ui/workspace/sidebar/layer_item.cljs b/frontend/src/app/main/ui/workspace/sidebar/layer_item.cljs index d31351adc8..8ba48062fb 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/layer_item.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/layer_item.cljs @@ -16,7 +16,6 @@ [app.common.types.container :as ctn] [app.common.types.shape.layout :as ctl] [app.common.uuid :as uuid] - [app.config :as cf] [app.main.data.workspace :as dw] [app.main.data.workspace.collapse :as dwc] [app.main.refs :as refs] @@ -441,20 +440,19 @@ (mf/use-fn (mf/deps id objects) (fn [event] - (when (contains? cf/flags :canary) - (let [shift? (kbd/shift? event) - shape (get objects id) - parent (get objects (:parent-id shape)) - siblings (:shapes parent) - pos (d/index-of siblings id)] - (when (some? pos) - (let [;; Layers render in reverse: Tab (visually down) = dec index, - ;; Shift+Tab (visually up) = inc index - target-id (if shift? - (get siblings (inc pos)) - (get siblings (dec pos)))] - (when (some? target-id) - (st/emit! (dw/start-rename-shape target-id)))))))))] + (let [shift? (kbd/shift? event) + shape (get objects id) + parent (get objects (:parent-id shape)) + siblings (:shapes parent) + pos (d/index-of siblings id)] + (when (some? pos) + (let [;; Layers render in reverse: Tab (visually down) = dec index, + ;; Shift+Tab (visually up) = inc index + target-id (if shift? + (get siblings (inc pos)) + (get siblings (dec pos)))] + (when (some? target-id) + (st/emit! (dw/start-rename-shape target-id))))))))] (mf/with-effect [is-selected selected] (let [single? (= (count selected) 1)