Skip to content
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

Autosuggest - no results, loading indicator #1610

Closed
MichaelSchober opened this issue Jan 3, 2020 · 4 comments
Closed

Autosuggest - no results, loading indicator #1610

MichaelSchober opened this issue Jan 3, 2020 · 4 comments
Assignees
Milestone

Comments

@MichaelSchober
Copy link

Describe your question
I couldn't find anything in the docs or in the issues, so I am asking here. I hope thats alright.

  1. Is there a way to add a Custom text which will be displayed in the results if autosuggest requests returns 0 results being found?
  2. Is there a way for Autosuggest to show that currently new results are being loaded?

If the answer in both cases is no, can I add enhancement issues?
I hope its okay that i created a question and not enhancements right away.
Thank you for you help and for this awesome plugin!

@MichaelSchober MichaelSchober added the type:question Further information is requested. label Jan 3, 2020
@brandwaffle
Copy link
Contributor

brandwaffle commented Jan 3, 2020

Hi @MichaelSchober thanks for submitting this ticket!

For #1, I think that's a great idea. You could likely pull this off with some filters and a bit of clever JS at this point, but I certainly feel it's a worthy feature and we should add it to the plugin. Can you create a new ticket for the enhancement and please drop in any mockups or even just sketched out layouts for how you would see the UX working?

For #2, I think the idea is a great one, but I'm having a tough time thinking through how we'd indicate something like that given that each time a character is typed a new search occurs. We intentionally stay away from the visual side of things a lot with Autosuggest so that the site's theme will dictate the look and feel of how those elements appear. Is there a site that already does this that you like and could share as an example? Again, I think it's a worthwhile addition but I wouldn't want things to get in the "way" of someone continuing to type.

@brandwaffle brandwaffle self-assigned this Jan 7, 2020
@rhedman
Copy link

rhedman commented Oct 21, 2020

@brandwaffle

I'm also looking to solve the #2 issue. Couldn't the plugin offer either a "loading" event that can be used to do hook some JS magic to or simple just add a CSS-class to the search input e.g "is-loading" when a new result is being fetched (and then remove the class again). This way it would be easy to visually indicate that the search is loading and the plugin itself still stays away from "the visual side of things".

@felipeelia
Copy link
Member

Hey @MichaelSchober and @rhedman ,

Can you both please check if #2070 works as you'd expect? Thanks!

brandwaffle added a commit that referenced this issue Feb 22, 2021
Add a class to the search form when autosuggestions are loading. Addresses #1610.
@felipeelia
Copy link
Member

Closing this one. For future reference, this is the page in the docs explaining the new feature: http://10up.github.io/ElasticPress/tutorial-theme-integration.html

@felipeelia felipeelia modified the milestones: 3.6.0, 3.5.5 Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants