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

feature - add flags to leaderboard #6509

Merged
merged 5 commits into from
May 13, 2020

Conversation

dzuqe
Copy link
Contributor

@dzuqe dzuqe commented Apr 27, 2020

Description

I've added functionality to load flag icon next to the country in Community leaderboard

Refers/Fixes

#4152

Testing

Before: https://user-images.githubusercontent.com/21199234/55767457-a3ba4a80-5a96-11e9-8a29-7b1da9e1e30e.png

After:

  1. Personally curated test data 4 countries: https://imgur.com/a/8UQcuSj

  2. If the mapping of Country name to flag fails the default flag is USA e.g Incorrectly spelled Yemen displays US flag https://imgur.com/a/qMRwD15

  3. Real Rinkeby data https://imgur.com/a/KhC84UK

I opted for the flag API instead of emojis as (from my personal research) Microsoft Windows doesn't support flag emojis. Idk, works on my Linux but the userbase of Linux compared to Windows is small.

@dzuqe dzuqe changed the title add flags to leaderboard feature - add flags to leaderboard Apr 27, 2020
@codecov
Copy link

codecov bot commented Apr 27, 2020

Codecov Report

Merging #6509 into master will increase coverage by 0.03%.
The diff coverage is 42.10%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6509      +/-   ##
==========================================
+ Coverage   27.21%   27.25%   +0.03%     
==========================================
  Files         288      289       +1     
  Lines       26733    26752      +19     
  Branches     3943     3945       +2     
==========================================
+ Hits         7276     7290      +14     
- Misses      19190    19195       +5     
  Partials      267      267              
Impacted Files Coverage Δ
app/marketing/views.py 11.92% <8.33%> (-0.10%) ⬇️
app/marketing/country_codes.py 100.00% <100.00%> (ø)
app/dashboard/embed.py 31.60% <0.00%> (+3.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6ae819c...011394c. Read the comment docs.

app/marketing/views.py Outdated Show resolved Hide resolved
app/marketing/views.py Outdated Show resolved Hide resolved
@danlipert danlipert marked this pull request as draft April 29, 2020 13:40
@thelostone-mc thelostone-mc marked this pull request as ready for review May 3, 2020 03:54
@thelostone-mc thelostone-mc requested a review from danlipert May 13, 2020 11:45
@thelostone-mc thelostone-mc merged commit 144365c into gitcoinco:master May 13, 2020
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