4 ms·
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 prefi
by NationOfJoe 8y ago
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 option and allow me to choose the help with right arrow or something
- cstrat 8y agoI 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.
- pests 8y agoThe 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]" <- Typed "[G]{oo}" <- Displayed in input, with Google/GoodReads as options "[Goo]" <- Tab Pressed "[GoodReads"] <- R Pressed "[Google"] <- g pressed "[Gx]" <- Any other character x 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]" <- Typed "[G]{oogle}" <- Displayed "[G]" <- Backspace pressed
- HeyImAlex 8y agoUsually I've seen right arrow as the activation key.
- rndgermandude 8y agoDon't make me backspace twice when I want to type "Github" but it isn't in autocomplete yet.
- adrianN 8y agoThis needs to special case when the next character that would break the ambiguity can also be an o.
- meuk 8y agoThat's horrible. What if you want to type 'Ggle'?
- cstrat 8y agoI think this type of Autocomplete only works on fixed lists. You're right, it would be completely annoying if it were a free text field with autocomplete suggestions...
- jraph 8y agoYou could type G, "oo" gets appended but selected so right arrow validates the suggestion, and continuing typing overwrites the suggestion and the second "o" is appended again if you type "o". Then "gle" is appended because it is more frequent but if you type "d" "gle" is replaced by "dread", with " read selected" Firefox does that in the address bar.
- ygra 8y agoI think this suggestion comes from what Unix shells do, albeit I'd say that auto-complete there works rather different from how it usually works in GUI applications, browsers, and web applications. It's a model that's useful for some (I personally can't stand it exactly because it amends the input in unpredictable ways, but others get annoyed when a shell doesn't provide it like they're used to), but unless talking on HN it's probably a minority of users that like and prefer it.