Skip to content

Search autocomplete#31

Open
SeinopSys wants to merge 5 commits intomasterfrom
search-autocomplete
Open

Search autocomplete#31
SeinopSys wants to merge 5 commits intomasterfrom
search-autocomplete

Conversation

@SeinopSys
Copy link
Copy Markdown

Before you begin

  • I understand my contributions may be rejected for any reason
  • I understand my contributions are for the benefit of Derpibooru and/or the Philomena software
  • I understand my contributions are licensed under the GNU AGPLv3
  • I understand all of the above

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:

  • replace underscores with spaces, except in tags with the artist: namespace
  • remove spaces before/after the namespace indicator

See postprocessTerm in autocomplete.js for exact implementation details.

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

@SeinopSys SeinopSys force-pushed the search-autocomplete branch 3 times, most recently from 2877bb9 to 369b722 Compare September 12, 2020 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant