booru / philomena

Next-generation imageboard software. This software development project is independent from any image hosting project.
GNU Affero General Public License v3.0
9 stars 10 forks source link

Inclusive+Exclusive filtering system #24

Open EmberHeartshine opened 4 years ago

EmberHeartshine commented 4 years ago

Is your feature request related to a problem? Please describe. Less a problem and more a UX comment. With filters that are exclusive-only, it can be tough (or impossible) to get specific content that may be covered under a broader tag that you don't want to see otherwise. It's currently possible to exclude tags in search results, but not include tags in your personal filter.

Describe the solution you'd like To make a silly example, excluding the pony tag removes all pony content, but then explicitly including the pinkie pie tag would override the exclude and show Pinkie Pie-tagged content that would otherwise be filtered out by the pony exclude. With this tag setup, all pony content except Pinkie Pie is hidden. With an exclusive-only system, to achieve the same effect one would need to exclude pegasus, unicorn, alicorn, and every earth pony by name except Pinkie.

Describe alternatives you've considered I've only ever seen an exclusive filtering system, so ¯\_(ツ)_/¯

Belomi commented 4 years ago

After talking with @EmberHeartshine I have come up with an approximation of the desired behavior and will describe it here for future reference.

  1. Filters are considered persistent as they function from search to search.
  2. Search terms are considered ephermeral as they only exist for one search.

The desired behavior is to have a list of persistent terms which will be excluded (which is the user's content filter) while allowing selective ephermeral inclusive overrides within the search bar which will add to the search results those items which had previously been excluded by the persistent filter.

My proposed idea is to introduce the + notation before searched tags to indicate that they are intended to be added into the results regardless of the user's persistent filter. Using the above example a demonstration would be as such:

User's filter (persistent):

rarity
applejack
rainbow dash
fluttershy
pinkie pie
twilight sparkle

User's search (ephemeral): balloons confetti +pinkie pie

The defined behavior would then be to include pinkie pie regardless of the user's persistent filter in the results.