Hello, everyone! Today I’m going to tell you how I’ve contributed to the Angular community. You will learn about the contribution process to a large open-source project and I’ll shed light on the code review. Let’s get started!
In my previous job, we had a long-lived SPA application, which the user may keep open for a very long time. And at some point, we noticed that some Observable
of HTTP request was never completed.
Sad Observable, that is never completed
After doing some small amount of research, we discovered that Angular doesn’t respond to outer XMLHttpRequest.abort()
in the case when the browser cancels HTTP requests itself. That situation occurs when the user turns off the device to sleep mode or presses Ctrl+S to save a web page. We even found the appropriate issue. And someone had already made a pull request (PR) to fix this bug. We wrote a workaround with XhrFactory
inside our project, expecting that the fix would be released.
But when I checked the fix status six months later, I found out that the issue was still open. And the PR was canceled since the author didn’t update it. Then I decided: “This is my chance to try open-source developing.”
First of all, I read through Angular’s contributing guidelines, which you can find in the COUNTIBUTING.md file. Here is a list of what you need to do so that the Angular team will consider your PR:
#javascript #open-source #typescript #angular