344 dev make the filter buttons work#355
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? |
|
Some of this code looks kind of outdated. It might be good to merge main into this before merging this pr |
…lter-buttons-work
should be up to date now! thanks jane :) |
Actually I think it was fine looking it over. My current branch is just a lot further ahead because I've been working on it for three weeks taking spring break into account, so no worries. Thanks for doing it though |
frontend/src/main-page/grants/filter-bar/components/FilterCard.tsx
Outdated
Show resolved
Hide resolved
Could you have the little up down icon change depending on which click it is? Just so a user could know how they are sorting |
yessir i did that |
commit c99368c Author: Lyanne Xu <xu.ly@northeastern.edu> Date: Mon Mar 16 22:51:55 2026 -0400 344 dev make the filter buttons work (#355) * base dropdown, needs edits * small changes ot dropdown and filterbar * commented out unused imports * start of addressing comments * addressed comments, commented out unused import in grantpage * styling * massive commit (sorry ben) * click outside dropdown will close it * small visual big with eligible/ineligible hover * fixing mistake from main merge * fixed button highlight to show when any filter/sort is applied to date or amount * made status button match the rest * changed status button to match the rest for good code * resolving copilot comments * remove unused line * made dropdown responsive * deleted unused components, added date picker into filtercard * made it so arrow changes if increasing or decreasing sorting is applied * type error * type error * fixed datepicker so previous months days dont show + type error * type * unused import * on sort or filter, will display first grant in newlist * input heights * changed alphabetical button to org name, deleted unused code --------- Co-authored-by: Camila Carrillo <carrillo.ca@northeastern.edu> Co-authored-by: Jane Kamata <38163243+janekamata@users.noreply.github.com> commit ac93a4f Merge: cf492d4 828f769 Author: prooflesben <122566738+prooflesben@users.noreply.github.com> Date: Sun Mar 15 15:25:01 2026 -0400 Merge pull request #354 from Code-4-Community/345-dev---cashflow-page-layout 345 dev cashflow page layout commit 828f769 Author: Camila Carrillo <carrillo.ca@northeastern.edu> Date: Wed Mar 11 00:14:53 2026 -0400 completed cashflow lo fi commit e25dc03 Author: Camila Carrillo <carrillo.ca@northeastern.edu> Date: Tue Mar 10 13:29:26 2026 -0400 base cashflow structure
ℹ️ 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: