-
Notifications
You must be signed in to change notification settings - Fork 7
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
Disable _all_ filter option #138
base: 3.x
Are you sure you want to change the base?
Conversation
Update translations de
Add idx parameter to display_modifier call
implement AJAX geoJSON feature
Revert "implement AJAX geoJSON feature"
…ectionfilter into collectionish
Fix intermittent robot test error with "leave site?" popup
@petschki Any chance you could have a look over this? |
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.
Sorry for the late response. While it makes sense to disable the all
option for filteritems, there must be a better way to inject the first filteritem as default filtering than redirecting again to the same page with collectionfilter=1
in query. This is a major performance downgrade of the whole package and I'm against merging it into master. @thet @agitator any thoughts?
@petschki it shouldn't be a performance impact most of the time. The whole reason to do the redirect is avoid performance problems. If you can think of another way to achieve this without the redirect then great but we did think about it and couldn't come up with another way. The nature of collectionfilter is that portlets can't influence the query until it's hit the collection for first time. Not without monkey patching collections and centrally storing the filter definitions outside of the portlets and onto the collection itself. |
@petschki any update on this? |
Hi @petschki, any chance you've had any more thoughts on how it would be possible to inject |
run: | | ||
pip install black | ||
pip install black==21.12b0 |
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.
@petschki Had to pin the version of black to the one before the stable release as they dropped Python2.7 support (e.g. formatting tries to remove all the u
characters). Happy for this to be in this PR, or want it in a separate one?
Hi, I've quickly tried this feature in a project of ours and found out the following:
Does this work with multiple group_by filteritems or did I do something wrong? |
This PR adds an option to the collection filter settings panel to disable the 'All' option from the filter list. In order to provide a default filtering fallback, this PR also adds a redirect to the current page with
collectionfilter=1
added as a query string if the collectionfilter is about to be displayed but the query string is missing. This is because the filtering of the collection is done by an event handler for each page traversal on the site. When the all option is disabled, we will use the first option from the filter as the default filter.Closes #137