diff --git a/CHANGES.md b/CHANGES.md index 6b303c241..cab9f0cbb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,7 @@ ### :bug: Bugs fixed +- Fix fill collapsed options [Taiga #8351](https://tree.taiga.io/project/penpot/issue/8351) - Fix scroll on color picker modal [Taiga #8353](https://tree.taiga.io/project/penpot/issue/8353) - Fix components are not dragged from the group to the assets tab [Taiga #8273](https://tree.taiga.io/project/penpot/issue/8273) 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 3d8574ef1..d19a39250 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 @@ -49,23 +49,23 @@ (tr "workspace.options.fill")) ;; Excluding nil values - values (d/without-nils values) - fills (:fills values) - has-fills? (or (= :multiple fills) (some? (seq fills))) + values (d/without-nils values) + fills (:fills values) + has-fills? (or (= :multiple fills) (some? (seq fills))) - state* (mf/use-state has-fills?) - open? (deref state*) + state* (mf/use-state true) + open? (deref state*) - toggle-content (mf/use-fn #(swap! state* not)) + toggle-content (mf/use-fn #(swap! state* not)) - open-content (mf/use-fn #(reset! state* true)) + open-content (mf/use-fn #(reset! state* true)) - close-content (mf/use-fn #(reset! state* false)) + close-content (mf/use-fn #(reset! state* false)) hide-fill-on-export? (:hide-fill-on-export values false) - checkbox-ref (mf/use-ref) + checkbox-ref (mf/use-ref) on-add (mf/use-fn @@ -149,7 +149,7 @@ :data-testid "add-fill" :on-click on-add} i/add])]] - (when open? + (when (and open? has-fills?) [:div {:class (stl/css :element-content)} (cond (= :multiple fills)