Open Bug 1263097 Opened 8 years ago Updated 2 years ago

StyleEditor: autocomplete should highlight the best CSS property by default

Categories

(DevTools :: Style Editor, defect, P3)

48 Branch
defect

Tracking

(firefox48 affected)

Tracking Status
firefox48 --- affected

People

(Reporter: jdescottes, Unassigned)

References

Details

(Whiteboard: [btpp-backlog])

Follow up to bug 1168246, which implemented this for the rule-view.

STRs:
- open styleeditor
- edit a rule
- start typing "w" to create a new property

ER: Autocomplete selects the most used property "width"
AR: Autocomplete selects the first property based on the alphabetical order "white-space"

The goal is to reuse the suggestion picker implemented in Bug 1168246.
The StyleEditor autocompletion is handled by:
- /devtools/client/sourceeditor/autocomplete.js
- /devtools/client/sourceeditor/css-autocompleter.js

css-autocompleter is called by autocomplete.js to build the suggestion list. autocomplete.js uses this list to call setItems on an autocomplete-popup instance.
setItems accepts an optional parameter to select an item other than the first of the list. 

The suggestion-picker is implemented in /devtools/client/shared/suggestion-picker.js and you can find an example usage in /devtools/client/shared/inplace-editor.js::_maybeSuggestCompletion
Has Regression Range: --- → irrelevant
See Also: → 1168246
Triaging (filter on CLIMBING SHOES).
Priority: -- → P3
Whiteboard: [btpp-backlog]
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.