anuraghazra / github-readme-stats

:zap: Dynamically generated stats for your github readmes
https://github-readme-stats.vercel.app
MIT License
66.51k stars 21.56k forks source link

Add an option to display byte count for Top-languages #3707

Open abap34 opened 3 months ago

abap34 commented 3 months ago

Is your feature request related to a problem? Please describe.

Currently, the Top Language Card only displays the percentage of each language used. However, adding an option to display byte counts could incentivize more coding activity, thereby increasing the amount of code generated by individuals.

Describe the solution you'd like

I have already implemented this on my self-hosted github-readme-stats. ( So, if there is demand for this feature from the community, I can clean up the implementation and submit a pull request :)

This can be achieved by making minor modifications to the api/top-lang.js and src/cards/top-languages-card.js.

Describe alternatives you've considered

No response

Additional context

It might require CSS adjustments for many layouts. For instance, the default layout appears as follows:

qwerty541 commented 3 months ago

Hey, @abap34! Thanks for your interest in our project and submitting feature request. You're right, we use top issues dashboard to prioritize and track community demand, if this feature will be supported by the community feel free to open a pull request for me to review.

abap34 commented 3 months ago

Thank you for your response @qwerty541! I'll submit a pull request if it gets featured on the dashboard 😄

qwerty541 commented 3 months ago

Just want to additionally note that we can avoid neccesity of making changes in layout by shorter formatting of bytes numbers: 670,404 bytes => 670k bytes. Also we can convert bytes in KB, MB and GB when it will be enough for one unit: 670,404 bytes => 670KB.

abap34 commented 3 months ago

That idea sounds very good! Given the current number of characters in the percentages, I think a format like "670 KB" would be better.

This issue seems to be featured on the dashboard, so I will implement it and send a pull request.

qwerty541 commented 3 months ago

I want to warn you in advance that review and merging of your pull request can be postponed for several months. We have rule in our team that merging features require approval of at least 2 members. Currently I'm alone active, other members busy, so don't hurry with opening pull request.

abap34 commented 3 months ago

Oh, I see. Thank you for letting me know. Sorry, I've already submitted the pull request, so please review it whenever you have the time.
I appreciate your daily maintenance work!

qwerty541 commented 3 months ago

Thanks for your efforts implementing this feature and for your kind words. I just left a review https://github.com/anuraghazra/github-readme-stats/pull/3708#pullrequestreview-1958666830.