Skip to content

PM-5370 campus leaderboard page - #2163

Open
vas3a wants to merge 7 commits into
devfrom
PM-5370_campus-leaderboard-page
Open

PM-5370 campus leaderboard page#2163
vas3a wants to merge 7 commits into
devfrom
PM-5370_campus-leaderboard-page

Conversation

@vas3a

@vas3a vas3a commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/PM-5370

What's in this PR?

This pull request introduces the initial implementation of the Campus application, including routing, a leaderboard page, data models, services, hooks, and related tests and styles. The main focus is on providing a functional and styled campus leaderboard experience, with modular code structure and test coverage.

Campus Application Setup and Routing:

  • Added CampusApp as the main entry point for the campus module, with routing configured for the home and leaderboard pages using campusRoutes and React Router. [1] [2] [3] [4]

Leaderboard Feature Implementation:

  • Implemented the useCampusLeaderboard hook to fetch leaderboard data based on group and challenge filter, using SWR for data fetching and caching. [1] [2]
  • Defined data models for the leaderboard, group members, participation, and summary statistics. [1] [2]
  • Created a service layer to construct leaderboard API URLs and fetch data from the reports API. [1] [2]

Pages and UI Components:

  • Provided SCSS styles for the leaderboard page, including layout, table, and stat cards.

Testing:

  • Added comprehensive tests for the CampusLeaderboardPage, covering rendering, user interaction, and hook integration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Initial implementation of the new Campus application within the Platform UI, wiring it into the global route registry and delivering a first functional “Campus Program Leaderboard” page backed by a reports API endpoint.

Changes:

  • Added Campus app bootstrapping + routing (campusRoutes) and integrated it into the platform route list.
  • Implemented leaderboard data access (models, service URL builder + fetcher, SWR hook) and the leaderboard page UI (including modals + styles).
  • Added a Jest/RTL test for the leaderboard page behavior and interactions.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsconfig.paths.json Adds @campus/* TS path mapping to support campus module imports.
src/config/constants.ts Registers campus in AppSubdomain and ToolTitle.
src/apps/platform/src/platform.routes.tsx Adds campusRoutes into the platform routing composition.
src/apps/campus/index.ts Exposes campus app entry from the app root barrel.
src/apps/campus/src/index.ts Exposes campusRoutes from the campus src barrel.
src/apps/campus/src/CampusApp.tsx Adds Campus app shell that renders nested routes from router context.
src/apps/campus/src/campus.routes.tsx Defines Campus root route and child routes for home + :groupName leaderboard.
src/apps/campus/src/home.tsx Adds a simple Campus home page placeholder.
src/apps/campus/src/lib/hooks/index.ts Exports campus hooks barrel.
src/apps/campus/src/lib/hooks/use-campus-leaderboard.ts SWR hook to load leaderboard data based on group + filter.
src/apps/campus/src/lib/models/index.ts Exports campus models barrel.
src/apps/campus/src/lib/models/campus-leaderboard.model.ts Defines leaderboard/report response data shapes.
src/apps/campus/src/lib/services/index.ts Exports campus services barrel.
src/apps/campus/src/lib/services/campus-leaderboard.service.ts Builds reports URL and fetches leaderboard payload.
src/apps/campus/src/pages/leaderboard/index.ts Exposes leaderboard page and modal components for lazy loading.
src/apps/campus/src/pages/leaderboard/CampusLeaderboardPage.tsx Implements the leaderboard page UI, filter, table, and modal interactions.
src/apps/campus/src/pages/leaderboard/CampusLeaderboardPage.module.scss Adds leaderboard page layout/table/stat-card styling.
src/apps/campus/src/pages/leaderboard/CampusLeaderboardPage.spec.tsx Adds RTL test coverage for core leaderboard behaviors.
src/apps/campus/src/pages/leaderboard/ParticipationHistoryModal.tsx Modal for a member’s per-challenge participation history.
src/apps/campus/src/pages/leaderboard/ParticipationHistoryModal.module.scss Styling for participation history modal content.
src/apps/campus/src/pages/leaderboard/RankingRulesModal.tsx Modal explaining ranking rules.
src/apps/campus/src/pages/leaderboard/RankingRulesModal.module.scss Styling for ranking rules modal content.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/apps/campus/src/pages/leaderboard/CampusLeaderboardPage.tsx
Comment thread src/apps/campus/src/pages/leaderboard/CampusLeaderboardPage.tsx
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.

3 participants