Skip to content

Refactor filters logic#1164

Merged
cfreedman merged 7 commits into
CodeForPhilly:stagingfrom
cfreedman:cfreedman/filters-refactor
Apr 17, 2025
Merged

Refactor filters logic#1164
cfreedman merged 7 commits into
CodeForPhilly:stagingfrom
cfreedman:cfreedman/filters-refactor

Conversation

@cfreedman
Copy link
Copy Markdown
Contributor

This PR refactors the implementation of various filters in the filter view for the map page to reduce the previous complexity and previous unnecessary interfacing of some of the different filter types with unused props.

The previous implementation grouped everything under the DimensionFilter that encompassed all the various filter types (button group, panels, multiselect) and derived multiple internal states from the filter context to pass into the subfilters depending on their need. The current changes allow each filter type to handle their individual interactions with the filter context by calling it locally and dispatching any changes. This requires a bit more visible code in the FilterView to render the different filter groups in the page, but simplifies the link between the filter context and the components that interface with it as well as removing some derived state patterns.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vacant-lots-proj ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2025 7:46pm

@cfreedman cfreedman marked this pull request as ready for review April 8, 2025 01:14
@github-actions
Copy link
Copy Markdown
Contributor

This PR has been marked as stale because it has been open for 7 days with no activity.

@github-actions github-actions Bot added the stale label Apr 17, 2025
@cfreedman cfreedman merged commit 2b1b2a2 into CodeForPhilly:staging Apr 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants