Skip to content
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

Badges / Medals #64

Closed
primo-ppcg opened this issue Oct 31, 2018 · 4 comments
Closed

Badges / Medals #64

primo-ppcg opened this issue Oct 31, 2018 · 4 comments
Labels

Comments

@primo-ppcg
Copy link
Contributor

I think it would be a nice idea to add a user badge count as the total of first, second and third place finishes across all languages, similar to the stackexchange sites.

For example on the profile page:

cgio-profile

or on the score boards:

cgio-scoreboard

The markup I used for each of these examples is below (minimal modification with inline styles).

Profile:

<h1 style="margin: 0;">JRaspass</h1>
<h4 style="margin: 0;">
  <span style="color: #ffcc01;">● 17</span>
  <span style="color: #b4b8bc;">● 27</span>
  <span style="color: #d1a684;">● 33</span>
</h4>

Scoreboard:

<td style="padding-top: 0;padding-bottom: 0;">
  <img src="//avatars.githubusercontent.com/JRaspass?s=26">
  <a href="/users/JRaspass">JRaspass</a>
  <div style="font-size: 0.7em;">
    <span style="color: #ffcc01;">● 17</span>
    <span style="color: #b4b8bc;">● 27</span>
    <span style="color: #d1a684;">● 33</span>
  </div>
</td>

I think these could probably be computed on the fly, but if it proves to be too computationally expensive, you could take inventory once, and then adjust the badges counts as users move in and out of the top three.

@JRaspass
Copy link
Collaborator

Just a quick message to say I love this idea, and great work on the mockups. The one on the user page should be really cheap to calculate as we already have the position of the user in each hole in each language thanks for the matrix.

No promises when I'll get round to writing this, but it will happen :-P

@primo-ppcg
Copy link
Contributor Author

Add [Idea] tag? 😉

@JRaspass JRaspass added the idea label Dec 8, 2019
@primo-ppcg primo-ppcg changed the title [Feature Request] Badges / Medals Badges / Medals Dec 13, 2019
@primo-ppcg primo-ppcg mentioned this issue Jun 1, 2020
5 tasks
JRaspass added a commit that referenced this issue Jul 2, 2020
@JRaspass
Copy link
Collaborator

JRaspass commented Jul 2, 2020

@primo-ppcg Trophy counts are now displayed on the profile page, you naturally have a silly amount! https://code.golf/golfers/primo-ppcg

I'll leave this bug open to work out what to do with the leaderboard UI too, unfortunately the SQL to get the trophy counts is rather expensive so I probably don't want to do it for a full leaderboard, maybe just the top n or something and make their rows thicker.

@JRaspass
Copy link
Collaborator

JRaspass commented Oct 1, 2020

I shall keep this in mind when designing the UI for #112, but at the very least there will be a new route called /rankings/medals that will sort golfers by total gold, silver, bronze medals. So I'm going to close this issue, medals are here to stay, thank you for the original idea @primo-ppcg

@JRaspass JRaspass closed this as completed Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants