Skip to content

Search Typeahead - Correction to styling issue with highligting of dropdown results #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kristoffersurrow
Copy link

There currently a styling issue with highligting of the dropdown results.
It marks everything after the searchTerm. The fix was quite simple.

Before
image

After
image

@nicped
Copy link
Member

nicped commented May 7, 2025

Not sure we agree it should be like that...

The current behavior is based off how other search engines behave:

image
image

Also we try to adhere to UX guidelines from sources like Baymard:
https://baymard.com/premium/blog/autocomplete-design

@kristoffersurrow
Copy link
Author

Hi Nikolaj.
I see your point.
I think I've seen this both ways.

  1. What is searched is highlighted
  2. What is suggested is highlighted

Given that Swift is highlighting what is suggested, maybe theres an issue with Swift only highlighing the text after the search term (Not addressed in this PR).

When searching for "road" I would think that "scattante ssr" also should be highlighted, as it is suggested?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants