Contributing to Open Source - Week 4
January 10, 2022Hello again! New week, new issues to work on. Originally, today was the end of a four-week adventure working on open-source projects, but it turns out I have one week more to have fun. If there is one thing that I can take home with me from this phase is that open-source contributions are fun, help you make a difference in projects that many people use, and allow you to work on different things. It is certainly not easy (the bigger the project, the harder it is) but it’s extremely rewarding so I will probably continue to contribute throughout my career.
These past few days I worked on two new issues in a project called Deltachat. This project aims to provide a Telegram-like user interface to make emails more intuitive and comfortable to use, meaning that you can have conversations open with specific people, easy access to messages and attachments, etc. The best part is it doesn’t require signing up! It works by leveraging the existing email services so just login with your favorite email account and you’re ready.
The first issue I worked on was related to the profile picture. There was a bug that prevented a user the removal of a profile picture once it had been set. I thought it was a simple logic error so I took on the issue and started working.
The app is built using ElectronJS so it’s basically JavaScript inside a desktop wrapper, that gave me access to using the browser’s dev tools to make it easier to find where I should focus on the code. The logic where the profile picture was deleted seemed OK at first so I had to dig deeper: into the backend request that was supposed to delete the profile picture from the database, the backend is written in Rust with some Python bindings so it took me a little while to get around it. Searching for functions with the string “Avatar” on them (that’s the internal name for profile picture) I stumbled upon some Python tests that asserted if the provided image path existed in the system, then I found out in the error logs that the provided string representing an empty profile picture (”) was being interpreted as a path! I only had to change the empty string representation to a null object and problem solved.
So, in the end, it was a logic error but not quite as I imagined. It was more subtle than that and I learned that you may not find the solution easily where the error originates so you may have to dig deeper, even into unfamiliar territories. (Always good to learn new things!)
Another issue I worked on was related to the user interface, where a component was not supposed to scroll horizontally but it did anyway. Curiously, this issue was open since June but no work was done on it, it could mean that it was a hard issue but anyway I took it because I like a challenge. It turns out that, like the previous one, the solution was simple but far from obvious. The solution included removing some styling classes provided by the main UI library used (BlueprintJS) but they seemed to be pretty ingrained there (providing the style for many components.) For this issue, I used a trial and error strategy to find out in which individual component the error was found. Also, I manually edited the CSS on the browser’s dev tools to sketch out a solution beforehand.
These two issues were fun to work on. Also, this week I finally got to finish the work I had been doing on Greenstand’s web map. My PlanterQuote card component was accepted, pending merge, and the Facebook’s like button I am sure it’s working but one of the contributors says it’s not, so I am waiting for an extra tester to confirm whether it works or not.
That would be all for this post, I will try to find a couple more issues to work on this week (hopefully some challenging ones!) and I will talk about them in the next post.
Take care!