mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 22:26:11 +02:00
✨ Remove advanced options overlay and single option when advanced options displayed
This commit is contained in:
parent
a2b0305162
commit
c4b4976be0
5 changed files with 13 additions and 15 deletions
|
@ -22,9 +22,7 @@
|
||||||
(.scrollIntoViewIfNeeded ^js node)))))
|
(.scrollIntoViewIfNeeded ^js node)))))
|
||||||
|
|
||||||
(when visible?
|
(when visible?
|
||||||
[:*
|
[:div.advanced-options-wrapper {:ref ref}
|
||||||
[:div.focus-overlay {:on-click handle-click}]
|
[:div.advanced-options {}
|
||||||
[:div.advanced-options-wrapper {:ref ref}
|
children]])))
|
||||||
[:div.advanced-options {}
|
|
||||||
children]]])))
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
[app.main.data.workspace.changes :as dch]
|
[app.main.data.workspace.changes :as dch]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.ui.icons :as i]
|
[app.main.ui.icons :as i]
|
||||||
[app.main.ui.workspace.sidebar.options.common :refer [advanced-options]]
|
|
||||||
[app.main.ui.workspace.sidebar.options.rows.input-row :refer [input-row]]
|
[app.main.ui.workspace.sidebar.options.rows.input-row :refer [input-row]]
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.i18n :as i18n :refer [t]]))
|
[app.util.i18n :as i18n :refer [t]]))
|
||||||
|
|
|
@ -117,11 +117,13 @@
|
||||||
(on-save-grid grid)))
|
(on-save-grid grid)))
|
||||||
|
|
||||||
is-default (= (->> grid :params)
|
is-default (= (->> grid :params)
|
||||||
(->> grid :type default-grid-params))]
|
(->> grid :type default-grid-params))
|
||||||
|
|
||||||
|
open? (:show-advanced-options @state)]
|
||||||
|
|
||||||
[:div.grid-option
|
[:div.grid-option
|
||||||
[:div.grid-option-main
|
[:div.grid-option-main {:style {:display (when open? "none")}}
|
||||||
[:button.custom-button {:class (when (:show-advanced-options @state) "is-active")
|
[:button.custom-button {:class (when open? "is-active")
|
||||||
:on-click toggle-advanced-options} i/actions]
|
:on-click toggle-advanced-options} i/actions]
|
||||||
|
|
||||||
[:& select {:class "flex-grow"
|
[:& select {:class "flex-grow"
|
||||||
|
@ -148,10 +150,9 @@
|
||||||
[:button.custom-button {:on-click handle-toggle-visibility} (if display i/eye i/eye-closed)]
|
[:button.custom-button {:on-click handle-toggle-visibility} (if display i/eye i/eye-closed)]
|
||||||
[:button.custom-button {:on-click handle-remove-grid} i/minus]]]
|
[:button.custom-button {:on-click handle-remove-grid} i/minus]]]
|
||||||
|
|
||||||
[:& advanced-options {:visible? (:show-advanced-options @state)
|
[:& advanced-options {:visible? open?
|
||||||
:on-close toggle-advanced-options}
|
:on-close toggle-advanced-options}
|
||||||
[:button.custom-button {:class (when (:show-advanced-options @state) "is-active")
|
[:button.custom-button {:on-click toggle-advanced-options} i/actions]
|
||||||
:on-click toggle-advanced-options} i/actions]
|
|
||||||
(when (= :square type)
|
(when (= :square type)
|
||||||
[:& input-row {:label (t locale "workspace.options.grid.params.size")
|
[:& input-row {:label (t locale "workspace.options.grid.params.size")
|
||||||
:class "pixels"
|
:class "pixels"
|
||||||
|
|
|
@ -98,8 +98,7 @@
|
||||||
(fn []
|
(fn []
|
||||||
(st/emit! (dch/update-shapes ids #(update-in % [:shadow index :hidden] not)))))]
|
(st/emit! (dch/update-shapes ids #(update-in % [:shadow index :hidden] not)))))]
|
||||||
[:*
|
[:*
|
||||||
[:div.element-set-options-group
|
[:div.element-set-options-group {:style {:display (when @open-shadow "none")}}
|
||||||
|
|
||||||
[:div.element-set-actions-button
|
[:div.element-set-actions-button
|
||||||
{:on-click #(reset! open-shadow true)}
|
{:on-click #(reset! open-shadow true)}
|
||||||
i/actions]
|
i/actions]
|
||||||
|
|
|
@ -468,7 +468,8 @@
|
||||||
|
|
||||||
[:*
|
[:*
|
||||||
[:div.element-set-options-group.typography-entry
|
[:div.element-set-options-group.typography-entry
|
||||||
{:class (when selected? "selected")}
|
{:class (when selected? "selected")
|
||||||
|
:style {:display (when @open? "none")}}
|
||||||
[:div.typography-selection-wrapper
|
[:div.typography-selection-wrapper
|
||||||
{:class (when on-click "is-selectable")
|
{:class (when on-click "is-selectable")
|
||||||
:on-click on-click
|
:on-click on-click
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue