ymcatwincities/openy_activity_finder

[AF4] Categories exclusion

duozersk opened this issue · 9 comments

AF3 has categories limitation / exclusion settings - we should support them in AF4.
There are also categories exclusion settings on the backend - and this might be enough for most cases.

  • Activity Finder settings page - /admin/openy/integrations/activity-finder/activity-finder-settings
    • “Exclude category -- so we do not display Group Exercises“ - used only on backend side; no need to port anything
  • Activity Finder Search paragraph
    • no categories settings
  • Activity Finder paragraph
    • Limit by category / field_prgf_af_categ
      • filter activities by these categories; skip/hide activities selection step
    • Categories exclude / field_prgf_af_categ_excl
      • exclude these categories from search - exclude parameter in query to backend

The settings we might want to support are implemented as paragraph fields and then rendered to the page using the “Data exported in JSON format“ / openy_json formatter which pushes field values to the window.OpenY.field_name JS values.

Apparently we can support the same setting not as paragraph fields, but as block settings - and render them to the page in the Twig template as we already do with all other settings - especially in the light of Layout Builder coming to Open Y (better to use blocks directly without wrapping paragraph).

@sarah-halby FYI ^^^

We need this one on YGBW as they have a thing called Camp Finder and it requires different set of excluded categories on paragraph/block level - will work on it.

@podarok Yes, this one. We are tasked to have the same functionality based on AF4.

You mentioned "partially". so reopening this one @duozersk

Correct @podarok - we have implemented the exclude part; but there is also the limit part - limit found activities by categories - which wasn't done.

#40 improves the categories exclusion logic.

And #44 hopefully takes us to the finish line with the exclusions :)