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

Language icons #1380

Open
RakeshPotnuru opened this issue Oct 12, 2021 · 7 comments
Open

Language icons #1380

RakeshPotnuru opened this issue Oct 12, 2021 · 7 comments
Labels
enhancement New feature or request. lang-card Issues related to the language card.

Comments

@RakeshPotnuru
Copy link

Describe the solution you'd like
Add icons to languages like github stats icons.

@FayasNoushad
Copy link
Contributor

Its a good suggestion

@rickstaa
Copy link
Collaborator

@RakeshPotnuru I think this is a cool feature. We could use https://github.com/devicons/devicon/pulls to pull the icons.

@rickstaa rickstaa added enhancement New feature or request. lang-card Issues related to the language card. labels Mar 9, 2022
@DIvkov575
Copy link

could I be assigned to this?

@rickstaa
Copy link
Collaborator

rickstaa commented Oct 11, 2022

@DIvkov575 I am happy to assign you to this issue, but I'm not sure it can be implemented without slowing the cards down too much. As explained by @anuraghazra in #2099 (comment), PRs should be mostly self-contained to prevent the Vercel function or GitHub from timing out. The devicon npm package is 139 MB and can, therefore, not be used. We could fetch the icon SVGs directly from the Devicon CDN, but this will still end us up with around 500kb of SVG data per icon. So I don't think implementing this feature is possible given the current Vercel and GitHub timeout limits. Maybe let's check what @anuraghazra thinks.

@DIvkov575
Copy link

@anuraghazra @rickstaa Do you think it would be possible to add images by adding them to the person's readme repo and passing image paths into the card?

@rickstaa
Copy link
Collaborator

@anuraghazra @rickstaa Do you think it would be possible to add images by adding them to the person's readme repo and passing image paths into the card?

I think this is not desirable since GRS is meant to be easy to install. It is not a matter of where these icons are stored, the Devicons CDN is very fast, but more a matter of the total size of 10 icon SVGs on the card and the effect on the initial card loading speed. I did not test this out myself, but just a hypothesis. You can of course still create a PR so we can test it out. 👍🏻

@rickstaa
Copy link
Collaborator

rickstaa commented Oct 12, 2022

@DIvkov575 To give you a bit more context. The timeout I'm talking about is the Vercel maxDuration timeout we must adhere to (see https://vercel.com/docs/concepts/limits/overview). That said, we might be able to include this as an opt-in feature that can be enabled using an environment variable. This would allow us to enable language icons for the GitHub action where these timeouts do not exist (see #2179). This GitHub action has, however, not yet been implemented.

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

No branches or pull requests

4 participants