Skip to content

Decision: Impact of Filtering on Item Counts

Jonathan Stegall edited this page Oct 30, 2024 · 6 revisions
Thing Info
Relevant features Search and Subject page filters
Date started 2024-10-16
Date finished 2024-10-25
Decision status Complete
Summary of outcome Item counts that we display, both on primary checkbox buttons and on more secondary dropdowns, will show the full count of results based on the current search query, not a reduced count based on what other filters are active.

Background/context

On the search result and subject listing pages, users can see a list of regulation (only on search results), public resources (on search results and subject listings) and/or internal resources (on search results and subject listings, but only for authenticated users). They can use filter elements to reduce the number of results they're looking at:

  • Primary checkbox buttons for Regulations, Public Resources, and Internal Resources
  • Secondary dropdown for Subject (currently does not apply to Regulations)
  • Secondary dropdown for Category (does not apply to Regulations)

The search result and subject listing pages use a "counts" API endpoint to retrieve the total number of regulation, public, and internal results for the page they're displayed on.

Core questions

What is the relationship of all filters, some of which may have already been interacted with, to the counts that are displayed when interacting with a specific filter?

Decision

  • Item count, once set, is unchanged by interacting with the filters. It shows the full count of results for the result set they are using – the search query if they have searched for something, or the subject if they are on a subject page without a search query – on the following elements:
    • Regulation button
    • Public resources button
    • Internal resources button (if authenticated)
    • Subject dropdown (on search results, each subject in the dropdown will show how many public and internal resources it has, even if the user has already checked public or internal)
    • Category dropdown (on search results and subject pages, each category will show how many public and internal resources it has, even if the user has already checked public or internal)

The differences between item counts on search results and subject pages are:

  • A search result sets the item counts to the number of items in that search query, regardless of how it is filtered.
  • A subject page without a search query sets the item counts to the number of items associated with that subject, regardless of how it is filtered. This changes if a search query is entered on the subject page, because then the user is taken to the search result screen.

Consequences

It's possible that users might anticipate the counts on other filters to be reduced when they click a certain filter. Here's an example scenario:

What we'll be doing at first

  • An authenticated user comes to the search results page
  • The user clicks that they only want public resources
  • The buttons for regulations, public resources, and internal resources all show the counts they would have if they were checked (our research shows that this works well)
  • They click on the subject dropdown, which shows the subjects, and the counts for each subject, that apply to regulation results, public resources, and internal resources for their search query
  • It's possible that users will be confused by this, and assume that the subject counts only apply to public resources since they've done an interaction

Other options

If we learn that this isn't a usable situation, we could:

  • Allow any filter that is used to affect the counts on all of the other filters
  • Allow the secondary subject and category filters to affect the counts on the more primary regulation/public/internal filters

Either of these would be theoretically possible, but would require some additional API and front end work.

Overview

Data

Features

Decisions

User research

Usability studies

Design

Development

Clone this wiki locally