Skip to content

Add "TOP_BRASS" Gamification Badge to User Profile #333

Description

@jagdish-15

Description

We are expanding the gamification system on user profiles! We need to implement a new "TOP_BRASS" badge that unlocks dynamically based on a user's progress.

Badge Name: [TOP_BRASS]

Unlock Condition: The user is currently ranked in the top 10 on the overall leaderboard. (If they fall to rank 11, the badge naturally locks again).

Implementation Steps

This is a purely frontend feature. All logic belongs in frontend/js/user/badges.js and CSS styling in frontend/user.html.

  1. Add the badge object to the ALL_BADGES array.
  2. Write the evaluation logic inside the loadBadges() function to check the user's ranks data. If the condition is met, add the ID to the earnedSet.
  3. Add a visually distinct CSS class (e.g. platinum/diamond/white theme) for the badge in frontend/user.html.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions