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
Showcase GitHub repo link languages #99
Showcase GitHub repo link languages #99
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Wow exciting PR 🤗
I'm down for it! Even in terms of a11y, should be better. Regarding the colors, it's nice to see what you tried based on GitHub colors but, as you said, the multi-themes current approach prevents us to find the right matches every time. On top of that, it's fairer if every language is rendered the same way and rather discretely on the page because it's not necessarily the most important information on the project card IMO. So the current implementation is better IMO than the others in terms of rendering. However, I find the badges too "present" with the Cupcake theme for example, as too colored. I would tend to use the default outline badge from daisyUI even if not as "fun": (Version's not right but the equivalent of https://daisyui.com/components/badge/#outline-badge) <div class="badge badge-outline">default</div> Do you think it makes sense? If not we can keep your actual version and wait for feedback. Regarding the percentage, I'm not sure it's really useful to display it in the badge itself. Maybe we can just sort the badges so that the language the most used is displayed first. I'm even wondering if we shouldn't remove the languages under xx% but I'm not sure about it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're on the same page regarding your last comment
Thanks a lot for this PR, nicely executed and detailed! 🔥🔥🔥
Related issues
This pull request is an attempt to fix issue #33.
Description
This pull request is a draft to start a discussion about the issue as I think there are two axes to consider:
The first part is implemented with tests in this PR and contains the basic features to support displaying the language stats. At the moment, the following informations are fetch / computed:
Depending on how this PR goes, some features may even be removed, e.g. if we don't use the percentage or colors.
The second part in this PR is a very basic implementation using badges.
I decided against progress bars as I think the main reason for GitHub to use this format is due to the limited space in the OG images. I think badges are more readable and more in line with the rest of the website.
This basic implementation is also color-less as I think the number of themes makes it difficult to get a good color for all of them considering that GitHub returns only one color and not one per theme they have.
For comparison, in my personal website, I use a library to tweak the colors returned by GitHub to be more readable on my website while still being close to the original colors. I also tweak them differently depending on the theme. I also have some specific overrides for some languages.
This approach works relatively well as I only have 2 themes but I don't think it would scale well for openresource.dev and the current number of themes.
Altho, to be honest, I do not find the current implementation that bad even without colors.
I tried using the GitHub colors as border colors but I don't think it looks good and it's not really readable on some themes / languages combinations.
I also tried as background colors but the same issues as above apply.
Do you have any thoughts / suggestions or even other ideas on how to display the data?
Motivation & Context
This PR adds language stats to the showcase page for GitHub repository links.
Type of changes
Checklist