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

Adjust ContributionChart coloring #454

Merged
merged 3 commits into from
Oct 21, 2021
Merged

Adjust ContributionChart coloring #454

merged 3 commits into from
Oct 21, 2021

Conversation

MrOrz
Copy link
Member

@MrOrz MrOrz commented Oct 21, 2021

Adjust coloring again to make contributions obvious for both low contribution and high contribution users.

  • For users with max contribution >= 20, it takes 5 contribution to advance to next color.
  • For users with max contribution <= 8, it only takes 2 contribution to advance to next color.
    • So that new users in editor's meetup can see their color deepen faster
  • For users with max contribution in between, the coloring step scales propotionally.

Screenshots

In the screenshots below, the maximum daily contribution is 29.

Before #453

  • Takes 5 contribution to advance to next level
  • However, coloring is rounded (Math.round(count / 5)) so that there is no color for count = 1 or 2.

image

Current production (#453 )

image

This PR

  • As max contribution > 29, it is colored as if max contribution is 20.
    • Advance to next color every 5 contributions.
    • Any contribution >= 16 will be colored in deepest color.
  • As a result, the color of many cells are deepened.

image

Users with fewer contribution or no contributions

image
image

so that it takes at most 5 contrib to advance to next color
Also lower min contribution to 8 so that it takes 2 contrib to advance to next color for those who has fewer contrib
@MrOrz MrOrz requested a review from bil4444 October 21, 2021 12:04
@MrOrz MrOrz self-assigned this Oct 21, 2021
@coveralls
Copy link

coveralls commented Oct 21, 2021

Coverage Status

Coverage increased (+0.07%) to 75.363% when pulling d808d14 on adjust-contrib-chart into 3b5ad97 on master.

@MrOrz MrOrz merged commit 9a68c27 into master Oct 21, 2021
@MrOrz MrOrz deleted the adjust-contrib-chart branch October 21, 2021 15:45
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