diff --git a/frontend/src/app/main/ui/components/title_bar.cljs b/frontend/src/app/main/ui/components/title_bar.cljs index 1a78fd134..61c664303 100644 --- a/frontend/src/app/main/ui/components/title_bar.cljs +++ b/frontend/src/app/main/ui/components/title_bar.cljs @@ -13,23 +13,23 @@ (mf/defc title-bar {::mf/wrap-props false} - [{:keys [collapsable? collapsed? on-collapsed title children on-btn-click btn-children class clickable-all?]}] + [{:keys [collapsable collapsed on-collapsed title children on-btn-click btn-children class all-clickable]}] (let [klass (dm/str (stl/css :title-bar) " " class)] [:div {:class klass} - (if collapsable? + (if ^boolean collapsable [:div {:class (stl/css :title-wrapper)} - (if clickable-all? + (if ^boolean all-clickable [:button {:class (stl/css :toggle-btn) :on-click on-collapsed} [:span {:class (stl/css-case :collapsabled-icon true - :rotated collapsed?)} + :rotated collapsed)} i/arrow-refactor] [:div {:class (stl/css :title)} title]] [:* [:button {:class (stl/css-case :collapsabled-icon true - :rotated collapsed?) + :rotated collapsed) :on-click on-collapsed} i/arrow-refactor] [:div {:class (stl/css :title)} title]])] diff --git a/frontend/src/app/main/ui/debug/components_preview.cljs b/frontend/src/app/main/ui/debug/components_preview.cljs index 9f180aa09..c9dafa6e4 100644 --- a/frontend/src/app/main/ui/debug/components_preview.cljs +++ b/frontend/src/app/main/ui/debug/components_preview.cljs @@ -102,26 +102,26 @@ [:h3 "Titles"] [:& component-wrapper {:title "Title"} - [:& title-bar {:collapsable? false - :title "Title"}]] + [:& title-bar {:collapsable false + :title "Title"}]] [:& component-wrapper {:title "Title and action button"} - [:& title-bar {:collapsable? false + [:& title-bar {:collapsable false :title "Title" :on-btn-click on-btn-click :btn-children i/add-refactor}]] [:& component-wrapper {:title "Collapsed title and action button"} - [:& title-bar {:collapsable? true - :collapsed? collapsed? + [:& title-bar {:collapsable true + :collapsed collapsed? :on-collapsed toggle-collapsed :title "Title" :on-btn-click on-btn-click :btn-children i/add-refactor}]] [:& component-wrapper {:title "Collapsed title and children"} - [:& title-bar {:collapsable? true - :collapsed? collapsed? + [:& title-bar {:collapsable true + :collapsed collapsed? :on-collapsed toggle-collapsed :title "Title"} [:& tab-container {:on-change-tab set-tab diff --git a/frontend/src/app/main/ui/viewer/inspect/annotation.cljs b/frontend/src/app/main/ui/viewer/inspect/annotation.cljs index a3cccae4d..7f1282f3a 100644 --- a/frontend/src/app/main/ui/viewer/inspect/annotation.cljs +++ b/frontend/src/app/main/ui/viewer/inspect/annotation.cljs @@ -15,9 +15,9 @@ (mf/defc annotation [{:keys [content] :as props}] [:div {:class (stl/css :attributes-block)} - [:& title-bar {:collapsable? false - :title (tr "workspace.options.component.annotation") - :class (stl/css :title-spacing-annotation)} + [:& title-bar {:collapsable false + :title (tr "workspace.options.component.annotation") + :class (stl/css :title-spacing-annotation)} [:& copy-button {:data content}]] [:div {:class (stl/css :annotation-content)} content]]) diff --git a/frontend/src/app/main/ui/viewer/inspect/attributes/blur.cljs b/frontend/src/app/main/ui/viewer/inspect/attributes/blur.cljs index ef8763117..162fb5db8 100644 --- a/frontend/src/app/main/ui/viewer/inspect/attributes/blur.cljs +++ b/frontend/src/app/main/ui/viewer/inspect/attributes/blur.cljs @@ -21,9 +21,9 @@ (let [shapes (->> shapes (filter has-blur?))] (when (seq shapes) [:div {:class (stl/css :attributes-block)} - [:& title-bar {:collapsable? false - :title (tr "inspect.attributes.blur") - :class (stl/css :title-spacing-blur)} + [:& title-bar {:collapsable false + :title (tr "inspect.attributes.blur") + :class (stl/css :title-spacing-blur)} (when (= (count shapes) 1) [:& copy-button {:data (css/get-css-property objects (first shapes) :filter)}])] diff --git a/frontend/src/app/main/ui/viewer/inspect/attributes/fill.cljs b/frontend/src/app/main/ui/viewer/inspect/attributes/fill.cljs index 77df200a0..8383ca085 100644 --- a/frontend/src/app/main/ui/viewer/inspect/attributes/fill.cljs +++ b/frontend/src/app/main/ui/viewer/inspect/attributes/fill.cljs @@ -54,9 +54,9 @@ (let [shapes (filter has-fill? shapes)] (when (seq shapes) [:div {:class (stl/css :attributes-block)} - [:& title-bar {:collapsable? false - :title (tr "inspect.attributes.fill") - :class (stl/css :title-spacing-fill)}] + [:& title-bar {:collapsable false + :title (tr "inspect.attributes.fill") + :class (stl/css :title-spacing-fill)}] [:div {:class (stl/css :attributes-content)} (for [shape shapes] diff --git a/frontend/src/app/main/ui/viewer/inspect/attributes/geometry.cljs b/frontend/src/app/main/ui/viewer/inspect/attributes/geometry.cljs index b22c15726..58e39ca5f 100644 --- a/frontend/src/app/main/ui/viewer/inspect/attributes/geometry.cljs +++ b/frontend/src/app/main/ui/viewer/inspect/attributes/geometry.cljs @@ -31,9 +31,9 @@ (mf/defc geometry-panel [{:keys [objects shapes]}] [:div {:class (stl/css :attributes-block)} - [:& title-bar {:collapsable? false - :title (tr "inspect.attributes.size") - :class (stl/css :title-spacing-geometry)} + [:& title-bar {:collapsable false + :title (tr "inspect.attributes.size") + :class (stl/css :title-spacing-geometry)} (when (= (count shapes) 1) [:& copy-button {:data (css/get-shape-properties-css objects (first shapes) properties)}])] diff --git a/frontend/src/app/main/ui/viewer/inspect/attributes/layout.cljs b/frontend/src/app/main/ui/viewer/inspect/attributes/layout.cljs index 0e644210b..e015aecd1 100644 --- a/frontend/src/app/main/ui/viewer/inspect/attributes/layout.cljs +++ b/frontend/src/app/main/ui/viewer/inspect/attributes/layout.cljs @@ -45,9 +45,9 @@ (when (seq shapes) [:div {:class (stl/css :attributes-block)} - [:& title-bar {:collapsable? false - :title "Layout" - :class (stl/css :title-spacing-layout)} + [:& title-bar {:collapsable false + :title "Layout" + :class (stl/css :title-spacing-layout)} (when (= (count shapes) 1) [:& copy-button {:data (css/get-shape-properties-css objects (first shapes) properties)}])] diff --git a/frontend/src/app/main/ui/viewer/inspect/attributes/layout_element.cljs b/frontend/src/app/main/ui/viewer/inspect/attributes/layout_element.cljs index c0efb66c3..14eaf7f93 100644 --- a/frontend/src/app/main/ui/viewer/inspect/attributes/layout_element.cljs +++ b/frontend/src/app/main/ui/viewer/inspect/attributes/layout_element.cljs @@ -63,9 +63,9 @@ (when some-layout-prop? [:div {:class (stl/css :attributes-block)} - [:& title-bar {:collapsable? false - :title menu-title - :class (stl/css :title-spacing-layout-element)} + [:& title-bar {:collapsable false + :title menu-title + :class (stl/css :title-spacing-layout-element)} (when (= (count shapes) 1) [:& copy-button {:data (css/get-shape-properties-css objects (first shapes) properties)}])] diff --git a/frontend/src/app/main/ui/viewer/inspect/attributes/shadow.cljs b/frontend/src/app/main/ui/viewer/inspect/attributes/shadow.cljs index 6ff7d452e..586d4488a 100644 --- a/frontend/src/app/main/ui/viewer/inspect/attributes/shadow.cljs +++ b/frontend/src/app/main/ui/viewer/inspect/attributes/shadow.cljs @@ -53,9 +53,9 @@ (when (and (seq shapes) (> (count shapes) 0)) [:div {:class (stl/css :attributes-block)} - [:& title-bar {:collapsable? false - :title (tr "inspect.attributes.shadow") - :class (stl/css :title-spacing-shadow)}] + [:& title-bar {:collapsable false + :title (tr "inspect.attributes.shadow") + :class (stl/css :title-spacing-shadow)}] [:div {:class (stl/css :attributes-content)} (for [shape shapes] diff --git a/frontend/src/app/main/ui/viewer/inspect/attributes/stroke.cljs b/frontend/src/app/main/ui/viewer/inspect/attributes/stroke.cljs index 64ff49104..9dd86a035 100644 --- a/frontend/src/app/main/ui/viewer/inspect/attributes/stroke.cljs +++ b/frontend/src/app/main/ui/viewer/inspect/attributes/stroke.cljs @@ -61,9 +61,9 @@ (let [shapes (->> shapes (filter has-stroke?))] (when (seq shapes) [:div {:class (stl/css :attributes-block)} - [:& title-bar {:collapsable? false - :title (tr "inspect.attributes.stroke") - :class (stl/css :title-spacing-stroke)}] + [:& title-bar {:collapsable false + :title (tr "inspect.attributes.stroke") + :class (stl/css :title-spacing-stroke)}] [:div {:class (stl/css :attributes-content)} (for [shape shapes] diff --git a/frontend/src/app/main/ui/viewer/inspect/attributes/svg.cljs b/frontend/src/app/main/ui/viewer/inspect/attributes/svg.cljs index eb5548f54..8df36110f 100644 --- a/frontend/src/app/main/ui/viewer/inspect/attributes/svg.cljs +++ b/frontend/src/app/main/ui/viewer/inspect/attributes/svg.cljs @@ -47,7 +47,7 @@ (let [shape (first shapes)] (when (seq (:svg-attrs shape)) [:div {:class (stl/css :attributes-block)} - [:& title-bar {:collapsable? false - :title (tr "workspace.sidebar.options.svg-attrs.title") - :class (stl/css :title-spacing-svg)}] + [:& title-bar {:collapsable false + :title (tr "workspace.sidebar.options.svg-attrs.title") + :class (stl/css :title-spacing-svg)}] [:& svg-block {:shape shape}]]))) diff --git a/frontend/src/app/main/ui/viewer/inspect/attributes/text.cljs b/frontend/src/app/main/ui/viewer/inspect/attributes/text.cljs index 56068bcbe..66db41c7d 100644 --- a/frontend/src/app/main/ui/viewer/inspect/attributes/text.cljs +++ b/frontend/src/app/main/ui/viewer/inspect/attributes/text.cljs @@ -189,9 +189,9 @@ [{:keys [shapes]}] (when-let [shapes (seq (filter has-text? shapes))] [:div {:class (stl/css :attributes-block)} - [:& title-bar {:collapsable? false - :title (tr "inspect.attributes.typography") - :class (stl/css :title-spacing-text)}] + [:& title-bar {:collapsable false + :title (tr "inspect.attributes.typography") + :class (stl/css :title-spacing-text)}] (for [shape shapes] [:& text-block {:shape shape diff --git a/frontend/src/app/main/ui/viewer/inspect/exports.cljs b/frontend/src/app/main/ui/viewer/inspect/exports.cljs index da23a0ad7..b9847866d 100644 --- a/frontend/src/app/main/ui/viewer/inspect/exports.cljs +++ b/frontend/src/app/main/ui/viewer/inspect/exports.cljs @@ -136,9 +136,9 @@ vec)))) [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? false - :title (tr "workspace.options.export") - :class (stl/css :title-spacing-export-viewer)} + [:& title-bar {:collapsable false + :title (tr "workspace.options.export") + :class (stl/css :title-spacing-export-viewer)} [:button {:class (stl/css :add-export) :on-click add-export} i/add-refactor]]] diff --git a/frontend/src/app/main/ui/workspace/libraries.cljs b/frontend/src/app/main/ui/workspace/libraries.cljs index e8a74b563..67dc5df16 100644 --- a/frontend/src/app/main/ui/workspace/libraries.cljs +++ b/frontend/src/app/main/ui/workspace/libraries.cljs @@ -199,9 +199,9 @@ [:* [:div {:class (stl/css :section)} - [:& title-bar {:collapsable? false - :title (tr "workspace.libraries.in-this-file") - :class (stl/css :title-spacing-lib)}] + [:& title-bar {:collapsable false + :title (tr "workspace.libraries.in-this-file") + :class (stl/css :title-spacing-lib)}] [:div {:class (stl/css :section-list)} [:div {:class (stl/css :section-list-item)} @@ -245,9 +245,9 @@ i/detach-refactor]])]] [:div {:class (stl/css :section)} - [:& title-bar {:collapsable? false - :title (tr "workspace.libraries.shared-libraries") - :class (stl/css :title-spacing-lib)}] + [:& title-bar {:collapsable false + :title (tr "workspace.libraries.shared-libraries") + :class (stl/css :title-spacing-lib)}] [:div {:class (stl/css :libraries-search)} [:& search-bar {:on-change change-search-term :value search-term diff --git a/frontend/src/app/main/ui/workspace/sidebar.cljs b/frontend/src/app/main/ui/workspace/sidebar.cljs index faa27b292..d0fba4fc2 100644 --- a/frontend/src/app/main/ui/workspace/sidebar.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar.cljs @@ -55,7 +55,9 @@ (mf/use-fn #(st/emit! (dw/toggle-layout-flag :collapse-left-sidebar))) on-tab-change - (mf/use-fn #(st/emit! (dw/go-to-layout %)))] + (mf/use-fn #(do + (prn "on-tab-change" %) + (st/emit! (dw/go-to-layout %))))] [:aside {:ref parent-ref :id "left-sidebar-aside" diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets/common.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets/common.cljs index c6d63c7d3..d421f90a9 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets/common.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets/common.cljs @@ -136,9 +136,9 @@ title-buttons (filter #(= (get-role %) :title-button) children) content (filter #(= (get-role %) :content) children)] [:div {:class (stl/css :asset-section)} - [:& title-bar {:collapsable? true - :collapsed? (not open?) - :clickable-all? true + [:& title-bar {:collapsable true + :collapsed (not open?) + :all-clickable true :on-collapsed #(st/emit! (dw/set-assets-section-open file-id section (not open?))) :class (stl/css :title-spacing) :title (mf/html [:span {:class (stl/css :title-name)} @@ -154,6 +154,7 @@ content)])) (mf/defc asset-section-block + {::mf/wrap-props false} [{:keys [children]}] [:* children]) @@ -161,11 +162,11 @@ [rename components-to-group group-name] (let [undo-id (js/Symbol)] (st/emit! (dwu/start-undo-transaction undo-id)) - (apply st/emit! - (->> components-to-group - (map #(rename - (:id %) - (add-group % group-name))))) + (->> components-to-group + (map #(rename + (:id %) + (add-group % group-name))) + (run! st/emit!)) (st/emit! (dwu/commit-undo-transaction undo-id)))) (defn on-drop-asset diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets/file_library.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets/file_library.cljs index f9fcbc82a..2b025708b 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets/file_library.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets/file_library.cljs @@ -52,9 +52,9 @@ (fn [] (st/emit! (dw/set-assets-section-open file-id :library (not open?)))))] [:div {:class (stl/css :library-title)} - [:& title-bar {:collapsable? true - :collapsed? (not open?) - :clickable-all? true + [:& title-bar {:collapsable true + :collapsed (not open?) + :all-clickable true :on-collapsed toggle-open :title (if local? (mf/html [:div {:class (stl/css :special-title)} diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets/groups.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets/groups.cljs index 2705c891c..bbc02f72a 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets/groups.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets/groups.cljs @@ -46,9 +46,9 @@ (mf/use-fn #(swap! menu-state cmm/close-context-menu))] [:div {:class (stl/css :group-title) :on-context-menu on-context-menu} - [:& title-bar {:collapsable? true - :collapsed? (not group-open?) - :clickable-all? true + [:& title-bar {:collapsable true + :collapsed (not group-open?) + :all-clickable true :on-collapsed on-fold-group :title (mf/html [:* (when-not (empty? other-path) [:span {:class (stl/css :pre-path) diff --git a/frontend/src/app/main/ui/workspace/sidebar/layers.cljs b/frontend/src/app/main/ui/workspace/sidebar/layers.cljs index 296daa7b3..b30643495 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/layers.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/layers.cljs @@ -374,7 +374,7 @@ i/tick-refactor])]])] [:div {:class (stl/css :tool-window-bar)} - [:& title-bar {:collapsable? false + [:& title-bar {:collapsable false :title (:name page) :on-btn-click toggle-search :btn-children i/search-refactor}]]))])) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/blur.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/blur.cljs index 989d262b1..102c9e68c 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/blur.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/blur.cljs @@ -77,8 +77,8 @@ [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? has-value? - :collapsed? (not open?) + [:& title-bar {:collapsable has-value? + :collapsed (not open?) :on-collapsed toggle-content :title (case type :multiple (tr "workspace.options.blur-options.title.multiple") diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/color_selection.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/color_selection.cljs index 6dce1cc00..0fdc7d474 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/color_selection.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/color_selection.cljs @@ -215,8 +215,8 @@ [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? has-colors? - :collapsed? (not open?) + [:& title-bar {:collapsable has-colors? + :collapsed (not open?) :on-collapsed toggle-content :title (tr "workspace.options.selection-color") :class (stl/css-case :title-spacing-selected-colors (not has-colors?))}]] diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs index 2dbc35ab5..2723cce6d 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs @@ -484,8 +484,8 @@ :on-click on-component-back} [:span i/arrow-refactor] [:span (tr "workspace.options.component")]] - [:& title-bar {:collapsable? true - :collapsed? (not open?) + [:& title-bar {:collapsable true + :collapsed (not open?) :on-collapsed toggle-content :title (tr "workspace.options.component") :class (stl/css :title-spacing-component)}])] diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/constraints.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/constraints.cljs index 35b72810e..d0d5b145b 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/constraints.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/constraints.cljs @@ -157,8 +157,8 @@ (when in-frame? [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? true - :collapsed? (not open?) + [:& title-bar {:collapsable true + :collapsed (not open?) :on-collapsed toggle-content :title (tr "workspace.options.constraints")}]] (when open? diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/exports.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/exports.cljs index 72556669d..b27efded9 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/exports.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/exports.cljs @@ -171,8 +171,8 @@ [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? has-exports? - :collapsed? (not open?) + [:& title-bar {:collapsable has-exports? + :collapsed (not open?) :on-collapsed toggle-content :title (tr (if (> (count ids) 1) "workspace.options.export-multiple" "workspace.options.export")) :class (stl/css-case :title-spacing-export (not has-exports?))} diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/fill.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/fill.cljs index 4e45960c5..eb6eff7f2 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/fill.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/fill.cljs @@ -137,8 +137,8 @@ [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? has-fills? - :collapsed? (not open?) + [:& title-bar {:collapsable has-fills? + :collapsed (not open?) :on-collapsed toggle-content :title label :class (stl/css-case :title-spacing-fill (not has-fills?))} diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/frame_grid.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/frame_grid.cljs index 8191cf090..0e8d126b0 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/frame_grid.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/frame_grid.cljs @@ -294,8 +294,8 @@ handle-create-grid (mf/use-fn (mf/deps id) #(st/emit! (dw/add-frame-grid id)))] [:div {:class (stl/css :element-set)} - [:& title-bar {:collapsable? has-frame-grids? - :collapsed? (not open?) + [:& title-bar {:collapsable has-frame-grids? + :collapsed (not open?) :on-collapsed toggle-content :class (stl/css-case :title-spacing-board-grid (not has-frame-grids?)) :title (tr "workspace.options.guides.title")} diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/grid_cell.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/grid_cell.cljs index dacb1d8d7..f1c83cbbc 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/grid_cell.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/grid_cell.cljs @@ -165,8 +165,8 @@ [:div {:class (stl/css :grid-cell-menu)} [:div {:class (stl/css :grid-cell-menu-title)} - [:& title-bar {:collapsable? true - :collapsed? (not open?) + [:& title-bar {:collapsable true + :collapsed (not open?) :on-collapsed #(swap! state* update :open not) :title "Grid cell"}]] diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/interactions.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/interactions.cljs index 42c371801..d88daf5c4 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/interactions.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/interactions.cljs @@ -157,9 +157,9 @@ [{:keys [flows]}] (when (seq flows) [:div {:class (stl/css :interaction-options)} - [:& title-bar {:collapsable? false - :title (tr "workspace.options.flows.flow-starts") - :class (stl/css :title-spacing-layout-flow)}] + [:& title-bar {:collapsable false + :title (tr "workspace.options.flows.flow-starts") + :class (stl/css :title-spacing-layout-flow)}] (for [flow flows] [:& flow-item {:flow flow :key (str (:id flow))}])])) @@ -170,9 +170,9 @@ add-flow (mf/use-fn #(st/emit! (dwi/add-flow-selected-frame)))] [:div {:class (stl/css :element-set)} - [:& title-bar {:collapsable? false - :title (tr "workspace.options.flows.flow") - :class (stl/css :title-spacing-layout-flow)} + [:& title-bar {:collapsable false + :title (tr "workspace.options.flows.flow") + :class (stl/css :title-spacing-layout-flow)} (when (nil? flow) [:button {:class (stl/css :add-flow-btn) :title (tr "workspace.options.flows.add-flow-start") @@ -712,9 +712,9 @@ [:div {:class (stl/css :interaction-options)} (when (and shape (not (cfh/unframed-shape? shape))) [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? false - :title (tr "workspace.options.interactions") - :class (stl/css :title-spacing-layout-interactions)} + [:& title-bar {:collapsable false + :title (tr "workspace.options.interactions") + :class (stl/css :title-spacing-layout-interactions)} [:button {:class (stl/css :add-interaction-btn) :on-click add-interaction} diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs index b2e48ab8c..35901bda9 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs @@ -895,8 +895,8 @@ [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? has-layout? - :collapsed? (not open?) + [:& title-bar {:collapsable has-layout? + :collapsed (not open?) :on-collapsed toggle-content :title "Layout" :class (stl/css-case :title-spacing-layout (not has-layout?))} diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs index 5d98c2b6e..6edb37176 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs @@ -361,8 +361,8 @@ [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? has-content? - :collapsed? (not open?) + [:& title-bar {:collapsable has-content? + :collapsed (not open?) :on-collapsed toggle-content :title title :class (stl/css-case :title-spacing-layout-element true diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/shadow.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/shadow.cljs index 063466dcc..fb31665c4 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/shadow.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/shadow.cljs @@ -288,8 +288,8 @@ [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? has-shadows? - :collapsed? (not open?) + [:& title-bar {:collapsable has-shadows? + :collapsed (not open?) :on-collapsed toggle-content :title (case type :multiple (tr "workspace.options.shadow-options.title.multiple") diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/stroke.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/stroke.cljs index 093434da9..337882fe9 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/stroke.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/stroke.cljs @@ -163,8 +163,8 @@ [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? has-strokes? - :collapsed? (not open?) + [:& title-bar {:collapsable has-strokes? + :collapsed (not open?) :on-collapsed toggle-content :title label :class (stl/css-case :title-spacing-stroke (not has-strokes?))} diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/svg_attrs.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/svg_attrs.cljs index 2092e5510..3891f5556 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/svg_attrs.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/svg_attrs.cljs @@ -86,8 +86,8 @@ (when-not (empty? attrs) [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-set-title)} - [:& title-bar {:collapsable? has-attributes? - :collapsed? (not open?) + [:& title-bar {:collapsable has-attributes? + :collapsed (not open?) :on-collapsed toggle-content :title (tr "workspace.sidebar.options.svg-attrs.title") :class (stl/css-case :title-spacing-svg-attrs (not has-attributes?))}]] diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs index 913630f04..882eb4aee 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs @@ -283,8 +283,8 @@ [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? true - :collapsed? (not main-menu-open?) + [:& title-bar {:collapsable true + :collapsed (not main-menu-open?) :on-collapsed toggle-main-menu :title label :class (stl/css :title-spacing-text)} diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/page.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/page.cljs index 9a99b7dbf..791d7d3da 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/page.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/page.cljs @@ -28,9 +28,9 @@ on-close (mf/use-fn #(st/emit! (dwu/commit-undo-transaction :options)))] [:div {:class (stl/css :element-set)} [:div {:class (stl/css :element-title)} - [:& title-bar {:collapsable? false - :title (tr "workspace.options.canvas-background") - :class (stl/css :title-spacing-page)}]] + [:& title-bar {:collapsable false + :title (tr "workspace.options.canvas-background") + :class (stl/css :title-spacing-page)}]] [:div {:class (stl/css :element-content)} [:& color-row {:disable-gradient true diff --git a/frontend/src/app/main/ui/workspace/sidebar/sitemap.cljs b/frontend/src/app/main/ui/workspace/sidebar/sitemap.cljs index 0c0d6a94b..071a5a642 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/sitemap.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/sitemap.cljs @@ -210,12 +210,12 @@ [:div {:class (stl/css :sitemap) :style #js {"--height" (str size "px")}} - [:& title-bar {:collapsable? true - :collapsed? (not show-pages?) - :on-collapsed toggle-pages - :clickable-all? true - :title (tr "workspace.sidebar.sitemap") - :class (stl/css :title-spacing-sitemap)} + [:& title-bar {:collapsable true + :collapsed (not show-pages?) + :on-collapsed toggle-pages + :all-clickable true + :title (tr "workspace.sidebar.sitemap") + :class (stl/css :title-spacing-sitemap)} (if ^boolean read-only? [:di {:class (stl/css :view-only-mode)}