The autocomplete should only start sending requests once there's more than n characters because the results for a single char aren't that useful.
In the past typical values for n would be 2-3 chars - it'll make sense to make this configurable so it's easily tweaked. Let's start with 2 chars and go from there.
Hi @muffinresearch , I would like to work on this bug! :)
Mentor: @tofumatt
@muffinresearch I would like to suggest using lodash to handle API requests made in every few second using debounce.
Hey @hellokarthic are you still actively working on this issue ?
we already have a debounce implementation.
Great! @willdurand let's use that. I think that would be better for autocompletion
Hey @abiduzz420, it looks like @hellokarthic isn't working on this bug. Do you want to pick it up?
Yeah sure @caitmuenster I will need to do bit of groundwork before I finally write the code. I shall share the progress soon.
Thanks for the heads up, @abiduzz420! Are you still working on this?
I am so sorry @caitmuenster I have not been able to juggle between different works. I would like some body else to take it up. Apologies :(
No worries at all, @abiduzz420! I'll unassign you from this for now but you are always welcome to come back and pick it up, or try another good first bug. :)
Hey everyone - I'm coming over from addons-server and would love to pick up this bug as my first for the front-end!
I've done some digging and have found the following code block that looks of interest:
https://github.com/mozilla/addons-frontend/blob/master/src/amo/components/SearchForm/index.js#L139-L156
I'll open up a PR and continue my work from there! ✌🏽
Why do we still need this feature given that we have a debounce function?
Because search results for single-characters or even two characters are not relevant (it's nigh-impossible to return a good autocomplete suggestion from "t" or "b"). They end up just being extra requests that clutter the UI and reduce the first relevant set of autocomplete results.
It's pretty common for sites not to autocomplete until a few characters.
The autocomplete is initiated when the third char is typed.
This issue is verified on AMO dev with FF59 (Win10).
Here's the new versus the old behavior
