diff --git a/CHANGES.md b/CHANGES.md index 4a0d6c3bb..6df4e555c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -32,7 +32,7 @@ - Fix problem with fonts that ends with numbers [#940](https://github.com/penpot/penpot/issues/940). - Fix problem with imported SVG on editing paths [#971](https://github.com/penpot/penpot/issues/971) - Fix problem with color picker positioning - +- Fix order on color palette [#961](https://github.com/penpot/penpot/issues/961) ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/ui/workspace/colorpalette.cljs b/frontend/src/app/main/ui/workspace/colorpalette.cljs index 176cb0d46..d9d4df230 100644 --- a/frontend/src/app/main/ui/workspace/colorpalette.cljs +++ b/frontend/src/app/main/ui/workspace/colorpalette.cljs @@ -209,7 +209,7 @@ (into [] (cond (= selected :recent) (reverse recent-colors) - (= selected :file) (vals file-colors) + (= selected :file) (->> (vals file-colors) (sort-by :name)) :else (library->colors shared-libs selected)))))) (mf/use-effect @@ -222,7 +222,8 @@ (mf/deps file-colors) (fn [] (when (= selected :file) - (reset! current-library-colors (into [] (vals file-colors)))))) + (reset! current-library-colors (into [] (->> (vals file-colors) + (sort-by :name))))))) [:& palette {:left-sidebar? left-sidebar? :current-colors @current-library-colors