DevTools autocomplete "count" feature unused and should be removed

NEW
Unassigned

Status

enhancement
P3
normal
Last year
Last year

People

(Reporter: jdescottes, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

While reviewing Bug 1431949, I came across the "count" that can be defined in our autocomplete suggestions. I don't think any of the consumers of the autocomplete are using it today.

When trying to add a "fake" count to existing autocomplete items, it just adds a number displayed right next to the label, without any space. It looks and feels broken and probably should be removed.

Current consumers of the autocomplete-popup are:
- devtools/client/inspector/inspector-search.js
- devtools/client/sourceeditor/autocomplete.js
- devtools/client/webconsole/jsterm.js
- devtools/client/shared/inplace-editor.js

I reviewed each one of them and they are not passing items with a count property as far as I can see. Only sourceeditor/autocomplete.js provides a "score" property for some items, but score is not supported by the autocomplete-popup. To remove as well?

The count property is currently:
- handled at https://searchfox.org/mozilla-central/rev/769222fadff46164f8cc0dc7a0bae5a60dc2f335/devtools/client/shared/autocomplete-popup.js#444-450
- documented at https://searchfox.org/mozilla-central/rev/769222fadff46164f8cc0dc7a0bae5a60dc2f335/devtools/client/shared/autocomplete-popup.js#421-422
- styled at https://searchfox.org/mozilla-central/rev/769222fadff46164f8cc0dc7a0bae5a60dc2f335/devtools/client/themes/common.css#106-108
IIRC this used to be used in the inspector search i.e. if you searched for "div" you would see the number of divs on the page alongside it.
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.