anuraghazra / github-readme-stats

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

reStructuredText language overflows on Wakatime Widget #1723

Open krishnans2006 opened 2 years ago

krishnans2006 commented 2 years ago

Describe the bug When reStructuredText is part of Wakatime's language list, it overflows into the progress bar and messes up formatting.

Expected behavior Either the language text should terminate before reaching the progress bar (example: reStructure...), or the progress bar should move according to the text present. The language should not extend into the progress bar as it currently does.

Screenshots / Live demo link (paste the github-readme-stats link as markdown image)

Live Link: Wakatime Stats

Screenshot: image

Additional context The could possibly occur with other languages - I only noticed reStructuredText as it was one of my used languages. Therefore, a more general fix would be better.

raychanks commented 1 year ago

I think adjusting the progress bar's position is more appealing when compared to truncating the word.

As KrishnanS2006 said, a straight forward way is to increase the horizontal offset of the progress bar, but we might need to adjust again down the road.

Another way I can think of is to count the number of characters of the language, and then multiply by a certain factor to get the offset. If we go with this approach, we might need to also increase the card's width accordingly for languages with very long length.

rickstaa commented 1 year ago

I think adjusting the progress bar's position is more appealing when compared to truncating the word.

As KrishnanS2006 said, a straightforward way is to increase the horizontal offset of the progress bar, but we might need to adjust again down the road.

Another way I can think of is to count the number of characters of the language and then multiply by a specific factor to get the offset. If we go with this approach, we might need to also increase the card's width accordingly for languages with very long lengths.

Thanks for your comment. I think decreasing the progress bar makes sense to me. 👍🏻 Feel free to create a PR. You can check if this format looks nice with the longest language name (see https://github.com/github/linguist/blob/master/lib/linguist/languages.yml), If not, we should also increase the card length a bit.