Skip to content
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

More filtering cleanup #945

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

More filtering cleanup #945

wants to merge 2 commits into from

Conversation

h-m-m
Copy link
Collaborator

@h-m-m h-m-m commented Apr 17, 2021

Why

I wanted to try adding a filter now that we've refactored how filters work in #546

I also wanted to try @exbinary's suggestion about a refactor to how parameters are passed around. I feel like this refactor is not yet complete — for example we might want to look into some of the duplication that now exists — but I felt this is a good point to stop and ask for feedback before going further

What

Screen Shot 2021-04-17 at 11 36 27 AM

How

Testing

Next Steps

Outstanding Questions, Concerns and Other Notes

Accessibility

Security

Meta

Pre-Merge Checklist

  • Security & accessibility have been considered
  • Tests have been added, or an explanation has been given why the features cannot be tested
  • Documentation and comments have been added to the codebase where required
  • Entry added to CHANGELOG.md if appropriate
  • Outstanding questions and concerns have been resolved
  • Any next steps have been turned into Issues or Discussions as appropriate

Howard M. Miller added 2 commits April 17, 2021 11:13
This is mostly a proof of concept of the new filtering structure
Comment on lines +13 to +14
ALLOWED_PARAMS = FILTER_CLASSES.each_with_object({}) do |filter, hash|
hash.merge! filter::ALLOWED_PARAMS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As i look at this, i'm wondering if we even need ALLOWED_PARAMS anymore? Since each filter will extract only the params it needs, maybe ContributionsController doesn't need to invoke strong_params at all? Perhaps that addresses some of the duplication you mentioned?

@solebared
Copy link
Collaborator

Looking great! Also curious your thoughts on my spike extracting serialization out of the filter, linked in this comment.

Base automatically changed from filter-by-date to main May 15, 2021 14:04
@solebared solebared mentioned this pull request Oct 15, 2021
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants