Closed Bug 896969 Opened 11 years ago Closed 4 years ago

Experiment with dictionary based weighted auto completion

Categories

(DevTools :: General, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: Optimizer, Unassigned)

References

Details

The main idea behind is here[0]. Basically, alphabetically chosen first entry is not always what the user wants and thus the user will have to navigate to the desired entry (or type enough characters to make the desired entry as the first suggestion) wherever a popup based suggestion is used.

Right now (or in near future) in DevTools, popup based suggestions are made at :

1) Debugger's search for
 - script names
 - function names
2) Inspector's search for selectors [Although this one already has weighted suggestions based on # of occurrence of the selector]
3) CSS completions in
 - Rule view (property name and value)
 - Markup Panel attribute editing
 - Style editor (property name and value)
4) Web Console JSTerm suggestions.

The idea is to create a centralized Dictionary system where anyone can create a persistent-across-sessions dictionary using a uuid and then update the dictionary as the user chooses things from the suggestions. A sample structure of the dictionary would be:

[{
   word: "someWord",
   weight: 4
},...
]

(implementation can be done using hashmap)

This way the suggestion popup will be able to highlight the most favorable/desired suggestion based on user history as the user uses the dictionary.

This will allow us to auto select "getElementById" as soon as the user does "document.g" instead of selecting "getAnonymousElementByAttribute" . Or, "display" when the user types "d" in rule view instead of "direction".

We can also have a sample/default dictionary for some cases like JSTerm and CSS Properties where we can give a higher weight to some known more preferred suggestions.

[0] : https://bugzilla.mozilla.org/show_bug.cgi?id=893965#c8
Here is a script that was ran against a list of popular websites done to come up with a default weighting for the CSS dictionary: https://gist.github.com/NV/3751436.

Relevant webkit bug: https://bugs.webkit.org/show_bug.cgi?id=96763
Product: Firefox → DevTools

Nicolas, is this bug still relevant or we can close it?
Honza

Flags: needinfo?(nchevobbe)

For the console, we have a bug to display the object own properties first, which is I think what we want.
For CSS properties, I think we already order by most used, but Gabe would know better.

Flags: needinfo?(nchevobbe) → needinfo?(gl)

This is probably relevant for CSS properties value but we currently sort CSS properties in https://searchfox.org/mozilla-central/source/devtools/client/shared/suggestion-picker.js#62

Flags: needinfo?(gl)

Thanks for the response Gabriel.

I am going to go ahead and close this bug. It's 7 years old and it looks like outdated.

But, please, feel free to reopen (or ping me) if you still see an issue.

Honza

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.