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

feat: number of languages param for top langs card #445

Merged
merged 4 commits into from
Sep 12, 2020

Conversation

bashbaugh
Copy link
Contributor

Simply allows a user to specify how many languages to show on the top-langs card, between 1 and 10. Default is still 5.

Example here: https://benjamins-readme-stats-bt29bovd9.vercel.app/api/top-langs/?username=scitronboy&layout=compact&theme=gruvbox&num_langs=10

Let me know if I need to add anything else to the PR.

@codecov
Copy link

codecov bot commented Sep 9, 2020

Codecov Report

Merging #445 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #445      +/-   ##
==========================================
+ Coverage   93.91%   93.92%   +0.01%     
==========================================
  Files          17       17              
  Lines         526      527       +1     
  Branches      143      144       +1     
==========================================
+ Hits          494      495       +1     
  Misses         28       28              
  Partials        4        4              
Impacted Files Coverage Δ
api/top-langs.js 94.11% <100.00%> (ø)
src/cards/top-languages-card.js 100.00% <100.00%> (ø)
src/fetchers/top-languages-fetcher.js 100.00% <100.00%> (ø)

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 a11106f...4218a38. Read the comment docs.

@bashbaugh
Copy link
Contributor Author

bashbaugh commented Sep 9, 2020

Update: there seems to be an issue with the bottom padding being too short for 1 lang and too tall for 10 langs, I'll see if I can fix it.

@bashbaugh bashbaugh marked this pull request as draft September 9, 2020 20:44
@bashbaugh
Copy link
Contributor Author

bashbaugh commented Sep 9, 2020

Ok, it looks much better now: https://benjamins-readme-stats.vercel.app/api/top-langs/?username=scitronboy&layout=compact&theme=gruvbox&num_langs=10

@bashbaugh bashbaugh marked this pull request as ready for review September 9, 2020 21:03
Copy link

@cobrexus cobrexus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Copy link

@cobrexus cobrexus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, could you put some more padding between each line to improve readability?

image

@anuraghazra
Copy link
Owner

Thanks @scitronboy this looks good, requested a minor change please look into it :)

@bashbaugh
Copy link
Contributor Author

Ok, done. I clamped to the number 1, 10 with a default of 5. I have not changed the padding as Aryan suggested as it's the compact theme and I believe changing the padding would make it unnecessarily non-compact.

@anuraghazra anuraghazra merged commit e9019c1 into anuraghazra:master Sep 12, 2020
@anuraghazra
Copy link
Owner

Thanks for the PR @scitronboy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-card Issues related to the language card.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants