Skip to content

feat: add facetwp result count to mobile filters button#131

Merged
YvetteNikolov merged 1 commit into
mainfrom
feat/add-result-count-to-facetwp-filters-btn
Jun 8, 2026
Merged

feat: add facetwp result count to mobile filters button#131
YvetteNikolov merged 1 commit into
mainfrom
feat/add-result-count-to-facetwp-filters-btn

Conversation

@YvetteNikolov

Copy link
Copy Markdown
Contributor

FacetWP result count

Result count toegevoegd aan de "Bekijk resultaten" knop op mobiel. Zo zie je instantly hoeveel resultaten er zijn als je filtert:

Screenshot 2026-06-08 at 11 27 30-edit

Geen resultaten:
Screenshot 2026-06-08 at 11 27 40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a FacetWP-powered result count to the mobile “Bekijk resultaten” (view results) button in the FacetWP filters dialog, so users can immediately see how many results remain while filtering.

Changes:

  • Replaces the static mobile dialog “Bekijk resultaten” label with a FacetWP facet render (result_count_button).
  • Introduces a new FacetWP facet configuration that renders count text for plural/singular/none states.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
web/app/themes/sage/resources/views/components/facetwp/mobile-filters.blade.php Uses a FacetWP facet output for the mobile “view results” dialog trigger label (with count).
web/app/themes/sage/config/facetwp/facets/general_result_count_button.php Adds a new FacetWP “pager/counts” facet (result_count_button) providing the button label text with totals.

Comment on lines +10 to +12
'count_text_plural' => 'Bekijk resultaten <span class="text-xs">([total])</span>',
'count_text_singular' => 'Bekijk resultaat <span class="text-xs">(1)</span>',
'count_text_none' => 'Geen resultaten (0)',
Yannicvanveen
Yannicvanveen previously approved these changes Jun 8, 2026
WybeBosch
WybeBosch previously approved these changes Jun 8, 2026
laravdiemen
laravdiemen previously approved these changes Jun 8, 2026
'pager_type' => 'counts',
'count_text_plural' => 'Bekijk resultaten <span class="text-xs">([total])</span>',
'count_text_singular' => 'Bekijk resultaat <span class="text-xs">(1)</span>',
'count_text_none' => 'Geen resultaten (0)',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bij die twee hierboven staan de getallen in een span met class text-xs, voor de consistentie zou dat bij deze 0 ook dan toch moeten zijn

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scherp, aangepast

@YvetteNikolov YvetteNikolov force-pushed the feat/add-result-count-to-facetwp-filters-btn branch from 3701e75 to c1f8b46 Compare June 8, 2026 13:12
@YvetteNikolov YvetteNikolov merged commit 38cc95d into main Jun 8, 2026
2 checks passed
@YvetteNikolov YvetteNikolov deleted the feat/add-result-count-to-facetwp-filters-btn branch June 8, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants