mirror of
https://github.com/penpot/penpot.git
synced 2025-07-27 07:37:26 +02:00
Revert "✨ Highlight first found font in font list when searching [Taiga #3204]"
This reverts commit 55a13c3139
.
This commit is contained in:
parent
55a13c3139
commit
2e3cdd872c
2 changed files with 3 additions and 9 deletions
|
@ -20,7 +20,6 @@
|
||||||
- Provide CSS `mix-blend-mode` property in code editor when present on shape [Taiga #11282](https://tree.taiga.io/project/penpot/issue/11282)
|
- Provide CSS `mix-blend-mode` property in code editor when present on shape [Taiga #11282](https://tree.taiga.io/project/penpot/issue/11282)
|
||||||
- Add the option to import tokens in a .zip file. [Taiga #11378](https://tree.taiga.io/project/penpot/us/11378)
|
- Add the option to import tokens in a .zip file. [Taiga #11378](https://tree.taiga.io/project/penpot/us/11378)
|
||||||
- New typography token type - font size token [Taiga #10938](https://tree.taiga.io/project/penpot/us/10938)
|
- New typography token type - font size token [Taiga #10938](https://tree.taiga.io/project/penpot/us/10938)
|
||||||
- Highlight first found font in the font list when searching, and allow Enter to select it. [Taiga #3204](https://tree.taiga.io/project/penpot/issue/3204)
|
|
||||||
|
|
||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
- Copying font size does not copy the unit [Taiga #11143](https://tree.taiga.io/project/penpot/issue/11143)
|
- Copying font size does not copy the unit [Taiga #11143](https://tree.taiga.io/project/penpot/issue/11143)
|
||||||
|
|
|
@ -112,13 +112,8 @@
|
||||||
recent-fonts (mf/with-memo [state recent-fonts]
|
recent-fonts (mf/with-memo [state recent-fonts]
|
||||||
(filter-fonts state recent-fonts))
|
(filter-fonts state recent-fonts))
|
||||||
|
|
||||||
full-size? (boolean (and full-size show-recent))
|
|
||||||
|
|
||||||
;; --- NEW: auto-select first font on search ---
|
full-size? (boolean (and full-size show-recent))
|
||||||
_auto-select-first
|
|
||||||
(mf/with-effect [(:term state) fonts]
|
|
||||||
(when (and (seq fonts) (not (str/blank? (:term state))))
|
|
||||||
(reset! selected (first fonts))))
|
|
||||||
|
|
||||||
select-next
|
select-next
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
@ -138,13 +133,13 @@
|
||||||
|
|
||||||
on-key-down
|
on-key-down
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps fonts selected)
|
(mf/deps fonts)
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(cond
|
(cond
|
||||||
(kbd/up-arrow? event) (select-prev event)
|
(kbd/up-arrow? event) (select-prev event)
|
||||||
(kbd/down-arrow? event) (select-next event)
|
(kbd/down-arrow? event) (select-next event)
|
||||||
(kbd/esc? event) (on-close)
|
(kbd/esc? event) (on-close)
|
||||||
(kbd/enter? event) (do (on-select @selected) (on-close))
|
(kbd/enter? event) (on-close)
|
||||||
:else (dom/focus! (mf/ref-val input)))))
|
:else (dom/focus! (mf/ref-val input)))))
|
||||||
|
|
||||||
on-filter-change
|
on-filter-change
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue