Lots of people want to contribute to open source software. Though getting started contributing can be at first a challenge. The easiest way to get started contributing to open source though is to use open source software. With it can come times where you wish there was a feature, or you notice a wierd bug you wish was fixed. One of the first open source projects I contributed to was the creation of the Jellyfin Theater app, (now archived). Having a jellyfin server, since its invention I really desired a native client that I could stream movies and listen to music on. In having that need, I decided to sit down and dig into the jellyfin api. Over the weekend I was able to put together a functioning piece of the Jellyfin Theater App https://github.com/jellyfin-archive/jellyfin-desktop.
Another etc…) I instance of having that itch to contribute, would have been a few weeks or so ago. With the advent windows recall, I decided for any device the I dont need (i know, i know, but there are instances that i need to use windows for schoolwill install linux on whatever isnt needed. I started by installing Ubuntu onto my thinkpad, and then I got started customizing the operating system. In doing so, one of the common tools you will use when customizing the gnome desktop is the Gnome-Tweak tool.
The issue that sparked that itch for me was that when you install a theme, the drop down menu, seemingly randomly sorts the themes. So if I wanted to apply the yaru
theme, it could be first in the list, or in the middle. So I took it on my own to contribute some form of a sorting algorithm to resolve this issue.
Going about scratching
To review the steps here,
- Find that Itch.
- Scratch the Itch.
Nah, im just playing the steps really look more like this.
- Use Open Source Software.
- Discover bug, Desire a feature, whichever comes first.
- Search under existing issues open or closed if this bug or feature has been discussed.
- If it has been discussed, and seems like the maintainers were open to the implementation of said bug fix, your good to go!
- If it has been discussed, and seems like the maintainers are not open to the implementation of said bug fix, fork the project and maintain your own version, or weep.
- If it has not been discussed, make an issue, and start working on fixing your bug!
- Fork the Project.
- Fix the code.
- Submit a pull request.
- Await approval (can be ages before you get approved and or a pain in the ass following their weird guidelines.).
Filing and Issue and Forking the Project
In this case, im only fixing the Gnome-Tweak Too. Honestly, I was surprised to see that the app was written in python, but if it works dont fix it right? To implement my specific pain in the ass issue, we start at step 3. You can see here that there are few sorting issues related to the app, but specifically issue number #487 is the one that relates to us. Looking at the issue it seems like there has been no updates or notifications about fixing the issue, so i took it upon my self to do so.
Fixing the Codes
The fix ended up being pretty simple, to fix https://gitlab.gnome.org/ofgrenudo/gnome-tweaks/-/compare/master...master?from_project_id=544
we could have just taken the themes variable and apply .sort()
to it, but it seems like the structure was a tuple like so (('name', 'filepath?something'), ('name', 'filepath?something'))
, so i decided to instead use the sorted()
function will return the sorted tuple with a special function that decides that we will only sort based on the first item within the tuple. That function looks like so
|
|
Next we test, and surprisingly it is working the way its intended to!
Submit and Wait
Now we submit a pull request and wait for it to peer reviewed and approved by maintainers.
Thats pretty much, everything. So if you ever get that itch, or discover a bug dont feel intimidated when looking to contribute to opensource software. For the most part you can follow these 7 steps and you should be good!