feat(languages): use github language names and add new icons
Double check these details before you open a PR
- [x] PR does not match another non-stale PR currently opened
Features
This PR adds language icons and alias that match the naming GitHub uses in the GitHub API. GitHub uses "linguist" for the languages API. Their list of languages can be found here: https://github.com/github-linguist/linguist/blob/master/lib/linguist/languages.yml
The advantage of this is it makes it possible to use icons directly, without creating a custom mapping.
- Many new icons, from https://github.com/LizardByte/uno/tree/master/gh-pages-template/language-icons
- powershell icon updated
- current nginx icon moved to wordmark icon and added new original icon
- jest-plain renamed to jest-original
- fixed graphql "plain" icons -> original
- re-ordered a couple of out of order icons, like windows8 and reactrouter
- some new altnames added (taken from the linguist list)
- some tags added or changed from existing icons (taken from the linguist list)
This PR closes NONE
- Resolves https://github.com/devicons/devicon/discussions/2266
Notes
I understand that typically new icons are probably submitted one per PR; however since this is somewhat of a new feature (names to match github API), I'd really rather avoid 230 PRs.
The colors for new icons were selected using a color picker. If there was a more prominent color, I selected that, otherwise it may be a random color in some cases (where an icon may have many colors).
I have a question on "graphql". There is no "original" icon, and no alias to it. Is that correct? Edit: I updated the graphql icons based on the comment below.
@ReenigneArcher all icons should have an original version, that includes graphql. So that's not intended
Edit: The graphql icons should have been named "graphql-original" and "graphql-original-wordmark", and had aliases to "plain" and "plain-wordmark" respectively.
This PR is ready for review.
I rebased this again. Regarding the recent awk icon, I kept my icon since I followed the guidelines here (https://github.com/devicons/devicon/wiki/SVG-Standards) and the PR that was merged did not (both padding and view box size were not followed).
I'd like to request a review as I do not want to rebase this repeatedly. I understand it's a really big PR, so please let me know if there's anything I can do to help the process.
@ReenigneArcher I sadly don't have much time to review this for some time.
A few things though:
-
You don't need to rebase the PR, we actually prefer merging since that makes it easier to see what changed between each commit, making it easier to review. You can also ignore the PR out-of-date warnings until the PR is reviewed. We usually just merge the latest develop changes once the PR is ready to be merged.
-
We actually need a PR for each updated or new icon. This is because our automated workflow uses the PR name to create the font before a new release. So if the icons change or the "svg" or "font" fields in
devicon.jsonchange it will need to be done in a separate PR. If we have everything in a big PR we'd have to create the font manually which would be quite laborious. This is something I hope we can improve in the future, but sadly I don't have time to do it myself. -
If you change the name of an icon that is a breaking change, therefore I suggest you bundle the icons where only the name changes into a separate PR. That way we can still release the other stuff before we change the names.
Sorry about the late reply on this, but I hope this was useful info for you.
Don't hesitate to reach out if you need anything, whether it be advice, help or you have any questions
For point 1, it had to be rebased because there were conflicts. Maybe breaking out the json file into multiple files would be helpful in these cases... Actually the icons in separated folders would be as well. Like an A-Z parent directory.
Regarding point 2, do you think that can be improved anytime soon? I don't have time to create 149 PRs, probably no one does, lol.
Regarding point 2 (again)... It looks like these are areas of interest?
- https://github.com/devicons/devicon/blob/ca28c779441053191ff11710fe24a9e6c23690d6/.github/workflows/check_icon_pr.yml#L32
- https://github.com/devicons/devicon/blob/master/.github/scripts/check_icon_pr.py#L26-L29
Would you accept a PR allowing this to run over all the changed or new icons?
Would you accept a PR allowing this to run over all the changed or new icons?
Bump
@ReenigneArcher hi, sorry about the very late response.
I have very little time to work on open-source at the moment, but if you made such a PR it would be on the top of my list of things to review.
That is true for all workflow/automation related PRs. Anything that makes things easier or faster for reviewers has a high priority now that so few reviewers are active.
Also, let me know if you'd consider joining us as a reviewer/maintainer :)
@Snailedlt Sounds good! I have a good amount of experience with GitHub workflows and actions so I will definitely take a look and see how this can be improved!
Also, let me know if you'd consider joining us as a reviewer/maintainer :)
I can try to help out when I have down time in my other projects (mainly https://github.com/LizardByte/Sunshine) or waiting for CI to finish, but I don't have a ton of time. I feel like these reviews should not be overly complex though since generally it's not actual code and just icons/json... probably wait to add me until this PR gets merged though, as at that point I will have a better understanding of the requirements and anything I might have missing in this PR.
This is a little off topic, but I also have a few suggestions that could make things easier for contributors.
- Make the default branch the "develop" branch. This would make things a lot easier for contributors as they really never work with master. We used to have a similar setup and everyone was always basing their work off the "master" branch instead of the dev branch, and always making PRs into "master" instead of dev. Changing the default branch helped immensely.
- I'm not sure how difficult of a change it would be, but separating the icons out by the first letter would help a lot. Currently with everything in one directory it's very difficult to navigate in an IDE. My idea is a different json file for each first letter
A-Zand#, and same directories within the icons directory.
Thanks @ReenigneArcher! Would be good to have someone work on GitHub Actions. I also have some experience with it, so let me know if you need any help along the way :)
Regarding your suggestions:
-
We've already considered making develop the default branch, but I think the reason we didn't change it is because there's a lot of workflow stuff which demands the default branch be the master or prod branch. I do think we have an issue on fixing that though, which is open for grabs if you're interested.
-
Do you mean that the folders/directories are hard to work with or just the devicon.json itself? If you mean the devicon.json, there's already an issue suggesting splitting it up so that there's one json in each icon folder. This would also require changing the workflows, which is part of the reason it hasn't been done, along with the fact that none of the maintainers have time to fix it themselves. I support the idea of splitting the json, so if that's also something you're interested in working on, let me know so we can spec it out.
I opened https://github.com/devicons/devicon/pull/2295 to address multi submissions/edits.