Skip to content

feat: add filter by college to friends network and leaderboard (#380)#468

Merged
indresh404 merged 1 commit into
indresh404:mainfrom
MsParadox:feat/friends-college-filter
Jun 12, 2026
Merged

feat: add filter by college to friends network and leaderboard (#380)#468
indresh404 merged 1 commit into
indresh404:mainfrom
MsParadox:feat/friends-college-filter

Conversation

@MsParadox

Copy link
Copy Markdown
Contributor

Pull Request 🚀

Description

This PR addresses Issue #380 by implementing the "Filter by College" functionality on the Friends Network & Leaderboard page (src/pages/Friends.jsx).

While the global GitRank page already has a server-side college filter, users previously had no way to filter their direct network (followers, following, and personal leaderboard) by university peers.

Changes Made:

  • Imported the existing src/data/colleges.json dataset.
  • Created a selectedCollege state inside Friends.jsx.
  • Implemented a <select> dropdown UI styled to match the existing Tailwind components.
  • Added a useMemo filter block (filteredDevelopers) to instantly sort the active tabs locally.
  • Injected the current user's college into the leaderboardStandings local mapping so the user isn't filtered out of their own leaderboard.

Related Issue

Closes #380

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Testing Done

  • Verified that switching between Friends, Followers, Following, and Leaderboard correctly respects the active filter.
  • Verified "All Colleges" returns the list to its default state.
  • Verified mobile responsiveness of the dropdown controls.
  • Command run: node fix_lint.mjs
  • Visual verification on local dev server (http://localhost:5173)

Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings or console errors.
  • Any dependent changes have been merged and published in downstream modules.

Contributor Declaration

  • I confirm that this contribution is made under the rules of GSSoC 2026 and NSoC 2026.
  • I confirm that I have been assigned the related issue by a maintainer before opening this PR.
  • I have read the Contributing Guidelines and Code of Conduct.

@MsParadox MsParadox requested a review from indresh404 as a code owner June 11, 2026 21:12
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ranker-hub Ready Ready Preview, Comment Jun 11, 2026 9:12pm

@github-actions github-actions Bot added backend Backend/Firebase related changes bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request frontend Frontend related changes (HTML/CSS/JS/React) gssoc GirlScript Summer of Code gssoc26 GirlScript Summer of Code 2026 nsoc NSoC NSoC'26 NSoC 2026 pending-review PR is pending review labels Jun 11, 2026
@indresh404 indresh404 merged commit 5998d81 into indresh404:main Jun 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend/Firebase related changes bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request frontend Frontend related changes (HTML/CSS/JS/React) gssoc GirlScript Summer of Code gssoc26 GirlScript Summer of Code 2026 level3 nsoc NSoC NSoC'26 NSoC 2026 pending-review PR is pending review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add "Filter by College" functionality to Leaderboards/Friends

2 participants