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

New Feature for RepoCard: Showing Language Bar for multiple languages #4026

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SemUijen
Copy link

RepoCard Feature: Show Language Bar

image

This feature enhances the RepoCard component by adding a language bar. Previously, the RepoCard displayed only the primary language, along with the number of forks and stars. In many cases, however, it’s helpful to show a broader view of the languages used in the repository, along with their relative proportions. This feature provides that additional context (see PybindExample below for reference).

How does the feature work?

The feature introduces only one new parameter show_lang_bar and three that work the same as in Top Languages Card

  • show_lang_bar If set to true, show the language bar (default is false)
  • hide: You can use &hide=language1,language2 parameter to hide individual languages.
  • langs_count: You can use the &langs_count= option to increase or decrease the number of languages shown on the card.
  • hide_progress: You can use the &hide_progress=true option to hide the percentages and the progress bar

Because the default for show_lang_bar is set to false, no existing implementation/use will change

Further Improvements:

  • Write more tests for RepoCards
  • Add the option of Forks and Stars to the new RepoCard Design (see image below)

Examples

Multiple Language with Bar: show_lang_bar = true and hide_progress = false
image
Multiple Language without Bar: show_lang_bar = true and hide_progress = false
image
Original: show_lang_bar = false (default)
image
There is enough room to add the forks and stars (not yet added). Will add later if there enough interest in this feature
image

Pybind Example:

image
image

Copy link

vercel bot commented Nov 10, 2024

@SemUijen is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added repo-card Issues related to the pin/repo card. lang-card Issues related to the language card. labels Nov 10, 2024
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. repo-card Issues related to the pin/repo card.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant