Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search autocomplete #31

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Search autocomplete #31

wants to merge 5 commits into from

Conversation

SeinopSys
Copy link

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