furbooru / philomena

Next-generation imageboard (furry edition)
https://furbooru.org/
GNU Affero General Public License v3.0
14 stars 3 forks source link

Search autocomplete #31

Open SeinopSys opened 4 years ago

SeinopSys commented 4 years ago

Before you begin


This PR aims to extend auto-completion to both the search field in the header as well as on the search page. For this is uses the same query logic as the tag input by default, however a local setting is provided to switch to the tags page syntax, so wildcards and any additional syntax available there can also be used to receive autocomplete suggestions. It was not made the default since you have to explicitly add the wildcard * to the end of terms for a partial query to match, which could confuse existing users.

Additionally, autocomplete terms are now globally processed to:

See postprocessTerm in autocomplete.js for exact implementation details.

This change was tested using the latest stable Firefox and IE11.