-
Notifications
You must be signed in to change notification settings - Fork 311
[WIP] Orama search #2426
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
base: main
Are you sure you want to change the base?
[WIP] Orama search #2426
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
Perhaps we could have the readme note which option we are using instead of listing all the possibilities. Good to have them all listed, but stating which one we are adopting would be useful for future us.
_components/SearchInput.tsx
Outdated
@@ -7,7 +7,7 @@ export default function SearchInput() { | |||
type="search" | |||
placeholder="Search" | |||
id="orama-search-input" | |||
className="w-full min-w-24 rounded-lg text-sm leading-normal p-1 pl-8 border transition-all duration-150 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making the text normal-sized prevents iOS from zooming the input
search.client.ts
Outdated
@@ -454,7 +454,7 @@ class OramaSearch { | |||
); | |||
return text.replace( | |||
regex, | |||
'<mark class="bg-runtime px-1 py-0.5 rounded text-black font-bold">$1</mark>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Less padding on the sides prevents partial-word highlights from looking goofy (e.g, if the user enters "Types" and gets a hit for "TypeScript")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we may want to continue tweaking our algorithm, but I'm happy with this. Excellent work @thisisjofrank 👏
Move search over to Orama
Features:
Usage: