Add support for a "Reset" link

Created on 10 July 2024, 9 months ago

Problem/Motivation

Other Facets widgets like the base Links and Checkboxes widgets support an optional "Reset" link. It would be nice if Facets Date Range supported that as well. It could be optional and disabled by default, so it would not adversely affect any existing installations.

Steps to reproduce

1. Add Facets Date Range widget.
2. See no "Show reset link" option.
3. Be sad.

Proposed resolution

Add "Show reset link" option.

Remaining tasks

1. Add "Show reset link" option to DateRangeWidget.
2. Merge code changes.
3. Be happy.

User interface changes

This would add 3 new fields to the widget configuration:

1. Show reset link
2. Reset text
3. Hide reset link when no facet item is selected

I've got working code based on how it's done in the LinksWidget plugin. Patch to follow.

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jrb Raleigh-Durham Area, NC, USA

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

Comments & Activities

  • Issue created by @jrb
  • Status changed to Needs review 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States jrb Raleigh-Durham Area, NC, USA

    Here's a patch to add an optional "Reset" link to Date Range facets.

Production build 0.71.5 2024