GravityView icon indicating copy to clipboard operation
GravityView copied to clipboard

[WIP] Feature/1753 search tab v2

Open doekenorg opened this issue 1 year ago • 0 comments

This is a rebased PR on top of develop for #1753.

Todo:

Small-ish:

  • [x] Sieve individual choice fields
  • [x] Add search mode field (hidden / choice) with a default option
  • [x] Make "Only for logged-in users" option work
  • [x] Apply custom classes to fields
  • [x] "Advanced Search" toggle rework (and open when one of the fields when it is actively used in the search)
  • [x] Add Search Everything / Search Mode (hidden) / Search Button as a default configuration
  • [x] Move entire row between search sections
  • [ ] Add setting to opt-in to new search templates
  • [ ] Reset Widget on form/view change
  • [ ] Prevent duplicate fields (?)
  • [ ] Fix Populate Anything on choices

Larger:

  • [x] Store the settings per widget instead of one per view
  • [ ] Migrate old configuration to new configuration (should be possible on-the-fly)
    • [ ] Add Search button if it is missing
    • [ ] Add hidden Search Mode field with the stored setting as default
    • [ ] Vertical is a single column, Horizontal is 2 columns (split odd/even)
  • [ ] Add new search templates with nicer styling
  • [ ] Fix tests

Separate feature:

  • [ ] Search settings (This was part of Search everything, but it doesn't make sense. We cannot force this from the widget as there might be multiple.
    • [ ] Include meta fields (ID, etc)
    • [ ] Exclude hidden fields

Caveats:

  • gravityview_widget_search_filters will be run at least twice with an additional $position (general/advanced)
  • gravityview/search/sieve_choices should still work
  • gravityview_search_field_label should still work
  • gravityview/search/filter_details should still work
  • Look into permalinks option on the widget-search.php template

New features:

  • Layout Builder for Search Fields
  • Search Mode field (customer can toggle, or field is hidden (default))
  • Search Button field (place it anywhere)
  • Sieving on individual fields instead of all of them
  • Search Field visibility on caps
  • Advanced Search Fields dropdown

doekenorg avatar Nov 20 '24 10:11 doekenorg