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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix filter by scope on search page #12036
Conversation
I'm not 100% sure that this was indeed a decision made by @decidim/product or just limitations in the redesign development bandwith (or just an oversights). @decidim/product do you want to drop this feature ("filtering by scopes /search")? Or is it better to just remove the dead code? |
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.
Tried it out locally and it works as expected. Can you also add a system spec that would have detected this bug? Thanks
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.
馃憤馃徑
Adding the |
Only failing check is codecov, so I'm merging this |
That's right. This error appeared with the |
@fblupi we've discussed in the last @decidim/product and we agreed that for the time being this should be removed as we're not planning in introducing that back. Can you do the PR 馃檹馃徑 ? I don't find the references to scopes in search related classes, so you have more in your head what needs to be changed exactly. Thanks!! |
@andreslucena I did the PR at the same time I did this one, and it was already approved and merged by @alecslupu here: #12038 |
馃帺 What? Why?
Fix the error raised when filtering by scope on the search page. The scope filter has been removed on the redesign, that's why this PR targets the
release/0.27-stable
branch instead ofdevelop
.This error raises because we are using the ransack
_eq
filter instead of the_in
using an array as input. In the front end, we use thescopes_picker_filter
helper to render the scope multi-picker, and it produces an array argument instead of a single value. That's why I have changed the ransack filter in this PR.IMO, we should remove the references to the scope filter in the search controller and command in the
develop
branch, as we are no longer using it since the redesign was merged.馃搶 Related Issues
Testing
馃摲 Screenshots
Screen.Recording.2023-11-20.at.12.29.00.mov