Conversation
…-make-the-filter-buttons-work
…lter-buttons-work
There was a problem hiding this comment.
Pull request overview
This PR enhances the grants page UX by introducing a new filter/sort control bar (status dropdown, “my grants”, eligibility, amount/date ranges) and wiring those controls into the existing MobX/Satchel grant processing pipeline.
Changes:
- Replaced the old status/date filter UI with a new
FilterBarthat supports additional filters and sorting. - Extended grant filtering logic (
ProcessGrantData+grantFilters) to include eligibility, amount range, and “my grants” (user email) filtering. - Added new Satchel store fields/actions/mutators to track the additional filter state.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/main-page/grants/GrantPage.tsx | Integrates new FilterBar, adds auth-based redirects, and adds a bell button in-page |
| frontend/src/main-page/grants/grant-list/GrantCard.tsx | Adjusts eligibility badge z-index class |
| frontend/src/main-page/grants/filter-bar/StatusDropdown.tsx | Adds a new status selection dropdown UI |
| frontend/src/main-page/grants/filter-bar/processGrantData.ts | Applies new filters (eligible, amount range, user email) to grant processing |
| frontend/src/main-page/grants/filter-bar/grantFilters.ts | Adds eligibleFilter, amountRangeFilter, and userEmailFilter predicates |
| frontend/src/main-page/grants/filter-bar/FilterBar.tsx | Implements the new filtering/sorting control bar UI and store wiring |
| frontend/src/main-page/grants/filter-bar/components/FilterCard.tsx | Generalizes range filtering card to support date/number ranges + direction |
| frontend/src/external/bcanSatchel/store.ts | Adds new filter fields to the app store and persists emailFilter |
| frontend/src/external/bcanSatchel/mutators.ts | Adds mutators for the new filter actions |
| frontend/src/external/bcanSatchel/actions.ts | Adds actions for new filters and allows updateSort(null) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
prooflesben
left a comment
There was a problem hiding this comment.
The arrows when sorting alphabetically do not change depending on what direction we are sorting. Also we might want to have 3 clicks on that button to go from up alphabetical -> down alphabetical -> no alphabetical sort.
In regards to the arrows we might want to find a way to have the arrow direction reflect which way we are sorting for the other buttons as well such as due date and
I would also change the specific date to use the css built in date picker instead of having the user put in the number.
The current behavior of the alphabetical button is the 3 clicks, so i assume that needs no changes. The design has the icon on those buttons as the both the up & down triangles if ykwim, so unless we change that to have an up arrow if its ascending and down for descending, not sure if its possible. should i do that? |
ℹ️ Issue
Closes #344
📝 Description
Write a short summary of what you added. Why is it important? Any member of C4C should be able to read this and understand your contribution -- not just your team members.
Briefly list the changes made to the code:
✔️ Verification
What steps did you take to verify your changes work? These should be clear enough for someone to be able to clone the branch and follow the steps themselves.
Provide screenshots of any new components, styling changes, or pages.
Test Changes
If your new feature required some test to be changed or added to fit the new functionality or changes please document these changes here.
N/A
🏕️ (Optional) Future Work / Notes
Notes:
Questions: