DEV Community

Genne23v
Genne23v

Posted on

Learning Open Source Community

Finding another open source issues

After I sent my first PR to open source project, I searched through another projects. Since I experienced that it takes some time to find right issues for me, and I need to communicate with maintainer to get an ok to proceed. So, I expressed my intention in some of repos that I could try. The responses were quicker than I thought. I received the first response from react-tags. And the rest of responses didn't take more than a day. So I started working on one of issue from react-tags.

First step to new project is tough

react-tags is a library to create the tagging function easily to React project. Demo is easy to understand. I thought it's a good project and issue for open source beginners like me. But I ran into some setup issues. The first issue was that I couldn't install dependencies because peer dependencies could not be resolved. Later I found out that I need to run my terminal with Rosetta as I use M1 Mac. I know there is a compatibility issue with M1, but I didn't have that thinking at all. After I spent some time to resolve dependency issues, I ran npm run start to run the demo project that they set up. What I was seeing was almost empty page on localhost:3000. I tried to fix a problem for many hours, then I tried to set up my own dev setup in another React page. The first contribution wasn't easy for me at the beginning either. But I guess this is also important part of development skill to know how to set up various environments.

Image descriptionI was in an ideal world that has no dependency issues and no installation failures

I should check when the issue was written

react-tags also supports suggestion. When the user inputs a couple of letters, it provides the list of suggestion to autocomplete. The issue that I was assigned is to filter the tags the user already selected. But I found that it's been fixed in current version of library already. I felt frustrated since I already spent many hours to set it up. I didn't check when the issue was written. Actually it was raised in May, 2017. So I posted my comment that the issue seems fixed already. Then, I looked at the other issues in the repository. Now I started to understand that this repo is not as active as it used to be. I decided to pick up another issue due to the amount of time that I spent already. So I found one issue requesting to increase test coverage.

Writing React test with Enzyme

I'm familiar with Jest and some of testing methodologies. But I haven't written a unit test for UI component. So I need ed to learn about mock, stub, snapshot and how to set them up as well as how to use enzyme library. As always, I had to use many hours to write tests that I wanted. I almost gave up one of the tests that checks the component is removed. But it was an essential part of the component and I really wanted to add that test. As usual, the feeling of achievement was great although my code doesn't do much. I'm done.

Conclusion

I'm not sure if my PR is going to be accepted as the repo hasn't accepted any PR for long time. At least I learned many things about open source project. I know contributing is not always rewarding, but what it's worth is the process of learning. Anybody who is starting to contribute would experience the same things. And I feel good when I close one of code editors that I had worked for many days!

Top comments (0)