Live data from Hacker News

Rules for Autocomplete

jeremymikkola.com

11–20 of 151 posts

Re: Rules for Autocomplete

#11
> Besides exact matches, prefix matches come first.

Google Maps used to do this, and when I entered "9831 Main St, Funky Town" once and a day later I would not remember the street number. Entering "Main" would not give me what I wanted.

Google Maps does what I want now AFAICT and entering "Main" will return "9831 Main St, Funky Town" first.

Re: Rules for Autocomplete

#13
post #9

One rule I always consider important: > If I type the next letter of the top match, it should remain the top match. I find these types of inductive rules might be a better way to express how autocomplete should work (given a limited universe of suggestions).

> If I type the next letter of the top match, it should remain the top match.

How would this not always be the case anyway given the other rules in place?

Re: Rules for Autocomplete

#15
Please add to the list: Auto detect language! It’s super frustrating when you try to write to your German friend and autocorrect just keeps mutilating perfectly good German words into gibberish (e.g. it’s trying to autocorrect to English etc. default language).

Re: Rules for Autocomplete

#16
post #13
post #9

One rule I always consider important: > If I type the next letter of the top match, it should remain the top match. I find these types of inductive rules might be a better way to express how autocomplete should work (given a limited universe of suggestions).

> If I type the next letter of the top match, it should remain the top match. How would this not always be the case anyway given the other rules in place?

Agreed.

Even then its hard to even define the next letter. With sub-sequence matching something like "gsl" might be displayed as "[g]et[D]isplay[L]ist" with items in brackets highlighted. No real next letter in this case.

Re: Rules for Autocomplete

#17
post #15

Please add to the list: Auto detect language! It’s super frustrating when you try to write to your German friend and autocorrect just keeps mutilating perfectly good German words into gibberish (e.g. it’s trying to autocorrect to English etc. default language).

This is talking about search auto-completion and not spelling auto-correct.

Re: Rules for Autocomplete

#18
post #10

Great list. Easy to follow. I will be using this next time i write an auto complete My only objection would be > Autocompletion to the nearest ambiguous prefix. If I type “g” and that matches both “Google” and “GoodReads”, this operation would fill in the two “o”s, allowing me to then type either “g” or “d” to select the option I want. Dont change the input as i am typing otherwise you qill get 4 o's. Show it as an o…

I think I have seen this implemented before and when it inserts the extra 'oo' it automatically ignores extra 'o's that might be typed. It allows for users to actually type Google, but also allows users to type 'Ggle' and get the same response.

The article mentions this being on some activation like tab or similar like bash uses. Automatic completion could work with two levels of highlighting. Example with []/{} showing active/suggestive:

  "[G]" 
Then things like Chrome's url bar will fill in the complete first suggestion with a way to clear it which gives UX like:

  "[G]" 

Re: Rules for Autocomplete

#19
post #17
post #15

Please add to the list: Auto detect language! It’s super frustrating when you try to write to your German friend and autocorrect just keeps mutilating perfectly good German words into gibberish (e.g. it’s trying to autocorrect to English etc. default language).

This is talking about search auto-completion and not spelling auto-correct.

Whoopsie. Caught cold turkey I admit. But for what it’s worth, for text editor and text message spelling autocorrect, auto detect would be nice, even if off-topic.

Re: Rules for Autocomplete

#20
> If an option is highlighted, never change it, even if new data is loaded.

I'd change this to "never change the positions of already visible elements when the person is not typing". Typing something, then trying to click/tap on a result that disappears and gets replaced by something else is infuriating.

Post reply on HN