good-first-issue icon indicating copy to clipboard operation
good-first-issue copied to clipboard

Add repository filters for stars and activity

Open GianSanPedro opened this issue 6 months ago • 3 comments

Fixes #2615.

This PR adds repository filters for minimum stars and last activity.

The filters are available both on the main page and on language-specific pages, so users browsing a language such as Python can narrow the repository list by popularity and recent activity.

Changes included:

  • Added a reusable RepoFilters component for the filter controls.
  • Added filtering by minimum stars.
  • Added filtering by last activity.
  • Kept the existing language filtering behavior.
  • Added an empty state when no repositories match the selected filters.
  • Refactored the shared filtering and sorting logic into a reusable helper to avoid duplicating the same logic between the home page and language pages.

Filtering behavior:

  • When no filters are selected, the original behavior is preserved.
  • When a minimum stars filter is selected, repositories below that threshold are hidden.
  • When a last activity filter is selected, repositories older than the selected range are hidden.
  • On language pages, the selected language filter is combined with the stars and activity filters.
  • If both stars and activity filters are selected, both conditions must be satisfied.

Sorting behavior:

  • When the stars filter is active, repositories are sorted by stars in descending order.
  • When the activity filter is active, repositories are sorted by most recent activity.
  • When both filters are active, stars are used first and recent activity is used as a tie-breaker.

Validation:

I tested the filters manually on the home page and on /language/python.

I checked:

  • default results
  • minimum stars filter
  • last activity filter
  • both filters together
  • resetting back to Any and Any time
  • empty results state
  • mobile layout

I also ran:

bun install
bun run build
make test

GianSanPedro avatar May 16 '26 00:05 GianSanPedro

@GianSanPedro is attempting to deploy a commit to the DeepSource Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar May 16 '26 00:05 vercel[bot]

Hi @jai-deepsource, sorry for the direct mention.

I wanted to kindly ask if you could take a look at this PR or point me to the right maintainer/reviewer for it.

This PR addresses #2615 by adding filters for minimum stars and last activity, both on the home page and language-specific pages. I also tested the behavior locally and included the validation details in the PR description.

I noticed that the Vercel preview requires authorization from a DeepSource team member, so the preview/deployment check may need maintainer action.

I completely understand if the PR cannot be reviewed or merged right now. A quick confirmation about whether the approach is acceptable, needs changes, or is not aligned with the project would already be very helpful.

For context, this contribution is also part of a university open-source activity, so any feedback or guidance would help me document the contribution process properly.

Thanks!

GianSanPedro avatar May 31 '26 22:05 GianSanPedro

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
good-first-issue Ignored Ignored Jun 1, 2026 5:03am

Request Review

vercel[bot] avatar Jun 01 '26 05:06 vercel[bot]