feat: add facetwp result count to mobile filters button#131
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
previously approved these changes
Jun 8, 2026
WybeBosch
previously approved these changes
Jun 8, 2026
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)', |
Contributor
There was a problem hiding this comment.
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
Contributor
Author
There was a problem hiding this comment.
Scherp, aangepast
c1f8b46
3701e75 to
c1f8b46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FacetWP result count
Result count toegevoegd aan de "Bekijk resultaten" knop op mobiel. Zo zie je instantly hoeveel resultaten er zijn als je filtert:
Geen resultaten:
