-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#1711] [#1710] Make search filters conditional and add mobile toggle #763
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #763 +/- ##
========================================
Coverage 93.56% 93.57%
========================================
Files 697 698 +1
Lines 24598 24605 +7
========================================
+ Hits 23016 23023 +7
Misses 1582 1582
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
410f8d7
to
30b263a
Compare
24b5d9f
to
c089c80
Compare
Also note in existing cases |
const filterToggles = document.querySelectorAll(FilterMobile.selector) | ||
;[...filterToggles].forEach((filterToggle) => new FilterMobile(filterToggle)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's start removing this cargo-culted code pattern and just use forEach on the nodeList:
document.querySelectorAll(FilterMobile.selector).forEach((filterToggle) => new FilterMobile(filterToggle))
Later we'll move them to the index.
This goes for every querySelectorAll()
& ;[...xxx]
wart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Bartvaderkin Okay, that would mean that, in future, we would need a bunch of imported Classes + initialized constants (with DOMContentLoaded event listener?) in the index file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in the future we'll add them all to the list in open_inwoner/js/components/index.js
so we have a good overview of all the components, and they activate on page load as well as in htmx fragements.
src/open_inwoner/components/templates/components/Filter/Filter.html
Outdated
Show resolved
Hide resolved
I'm missing tests for this but I'll have to do more work on this and possibly restructure anyway. |
c2c9d44
to
62f221d
Compare
62f221d
to
b41bf06
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll approve it and leave the filter-options.js
for later when we address the components javascript.
I'm merging this for an interesting rebase. |
issue: https://taiga.maykinmedia.nl/project/open-inwoner/task/1711
and also tackling issue #1710, because they are dependent: https://taiga.maykinmedia.nl/project/open-inwoner/task/1710
EDIT: removed the first filter-option and just left the other 3.