🔥 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 <niwi@niwi.nz>
This commit is contained in:
Andrey Antukh 2026-05-06 09:11:50 +00:00
parent 5f40673fde
commit 34cc0e9d56
6 changed files with 19 additions and 31 deletions

View File

@ -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

View File

@ -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}])]

View File

@ -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}])

View File

@ -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})

View File

@ -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})

View File

@ -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)