Fix area/section faceting - #138
Conversation
- only allow faceting by section if an area has been selected - only allow sections in the selected area to be selected - only allow one area to be selected at a time
xmedr
left a comment
There was a problem hiding this comment.
This is great! Works as expected. Just a handful of things to flag.
Searching by just area returns only items in that area, but searching by both area and section is performing an OR query. So when I search by Area 6 and Section 31, I get:
- items in that area but different sections
- items in that section but different areas
This same thing happens on staging, so it's not from something in this pr, but figured I'd flag since this new UX may imply an AND query.
Also, since we're now hiding the section facet before selecting an area, it might be useful to have some text either in the Area dropdown, or an empty Section dropdown, that notes that you have to select an area to select a Section, since staging has both available. Just a thought totally up to you and/or CCFP
| </button> | ||
| <div id="facet-panel-collapse" class="facets-collapse collapse" style="width:100%"> | ||
| {% for facet_field in view.facet_fields %} | ||
| {% if facet_field == "section" and "area_exact" in selected_facet_fields or facet_field != "section" %} |
There was a problem hiding this comment.
The indentation for this if and its related endif seem to be a little off
Overview
This PR aims to fix inconsistencies when using the area/section facets when searching by:
#77 outlines more low-level fixes to the problem of section numbers not being unique but we'll try refining facet behavior on the search page before more involved solutions.
Testing Instructions