✨ [#2111] Filter web-components design-only#2127
Draft
jiromaykin wants to merge 3 commits intodevelopfrom
Draft
Conversation
a8d35fa to
636174c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2127 +/- ##
========================================
Coverage 92.73% 92.73%
========================================
Files 1241 1241
Lines 48085 48085
========================================
Hits 44594 44594
Misses 3491 3491 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c4e1b96 to
da5474c
Compare
737895e to
b21ca67
Compare
d4121a1 to
f6d998a
Compare
2a6d4cc to
edc37f8
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.
Summary
Figma: https://www.figma.com/design/iKGhWhstaLIlFSaND2q7cE/OIP---Designs--new-?node-id=8729-21563&p=f&t=CGtYGy2hXXkkcWi1-0
huidig jaar filter should come from front-emd,
date range comes from back end.
How it works on page load
Reads
data-filter-*attributes from the HTML tagParses them into filter groups (e.g., "Adres", "Type container")
Reads current URL to see what filters are already active
Optionally adds dynamic period options (current year/month/quarter) if enabled
When user selects filters:
Stores selections in local state (selectedFilters)
Shows count: "Adres (2)" = 2 selected
When user clicks "Toon resultaten":
Builds a new URL:
/mijn-afval/?adres=X&type-container=Y&periode=ZNavigates to that URL
Page reloads with filtered data
What it still needs from backend:
Pass filter definitions in template:
So if URL has
?adres=Hoofdweg+45A, backend should only return data for that addressBackend could check request.GET and filter afval_data before passing to template
Dynamic Periods
The periode filter can optionally include dynamically calculated options (current year/month/quarter).
Enable in template with:
data-add-dynamic-periods="true"Checklist
More to do: