silverstripe / api.silverstripe.org

API documentation for the Silverstripe Framework
BSD 3-Clause "New" or "Revised" License
3 stars 14 forks source link

NEW Better search autocomplete ordering #77

Closed dhensby closed 6 years ago

dhensby commented 6 years ago

fixes #5

This PR improves the sorting of autocomplete suggestions.

eg: Field:

2018-06-29_21-25-48_929bd37c-5e8c-49ba-99cc-1faadb242680

eg: Form:

2018-06-29_21-26-17_e3132ab0-a45d-4024-bd0a-30fc9a0a8248

dhensby commented 6 years ago

Improvement is possible to sort alphabetically at some point too so HeaderField is above PasswordField done, pics updated

dhensby commented 6 years ago

This change does make the interaction with the search box more laggy, but it's not that much worse than it is currently.

dhensby commented 6 years ago

The main assumption I've made here is that people tend to search for classes over methods. Searching "Form" is going to push methods named Form way down the auto complete list. Otherwise it looks like this (maybe it's preferable, I'm happy to be convinced):

field search

form search