thinking about better auto completion (a wizard st...
# thinking-together
e
thinking about better auto completion (a wizard style of auto completion instead of the typical list of options)
I’m reading some docs on indexedDb:
Here’s what visual studio code does on autocomplete of a store object:
Pretty crappy no? I was thinking, what if in addition to the plain of list of methods, there was some wizard style completion?
👍 1
db.[CTRL-SPACE]: “What do you want to do:”Add, remove, list, etc…
Add: “Ok, you can add with 1) one argument (just the data) or 2) two arguments (data and primary key). Since you already specified an index key in line 53 of some_file.ts, we recommend option 1”
1: add(“placeholder”);
👍 3
etc.
So the documentation would have to be written in a way that allows for rendering such wizard-dialogs. Also would need to have some way to tap into code analysis ("has a method addIndex been called already on this
db
object? then display this message, etc)
this could live alongside the traditional list-of-methods completion
-- an alternative would be to have a code-lens like annotation "warning: calling add with 2 params but you added an index on line 53".
g
@Robbie Gleichman and I were just talking about this in a donut call
I’ll splat out some thoughts when i’m done with a family event thing this evening
h
fwiw in my experience with smart UX folks wizards tend to be poo-poo'd because they prescribe an order in which you need to work, which is cumbersome for the uninitiated and too slow for the experts
i think your general point makes a lot of sense and that the tools that already have an index of all the possible things you could choose to input could help you input the right one faster than just giving you a string search of the input, but, i am not sure that the prescriptive survey-style wizard would actually be any better
💯 1
wizards are kind of anti-direct-manipulation IMO because they invent/require more interactions that are unrelated to the medium being manipulated
🤔 1
e
Yeah wizards have a bad reputation, perhaps the good old auto complete mechanic could be retained, but with better options and info
s
Relevant to this discussion might be Smalltalk's find-by-example and Haskell's Hoogle (search by type).
🎉 3
e
good point, I think 90% of the time the examples are the most useful part of the docs