Merge pull request #5294 from penpot/superalex-feature-flag-for-render-wasm

🎉 Add feature flag for wasm render
This commit is contained in:
Andrey Antukh 2024-11-14 08:59:48 +01:00 committed by GitHub
commit 1fdc724761
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 7 deletions

View file

@ -110,8 +110,10 @@
(when *assert*
(->> (rx/from cfeat/no-migration-features)
;; text editor v2 isn't enabled by default even in devenv
;; wasm render v1 isn't enabled by default even in devenv
(rx/filter #(not (or (contains? cfeat/backend-only-features %)
(= "text-editor/v2" %)
(= "render-wasm/v1" %)
(= "design-tokens/v1" %))))
(rx/observe-on :async)
(rx/map enable-feature))))

View file

@ -11,12 +11,13 @@
[app.common.data.macros :as dm]
[app.common.types.shape.impl :as ctsi]
[app.common.uuid :as uuid]
[app.config :as cf]
[app.main.features :as features]
[app.main.store :as st]
[app.util.object :as obj]
[promesa.core :as p]))
(def enabled?
(contains? cf/flags :render-wasm))
(features/active-feature? @st/state "render-wasm/v1"))
(set! app.common.types.shape.impl/enabled-wasm-ready-shape enabled?)