feat: #3611182 Add an always-show Reset option to the Components exposed form
This adds an always-show Reset option to the components_exposed_form views exposed form plugin (added in #3611182).
Issue: https://www.drupal.org/project/varbase_components/issues/3611182
What / Why
Core hides the exposed form's Reset action until there is user input. Better Exposed Filters offers an "always show reset" toggle; this brings the same option to the Components exposed form so a site template can keep the Reset button visible in its filter component.
src/Plugin/views/exposed_form/ComponentsExposedForm.phpdefineOptions(): newreset_button_always_showoption, defaultFALSE.buildOptionsForm(): an "Always show reset button" checkbox,#states-gated invisible when the corereset_buttonoption is unchecked.exposedFormAlter(): re-reveals$form['actions']['reset']['#access'] = TRUEwhen the option is on and a reset action exists.
Default off, so existing views are unaffected.
AI-Generated: Yes (Used Claude Code to add the reset_button_always_show option to the ComponentsExposedForm views exposed form plugin.)
Checkpoints
- File an issue about this project
- Addition/Change/Update/Fix to this project
- Testing to ensure no regression
- Automated unit/functional testing coverage
- Developer Documentation support on feature change/addition
- User Guide Documentation support on feature change/addition
- UX/UI designer responsibilities
- Accessibility and Readability
- Reviewed by a human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Update Release Notes
- Release
Edited by Rajab Natshah