Skip to content

Leaderboard refactor #3274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 8, 2025
Merged

Leaderboard refactor #3274

merged 13 commits into from
Aug 8, 2025

Conversation

sayomaki
Copy link
Contributor

@sayomaki sayomaki commented Aug 7, 2025

Description

  • Updated endpoints and requests to match updated backend routes
  • Directly call requests for exporting of leaderboard instead of using store
  • Remove toggles and fields for leaderboard during course creation
  • Only show leaderboard in contest assessment workspace after assessment is published
  • Combined contest leaderboard may not work as expected due to breaking changes (need to disable contest leaderboard for now)

This PR is an improvement on #3113

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)
  • This change requires a documentation update
  • Code quality improvements

How to test

Requires backend PR: source-academy/backend#1281

Possible planned improvements (not in PR)

  • Consider feasibility of keeping overall contest leaderboards, improve design if keeping
  • Improve achievements system and incorporate achievements with leaderboards
  • Combined contest leaderboards should be retrieved directly from assessment instead of additional endpoint
  • QoL improvements to voting features and token counter

@sayomaki sayomaki requested a review from RichDom2185 August 7, 2025 10:39
@sayomaki sayomaki self-assigned this Aug 7, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 16802172057

Details

  • 8 of 82 (9.76%) changed or added relevant lines in 7 files are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.07%) to 43.392%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/commons/sagas/LeaderboardSaga.ts 1 3 33.33%
src/pages/leaderboard/subcomponents/OverallLeaderboard.tsx 0 2 0.0%
src/commons/sagas/RequestsSaga.ts 2 19 10.53%
src/commons/assessmentWorkspace/AssessmentWorkspace.tsx 2 25 8.0%
src/pages/leaderboard/subcomponents/LeaderboardExportButton.tsx 0 30 0.0%
Files with Coverage Reduction New Missed Lines %
src/pages/leaderboard/subcomponents/OverallLeaderboard.tsx 1 0.0%
src/commons/sideContent/content/SideContentContestLeaderboard.tsx 6 83.75%
Totals Coverage Status
Change from base Build 16799186972: -0.07%
Covered Lines: 20441
Relevant Lines: 49284

💛 - Coveralls

Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

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

Just some minor nits :)

@sayomaki sayomaki requested a review from RichDom2185 August 8, 2025 07:31
Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@RichDom2185 RichDom2185 merged commit 87dbaf3 into master Aug 8, 2025
9 checks passed
@RichDom2185 RichDom2185 deleted the leaderboard-refactor branch August 8, 2025 08:54
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