-
Notifications
You must be signed in to change notification settings - Fork 91
feat(search): quick and dirty algolia prototype #174
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?
Conversation
|
@Haroenv is attempting to deploy a commit to the danielroe Team on Vercel. A member of the Team first needs to authorize it. |
| return promise | ||
| } | ||
|
|
||
| const ALGOLIA_SEARCH = true |
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.
put in a proper global flags system
| .then(({ results }) => { | ||
| const response = results[0] as SearchResponse<AlgoliaSearchResult> | ||
| return { | ||
| objects: response.hits.map<NpmSearchResult>(hit => ({ |
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.
clean this mapping a bit, somewhat superfluous now.
| searchInputRef.value?.focus() | ||
| }) | ||
|
|
||
| const ALGOLIA = true |
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.
put in a proper global flags system
| </button> | ||
| <!-- Hidden submit button for accessibility (form must have submit button per WCAG) --> | ||
| <button type="submit" class="sr-only">{{ t('search.button') }}</button> | ||
| <button type="submit" class="sr-only"> |
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.
undo auto-formatting?
ref: #32
This is just a prototype to see what it takes to swap out the search for Algolia.
DONE:
TODO:
What do you think?