-
Notifications
You must be signed in to change notification settings - Fork 54
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
This there a way to add recent searches to autocomplete #420
Comments
TLDR: this is mostly just an informational reply about current status about what's shipped by default and in-the-works changes. We fully admit that at the moment we still have the 0.38.x version of autocomplete as the default setup/template out of box, but haven't fully attempted to do an update yet to allow for choosing version 1.x. The biggest hurdle is that we can't necessarily accurately target the search field any more since 1.x Autocomplete expects a container provided as such: That said, we do have a branch of the plugin that is meant to offer the ability to choose what we call "legacy" vs "modern" in terms of intended UI changes. You can see the autocomplete.php template that that would ship with, over at https://github.com/WebDevStudios/wp-search-with-algolia/blob/feature/272-autocomplete-upgrade/templates/autocomplete-modern.php That said, just making use of that as a starter won't necessarily get you all the way through, as you'd still need to implement and load the newer Autocomplete libraries as well. That said, I'm definitely curious how ready the branch is overall, outside of the Whole branch if curious https://github.com/WebDevStudios/wp-search-with-algolia/tree/feature/272-autocomplete-upgrade |
Michael, Thanks for the quick response. Looking at the autocomplete-modern.php template, it does look like the code in the link I sent. I'll try pulling that branch down to a test environment and playing with it. Thanks again! |
For what it's worth, you'll most likely need to run things like |
I was wondering if there is a way to show the recent searches a user has made. There is documentation on the Algolia docs on how to do this, but I'm not sure how to implement this in the way that this plugin sets up autocomplete. They use the createLocalStorageRecentSearchesPlugin in the algolia library.
https://www.algolia.com/doc/ui-libraries/autocomplete/guides/adding-recent-searches/
Anyone else implemented this feature?
The text was updated successfully, but these errors were encountered: