Quant search facet areas can be completely empty which isn't great UX

Created on 10 September 2022, about 2 years ago
Updated 5 March 2024, 9 months ago

Problem/Motivation

When using multiple facets, you can choose facets such that some facets are empty because Algolia removes values if the content doesn't have them. For better UX, it would be nice to show something under the facet title to indicate there aren't any values available.

Steps to reproduce

  1. For a quant project that has search enabled
  2. Enable quant_search module
  3. Go to API tab and configure
  4. Go to Search tab
  5. Go to Pages sub-tab
  6. Click Add Quant search page button
  7. Fill in Label, Title and Route, and check inEnabled
  8. Add multiple facets that are used on different content types but not all
  9. Go to the search page route
  10. Use the facets so that you choose something that's used for one content type but not another
  11. Results: There will be facets with no values underneath
  12. Expected Results: Something to indicate that there are no values relevant for that facet

Proposed resolution

Algolia has a autoHideContainer option. Example:

https://lightrun.com/answers/meilisearch-instant-meilisearch-or-operator...

  instantsearch.widgets.refinementList({
    container: '#facet_' + facet.facet_container,
    attribute: facet.facet_key,
    autoHideContainer: true,
  }),

It might be good to do this issue at the same time as:

✨ Allow option for quant search facets to be alphabetical Active

Remaining tasks

  1. See if Algolia supports this
  2. Update code
  3. Code review + testing
  4. Commit :)

User interface changes

The user will see something under facets even when there are no options.

API changes

Data model changes

✨ Feature request
Status

Postponed

Version

1.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024