Skip to content

Third and Fourth Week of Coding Period | GSoC 2023

Posted on:June 29, 2023 at 02:00 AM

Introduction

For half a week or so I was away from my laptop. So it kind of makes sense to write about the work I did in the third and fourth week of the coding period in a single blog post. I mostly worked on creating a modal that simplifes the process that users have to go through when creating a webhook URL for a Zulip Integration. Also, I worked on a couple of user reported issues in GitHub Integration.

Simplifying the process of creating a webhook URL

The prcocess for creating a webhook URL for an integration is a very manual process. Below are the steps that the user has to follow to create a webhook URL for an integration:

Construct the URL for the Airbrake bot using the bot's API key and the desired stream name:

https://yourZulipDomain.zulipchat.com/api/v1/external/airbrake?api_key=abcdefgh&stream=stream%20name

Modify the parameters of the URL above, where api_key is the API key of your Zulip bot, and stream is the URL-encoded stream name you want the notifications sent to. If you don't specify a stream, the bot will send notifications via private messages to the creator of the bot.

If you'd like this integration to always send notifications to a specific topic in the specified stream, just include the URL-encoded topic as an additional parameter. E.g., for your topic, append &topic=your%20topic to the URL.

As it is very clear that this requires a lot of manual work from copying the API key to URL encoding the stream name. So the core maintainers of Zulip suggested that we should simplify this process by providing a form to the user which will generate the webhook URL for the user.

I started working on this and the first hurdle for me was to figure out how a dialog box is shown to the user. There were other dialog boxes in the codebase — I inspected them and figured out that they were being handled by dialog_widget.ts which is very nice abstraction for handling dialog boxes.

I just have to say that the more I explore the Zulip codebase the more I am amazed by the abstractions that the codebase provides — which in turns leads to a great developer experience. 💙

After figuring this out, I started on creating a Handlebars template for the dialog box. Thanks to the detailed requirements that the maintainers provided, I was able to create the template fairly quickly.

Design of the dialog
box

Some changes in the backend were also required to make this work as the list of integrations is required for the Integration field. Zulip also allows filtering of events for an integration. So some further changes to the backend were required to get this done. I discussed the changes with the community members and their suggestions were really helpful.

I found that my design is not perfectly compatible with the dark theme of Zulip. So I am working on that and will be done with it soon. I will keep updating about the progress on this in the subsequent blog posts.

Other issues

Through the week I also worked on the following issues related to GitHub integration:

Both of the above issues are fixed now. 🎉

Social Event

We were able to host a video call with other GSoC students and one of the team members of Zulip. It was really nice to meet other GSoC students and was very fun to talk to them. From that meet I found that there are two other GSoC students who are working on Zulip from my city. So we are planning to meet in person as well. 😄

Conclusion

I think the week was fairly productive. I still need to cut some time off from the things that eat my time INSTAGRAM. Also, spent a good amount of time watching the Ashes series. I am really enjoying it. 🏏

I have also started triaging issues — this is something that I have never done before. I was able to get amount of work done in the week. My mentor has also been very helpful and has been guiding me throughout the process. 💓

Looking forward to have a great week ahead.

Feel free to drop any suggestions either on my Twitter or you can do it the school way by sending me an email at sbansal1999@gmail.com