Mirror building details filter to home page #55

Open
opened 2026-07-19 00:55:03 +00:00 by gostmeaper · 0 comments
gostmeaper commented 2026-07-19 00:55:03 +00:00 (Migrated from codeberg.org)

Overall Objective

The "All Building Options" page (apps/frontend/src/app/building-options/page.tsx) has a filter sidebar (BuildingFilter.tsx) that lets users filter by distance, atmosphere, accommodations, and amenities. The Home page currently has no filtering at all, just a fixed list of recommended buildings. This issue is about bringing that same filter sidebar to the Home page so users can get their recommendations from the survey they took.

If the user hasn't taken the survey it'll just be the default optitons which can be just alphabetized or whatever is easiest random ordering.

Suggested Approach

  1. Look at apps/frontend/src/app/building-options/BuildingFilter.tsx. This is the component you'll be reusing, it already has all the filter logic and pulls building data from useBuildings() in BuildingContext.tsx.
  2. If it hasn't been done already convert this logic into an exportable script that you'll be able to use in the home page.
  3. Look to see how to call data from the backend and database. An example will be made available.
  4. In apps/frontend/src/app/page.tsx, import BuildingFilter logic to use to get the order of buildings based on the user's data.
  5. Test that the Home page still looks right based on the data. For instance some sanity checks might be to filter amenities like elevators and make sure Donner isn't on there, or to filter by gender inclusive which should show welch.

Help & Resources

### Overall Objective The "All Building Options" page (apps/frontend/src/app/building-options/page.tsx) has a filter sidebar (BuildingFilter.tsx) that lets users filter by distance, atmosphere, accommodations, and amenities. The Home page currently has no filtering at all, just a fixed list of recommended buildings. This issue is about bringing that same filter sidebar to the Home page so users can get their recommendations from the survey they took. If the user hasn't taken the survey it'll just be the default optitons which can be just alphabetized or whatever is easiest random ordering. ### Suggested Approach 1. Look at apps/frontend/src/app/building-options/BuildingFilter.tsx. This is the component you'll be reusing, it already has all the filter logic and pulls building data from useBuildings() in BuildingContext.tsx. 2. If it hasn't been done already convert this logic into an exportable script that you'll be able to use in the home page. 3. Look to see how to call data from the backend and database. An example will be made available. 4. In apps/frontend/src/app/page.tsx, import BuildingFilter logic to use to get the order of buildings based on the user's data. 5. Test that the Home page still looks right based on the data. For instance some sanity checks might be to filter amenities like elevators and make sure Donner isn't on there, or to filter by gender inclusive which should show welch. ### Help & Resources - [README](../../ScottyLabs/housing/src/branch/main/README.md) - [Contributing Guidelines](../../ScottyLabs/housing/src/branch/main/docs/CONTRIBUTING.md)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ScottyLabs/housing#55
No description provided.