🐛 Allow lowercase search for fonts

This commit is contained in:
alonso.torres 2021-10-06 16:18:34 +02:00
parent 54e7e44df1
commit 1f5e974cfc
4 changed files with 10 additions and 2 deletions

View file

@ -20,6 +20,7 @@
- Fix residual stroke on imported svg [Taiga #2125](https://tree.taiga.io/project/penpot/issue/2125) - Fix residual stroke on imported svg [Taiga #2125](https://tree.taiga.io/project/penpot/issue/2125)
- Add links for terms of service and privacy policy in register checkbox [Taiga #2020](https://tree.taiga.io/project/penpot/issue/2020) - Add links for terms of service and privacy policy in register checkbox [Taiga #2020](https://tree.taiga.io/project/penpot/issue/2020)
- Allow three character hex and web colors in color picker hex input [#1184](https://github.com/penpot/penpot/issues/1184) - Allow three character hex and web colors in color picker hex input [#1184](https://github.com/penpot/penpot/issues/1184)
- Allow lowercase search for fonts [#1180](https://github.com/penpot/penpot/issues/1180)
### :arrow_up: Deps updates ### :arrow_up: Deps updates
### :boom: Breaking changes ### :boom: Breaking changes

View file

@ -74,7 +74,8 @@
(defn filter-fonts (defn filter-fonts
[{:keys [term backends]} fonts] [{:keys [term backends]} fonts]
(let [xform (cond-> (map identity) (let [term (str/lower term)
xform (cond-> (map identity)
(seq term) (seq term)
(comp (filter #(str/includes? (str/lower (:name %)) term))) (comp (filter #(str/includes? (str/lower (:name %)) term)))
@ -175,7 +176,7 @@
[:div.font-selector [:div.font-selector
[:div.font-selector-dropdown [:div.font-selector-dropdown
[:header [:header
[:input {:placeholder "Search font" [:input {:placeholder (tr "workspace.options.search-font")
:value (:term @state) :value (:term @state)
:ref input :ref input
:spell-check false :spell-check false

View file

@ -3183,3 +3183,6 @@ msgstr "Flatten"
msgid "workspace.shape.menu.transform-to-path" msgid "workspace.shape.menu.transform-to-path"
msgstr "Transform to path" msgstr "Transform to path"
msgid "workspace.options.search-font"
msgstr "Search font"

View file

@ -3071,3 +3071,6 @@ msgstr "Aplanar"
msgid "workspace.shape.menu.transform-to-path" msgid "workspace.shape.menu.transform-to-path"
msgstr "Convertir en vector" msgstr "Convertir en vector"
msgid "workspace.options.search-font"
msgstr "Buscar fuente"