mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 07:29:08 -05:00
✨ Disable feature toggle for layout flex
This commit is contained in:
parent
32350bcf87
commit
e53e715861
3 changed files with 4 additions and 13 deletions
|
@ -7,7 +7,6 @@
|
|||
(ns app.main.ui.workspace.sidebar.options.shapes.frame
|
||||
(:require
|
||||
[app.common.types.shape.layout :as ctl]
|
||||
[app.main.features :as features]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.ui.workspace.sidebar.options.menus.blur :refer [blur-menu]]
|
||||
[app.main.ui.workspace.sidebar.options.menus.constraints :refer [constraint-attrs constraints-menu]]
|
||||
|
@ -26,8 +25,6 @@
|
|||
(let [ids [(:id shape)]
|
||||
type (:type shape)
|
||||
|
||||
layout-active? (features/use-feature :auto-layout)
|
||||
|
||||
stroke-values (select-keys shape stroke-attrs)
|
||||
layer-values (select-keys shape layer-attrs)
|
||||
measure-values (select-measure-keys shape)
|
||||
|
@ -46,10 +43,9 @@
|
|||
(when (not is-layout-child?)
|
||||
[:& constraints-menu {:ids ids
|
||||
:values constraint-values}])
|
||||
(when (or layout-active? is-layout-container?)
|
||||
[:& layout-container-menu {:type type :ids [(:id shape)] :values layout-container-values}])
|
||||
[:& layout-container-menu {:type type :ids [(:id shape)] :values layout-container-values}]
|
||||
|
||||
(when (and layout-active? (or is-layout-child? is-layout-container?))
|
||||
(when (or is-layout-child? is-layout-container?)
|
||||
[:& layout-item-menu
|
||||
{:ids ids
|
||||
:type type
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
(ns app.main.ui.workspace.sidebar.options.shapes.group
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.main.features :as features]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.ui.workspace.sidebar.options.menus.blur :refer [blur-menu]]
|
||||
[app.main.ui.workspace.sidebar.options.menus.color-selection :refer [color-selection-menu]]
|
||||
|
@ -34,7 +33,6 @@
|
|||
shared-libs (unchecked-get props "shared-libs")
|
||||
objects (->> shape-with-children (group-by :id) (d/mapm (fn [_ v] (first v))))
|
||||
file-id (unchecked-get props "file-id")
|
||||
layout-active? (features/use-feature :auto-layout)
|
||||
layout-container-values (select-keys shape layout-container-flex-attrs)
|
||||
ids [(:id shape)]
|
||||
is-layout-child-ref (mf/use-memo (mf/deps ids) #(refs/is-layout-child? ids))
|
||||
|
@ -56,8 +54,8 @@
|
|||
[:div.options
|
||||
[:& measures-menu {:type type :ids measure-ids :values measure-values :shape shape}]
|
||||
[:& component-menu {:ids comp-ids :values comp-values :shape-name (:name shape)}]
|
||||
(when layout-active?
|
||||
[:& layout-container-menu {:type type :ids [(:id shape)] :values layout-container-values}])
|
||||
[:& layout-container-menu {:type type :ids [(:id shape)] :values layout-container-values}]
|
||||
|
||||
(when is-layout-child?
|
||||
[:& layout-item-menu
|
||||
{:type type
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
(:require
|
||||
[app.main.features :as features]))
|
||||
|
||||
(defn ^:export autolayout []
|
||||
(features/toggle-feature! :auto-layout))
|
||||
|
||||
(defn ^:export components-v2 []
|
||||
(features/toggle-feature! :components-v2))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue