juxtopposed / realtimecolors

Real-time UI Colorpicking Tool. See your favorite colors of choice for a website in real time.
https://realtimecolors.com
Other
798 stars 31 forks source link

[Bug]: Font names match input only at start #88

Closed PositiveUser closed 8 months ago

PositiveUser commented 11 months ago

Is there an existing issue for this?

Describe the bug

While I type in a font input, the fonts names shown/suggested only match at the start instead of matching the input anywhere in the font name. I don't quite like this.

Example:

I wanted "Playfair Display".

I typed "display" which the font name "Playfair Display" doesn't start with: I did not see "Playfair Display".

However, when I typed "playf" that font name / string "Playfair Display" does start with: I did see "Playfair Display".

Reproduction Steps

(Bug description)

Expected behavior

I want what I font input to match anywhere in the font names instead of just the start.

Screenshots

:( image

:) image

Device Info

Not specific to a browser/device

Additional context

No response

Saigenix commented 11 months ago

Can I solve this ?

juxtopposed commented 11 months ago

This is updated in v3.3.1

PositiveUser commented 11 months ago

More like below instead

[
    ...fontsSuggestions
        .filter(s => s.toLowerCase().startsWith(input)),
    ...fontsSuggestions
        .filter(s => !s.toLowerCase().startsWith(input)),
]

A list where you show the font suggestions starting with the input first.

juxtopposed commented 8 months ago

The matched parts of the fonts now become bold in any part of the font name to help both with readability and increasing the reach and accuracy (v3.6). Let me know if it works.

PositiveUser commented 8 months ago

That can work