Skip to content

feat(homepage): add trending repos carousel section (fixes #36) - #52

Open
Diwakar-odds wants to merge 1 commit into
AditthyaSS:mainfrom
Diwakar-odds:feature/issue-36-trending-repos
Open

feat(homepage): add trending repos carousel section (fixes #36)#52
Diwakar-odds wants to merge 1 commit into
AditthyaSS:mainfrom
Diwakar-odds:feature/issue-36-trending-repos

Conversation

@Diwakar-odds

Copy link
Copy Markdown

feat(homepage): add trending repos carousel section (fixes #36)

Summary

Added a new "Trending Repos" horizontal carousel section to the homepage using the GitHub Search API, directly above the main repository grid.

Motivation

Closes #36
The roadmap listed "Trending repos/orgs" as a planned feature. This PR fulfills the issue requirements by leveraging the existing getTrendingRepos API utility to display a live feed of recently created repositories that have rapidly gained stars.

Changes

  • Modified src/pages/HomePage.jsx:
    • Added state for trendingTimeRange ('weekly' or 'monthly') and trendingRepos.
    • Implemented data fetching using the getTrendingRepos function inside a useEffect.
    • Inserted a visually distinct "Trending Repos" section with a horizontal scrolling layout (carousel) above the main filters and repo grid.
    • Implemented a segmented control to toggle between "This Week" and "This Month", automatically refetching when changed.
    • Reused RepoCard along with RepoCardSkeleton to maintain visual consistency.

Acceptance Criteria

  • Show a horizontal carousel or featured section above the main repo grid.
  • Display repos that gained the most stars in the last week/month using created:>YYYY-MM-DD stars:>5 sort:stars.
  • Include a "This week" / "This month" toggle.

Impact & Side Effects

This adds a network request to the homepage load sequence, though it happens concurrently with the main repository list fetch, ensuring performance remains stable.

How to Test

  1. Load the homepage and verify the "Trending Repos" section appears above the main grid.
  2. Ensure the horizontal scroll displays cards correctly without clipping.
  3. Click "This Month" to toggle the date range; ensure the cards update appropriately.

Quality Checklist

  • Code follows project conventions
  • Linting and type-checking pass

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

@Diwakar-odds is attempting to deploy a commit to the aditthyass' projects Team on Vercel.

A member of the Team first needs to authorize it.

@Diwakar-odds

Copy link
Copy Markdown
Author

Thank you for reviewing this Pull Request! 馃殌

Technical Analysis & ECSoC26 Label Request

This PR implements the requested "Trending Repos" section on the homepage and resolves issue #36 by achieving the following:

  1. Frontend UI Implementation: Created a new horizontal scrolling carousel section (overflow-x-auto) inserted above the main repository grid to prominently display trending repositories on the homepage.
  2. API Integration: Connected the component to the existing getTrendingRepos API, dynamically feeding real GitHub Search data directly into the newly built interface.
  3. Interactive Toggle Controls: Added state-driven controls (weekly vs monthly) for the user to easily switch the time range for the trending query. The UI gracefully handles data re-fetching upon interaction.
  4. Resiliency: Built-in loading skeletons (RepoCardSkeleton) and error boundaries/display tailored to the trending section to avoid breaking the surrounding page layout if the API fails.

Based on the official ECSoC'26 guidelines, I kindly request the maintainers to assign the ECSoC26 label (if not already applied automatically) and consider the following point-tier labels:

  • Level 2 or Level 3: This introduces a significant new data-driven component to the main landing page, combining UI structural additions with asynchronous network operations and component state management.
  • good-pr / good-ui: The PR successfully completes the issue requirements using clean component composition and responsive styling.

Please let me know if there are any changes required. I'm ready to address any feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Trending Repos section on homepage

1 participant