Decision: Resources title filtering - Enterprise-CMCS/cmcs-eregulations GitHub Wiki
| Thing | Info |
|---|---|
| Relevant features | Resources search |
| Date started | 2023-04-06 |
| Date finished | 2023-04-14 |
| Decision status | Done |
| Summary of outcome | See list |
Background/context
We built out the resources page for working with Title 42 parts only. Now that we're adding Title 45 parts, we need to accommodate selecting Title 45 parts. We wanted this to work if you're starting from the resources page, or if you click a "search these resources" button on a Title 45 subpart or section.
This functionality only applies to our in-house metadata-only resource search method, because we don't have a way to do location filtering with search.gov's full-text search method.
Core questions
What should the filtering behavior be?
Decision
- Behavior is unchanged if only one title is available
- If there is more than one title available to the site (e.g. 42 and 45), then a new Title filter will appear on the Resources page
- If there is more than one Title available, no title will be selected by default
- User can perform keyword/text search and Category filtering without selecting a Title
- User cannot filter by part/subpart/section before selecting a title
- Title filter is unique and not part of the “other” filters (Part, Subpart, etc)
- Title does not have a Chip
- When clicking the “Clear All” Chip, Title is not removed or reset
- Once you select a Title, you cannot “unselect” it without leaving and returning to the page
Consequences
Slightly awkward but not problematic side-effect
For the "related sections" list on each resource item, we have an existing special behavior: hide all subparts & sections that aren't part of our site. For example, an item can be associated with parts in Title 42 and 45 that our site doesn't contain, but we don't want to display those locations in search results, because they're probably less relevant to the reader.
If you filter by Title X, you see results that are associated with any part in Title X, even if those parts are not in our site (so those locations are not displayed in the "related sections" list).