Skip to content

Conversation

guimann2015
Copy link

@guimann2015 guimann2015 commented May 28, 2025

Adds a new leaderboard feature that allows users to compare their ratings
against their friends across different game variants.

This implementation includes:

  • Privacy controls to ensure users can only view their own friends' rankings,
  • Support for singular/plural translations (e.g., "your only friend" vs "your X friends"),
  • Multilingual support (EN, PT, ES, FR, BR),
  • UI integration with existing following/friends system,
  • New route (/@/:username/following/leaderboard)

This is the new button in the friends page:

image

This is the friends leaderboard for a user with more than one friend:

image

This is the friends leaderboard for a user with no friends:

image

Co-authored-by: Francisco Guerreiro francisco.franca.guerreiro@tecnico.ulisboa.pt
@franciscofguerreiro

Co-authored-by: Francisco Guerreiro <francisco.franca.guerreiro@tecnico.ulisboa.pt>
@franciscofguerreiro
Copy link

@ornicar would appreciate your review when you have a moment. Thanks!

@ornicar
Copy link
Collaborator

ornicar commented Aug 17, 2025

Before going into the code details, I have a few reservations about the viability of the feature.

The ranking collection is designed for site-wide leaderboards. It only contains players who have played a ranked game in a given category during the last 7 days. The point of this is to prevent a player from sitting on a peak rating for too long, and also to reduce the amount of documents.
It works well for a site leaderboard, not so much for friends. Players will wonder why some are missing from the leaderboards.

Another thing is that people can (and do) follow 400 other players. Displaying that page can then be quite costly.

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