Problem/Motivation

3.x introduced a new way of creating Facets

We should create a demo module which incorporates all best practices, and can be run on simplytest.me
This demo should use all suggested contrib to create the best user experience.

Features which should be in the demo

- Facets on taxonomy fields, rendered as checkboxes
- Hierarchical date facet
- Hierarchical taxonomy facet
- Default content
- Ajax and views_ajax_history default enabled
- views summary for facets and search string

For now, let's focus on a demo for "Facets exposed filters"
We can always add a facet block demo later.

UPDATE: We could also add the new Range slider, as well as description and link to Demo module simplytest.me on the https://project.pages.drupalcode.org/facets/ doc page.

Steps to reproduce

Proposed resolution

Remaining tasks

  • Add a Demo module
  • Project page -- Add description and link to Demo module on simplytest.me
  • ToDo: Add Range slider to demo using the IMDb rating field
  • ToDo: Add a facet block demo
  • ToDo: Documentation -- Add description and link to Demo module on simplytest.me on doc front page https://project.pages.drupalcode.org/facets:

    Need a demo?

    Launch on simplytest.me
    This demo showcases a full blown search_api + facets setup, using facets exposed filters, with ajax, range slider, hierarchical facets, hierarchical date facets, views filters summary, views ajax summary, better exposed filters, ...
    Log in with admin/admin

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#8 enable-facets-demo-on-install.patch268 bytesstrykaizer

Issue fork facets-3503603

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

strykaizer created an issue. See original summary.

strykaizer’s picture

Issue summary: View changes

Features are ready in MR.

Awaiting input for simplytest.me before merging, as it does not show Facets 3.0 as an option at this moment.

strykaizer’s picture

  • strykaizer committed d9af3451 on 3.0.x
    Issue #3503603 by strykaizer: Create a demo module to showcase best...

gaurav.kapoor’s picture

Suggestion: Would be good if the package of this module can also be changed to 'Search' instead of 'Facets'. Making it easier to find and enable if needed.

strykaizer’s picture

StatusFileSize
new268 bytes

Added a patch to use on simplytest.me
This patch is not intended to ever get committed ;)

strykaizer’s picture

Issue tags: +DevDaysAthens2026

Looks like adding a patch in the url is not supported.
Created a new module to support singleclick simpletest.me facet demo sites, see https://www.drupal.org/project/demo_facets

Hope this will work, once simpletest.me picks up this module

ressa’s picture

Thanks for adding Facets demo, it works really well, and I just used it to quickly try out the new Range sliders added in #3589695: Add exposed range slider support for facets_exposed_filters (processor + BEF widget).

It would have taken forever, if I had to set it up from scratch.

This feature should get mentioned where relevant, like at the top of the project page, as well as a sentence on the doc page below "The Facets module allows site builders to easily []...]" on https://project.pages.drupalcode.org/facets/ something like this?

Install the Facets Demo module to quickly try out the many features in Facets 3 with example content:

  • Facets on taxonomy fields, rendered as checkboxes
  • Hierarchical date facet
  • Hierarchical taxonomy facet
  • Default content
  • Ajax and views_ajax_history default enabled
  • views summary for facets and search string

Perhaps the Range slider can get included using the IMDb rating field, since it's such a cool feature?

strykaizer’s picture

Adding the new range sliders in the demo is indeed on the todo list.

The link to the facets demo is already on the project page ;-)

ressa’s picture

Issue summary: View changes

Ah yes, fantastic, thanks @strykaizer! I updated the Issue Summary with the remaining tasks.