-
Notifications
You must be signed in to change notification settings - Fork 50
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
add github like contribution graph css and ceil for 1,2 report count #453
add github like contribution graph css and ceil for 1,2 report count #453
Conversation
for this, should it changes max scale to 10 ? and for test part should i update the story snapshot after implement? @MrOrz any suggestion :) |
Sorry for the late reply, and thanks for taking this issue!
If we put it in code,
And yes, the storyshot should be updated and attached to the PR, so that we can know there are DOM changes in the PR 👀 |
…e/413-contribution-graph-enhancements
@MrOrz I updated varingScalingFactor and the snapshot. Can you check it ? but snapshot test seem fail on other component.
|
@kelvin2go It seems that your local material-ui version is different from this project. You can try the command writing in README.md :
|
hi @nonumpa,
|
It's abnormal, and I guess other .storyshot files also change Maybe you can google the keyword "npm local vs global package" to solve this problem. Explanation of why I guess your local material-ui version is different from this project and why it should not have First, we take a look at the .storyshot change And then look what CI test result says
That means only |
No worries, I think I can make a commit that tries to fix CI 💪 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for trying to fix this issue! An implementation detail of color scale is attached below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will make a commit that fix the bug below
components/ContributionChart.js
Outdated
return Math.max(Math.min(Math.round(count / SCALING_FACTOR), MAX_SCALE), 0); | ||
function scaleColor(count, maxContribution) { | ||
const varingScalingFactor = | ||
count < 10 ? 10 / MAX_SCALE : maxContribution.count / MAX_SCALE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the new color system and mobile style is working as expected. Thank you for the fix!
#413