Skip to content

Instantly share code, notes, and snippets.

@sbansal1999
Last active August 28, 2023 14:02
Show Gist options
  • Save sbansal1999/3fbd057945f8c1ec47de513e8fcf570a to your computer and use it in GitHub Desktop.
Save sbansal1999/3fbd057945f8c1ec47de513e8fcf570a to your computer and use it in GitHub Desktop.
This document describes all the work that I completed in Zulip as part of Google Summer of Code 2023.

Google Summer of Code '23 with Zulip

This document gives a summary of the work done that I did as a student developer in the Zulip open source project as part of Google Summer of Code 2023. Most of my work during GSoC has been around making various improvements to the Zulip integrations, drafts modal along with some bug fixes as well.

Quick Links πŸ”—

Overview πŸ“˜

During my time in GSoC, I undertook the following tasks:

  • Enhanced various integrations provided by Zulip, with a special focus on the GitHub Integration. This involved adding support for new events, providing end users the option to select the events for which they wish to receive notifications, and addressing specific bugs.

  • Made contributions to GitLab, resulting in the fixing of some bugs in the GitLab Integration.

  • Improved the drafts modal by implementing the capability to perform bulk deletions of drafts and by fixing some other minor bugs.

  • Developed a user-friendly modal aimed to simplify the process of generating integration URLs.

  • Actively engaged with the Zulip community and was also involved in addressing queries on the Zulip development community.

I just have to say that the more I explored the Zulip codebase, the more I became amazed by the abstractions that the codebase provides β€” which in turn led to a great developer experience. πŸ’™

The Zulip development community was very welcoming and helpful. I would like to thank Puneeth Chaganti -- my mentor, for guiding me throughout the project and helping me whenever I got stuck. Special thanks to Tim Abbott and the whole Zulip team for maintaining the project and for all the valuable feedback on my work.

Challenges πŸ”₯

I feel when I started contributing to Zulip, the major hurdle for me was to understand how Git and GitHub work; especially in a place where multiple people are working on the same codebase. The excellent Git cheat sheet by Zulip helped me a lot in understanding various Git commands.

Another challenge that I faced was to make sure that the commits are adhering to the Zulip commit discipline. I have improved on this aspect by reading the commit messages of other developers and constantly taking feedback from others.

I feel doing your work is one thing but presenting it in a way that is easy for others to understand is a whole different thing and that is what separates a good engineer from a great one. I feel I have improved a lot in this aspect during my time in GSoC and will continue to do so.

Just as Tim said in one of the GSoC Q&A sessions:

Learning to be amazing at self-QA, self-review, and explaining your work clearly and concisely to other engineers is one of the most meaningful things one can do to grow as a software engineer.

Work Product πŸ› οΈ

Pull Requests opened and merged during the Coding Period

#25831 - integrations: Separate issue labeled events in GitHub Integration.

This PR allowed the end user to choose whether they want to include the issue labeled and unlabeled events or want to exclude them. Also, the PR improved the notification that were sent during those events.

#25861 - integrations: Improve Sentry Integration.

This PR involved updating the Sentry Integration documentation for improved accuracy, adding support for the "Rails" backend, restricting Raven SDK checks to Python, introducing an exception fixture for "Vue," and adding support for sample events (previously, the integration used to send 400).

#25881 - drafts: Update drafts count when opening and closing the overlay.

Previously, if the drafts modal was open in two different tabs and if the user deletes one or more drafts in one tab then the count of drafts didn't get updated on the other tab. This can be fixed by moving the drafts from local storage to the cloud. But for now, this PR updated that count whenever the modal is opened or closed

#25888 - tools: Copy "assets" subdirectory of bots to "static/generated/bots/".

This PR added the code to copy assets subdirectory of individual bots that are present in our python-zulip-api repository to static/generated/bots/ folder. This was required as the documentation of some integrations require these asssets but are not being loaded due to the absence of the assets in their directory.

#25922 - compose: Add functionality for audio call.

This PR added the feature to add an audio call (video call with video muted by default) to the compose box. Right now, the button to add that is only shown when the video call provider is set to Jitsi Meet.

#26066 - integrations: Update documentation for Grafana Integration.

This PR updated the documentation for Grafana Integration since the process for creating an integration got changed since Grafana 8.3.

#26087 - integrations: Allow null pull request review body in GitHub Integration.

This PR allowed the body of the pull request review to be null. The documentation says that it can null or string. Also added a fixture to test this behavior.

#26151 - integrations: Remove label URL from GitHub issue labeled notifications.

This PR removed the label URL from the labeled notifications as the URL is not the correct one and redirects to an API page.

#26159 - integrations: Separate issue milestoned events in GitHub Integration.

This PR gave the control to the end user to opt-in for issue milestoned notifications in GitHub Integration. It also improved the notification; now they have information related to the added/removed milestone.

#26222 - compose: Allow flatpickr to automatically choose the direction.

Previously the flatpickr was always set to show at the top but this led to it being cut off when the message was at the top of the screen -- happens only when someone is editing a message. This PR fixed that by allowing the flatpickr to automatically choose the direction.

#26231 - integrations: Add support for "Test plugin" in Sentry integration.

If a user tried to create a webhook using the Webhooks plugin in Sentry and used the "Test plugin" to test the webhook, the server would send a 500 error, even though the integration worked perfectly. This led users to believe that the integration was not working. This PR fixed that behaviour and made sure that the sample event is handled properly.

#26484 - Make integration documentation consistent with each other.

This was a prep PR. It made sure that the spacing and numbering in the list are consistent for each integration documentation. So that it can help in future refactoring of the documentation.

#26500 - dialog_widget: Add horizontal padding to the modal content.

Previously, the modal content bottom border sometimes got hidden due to subpixel rounding. This happens only at some zoom levels and on Google Chrome. This PR fixed that by adding horizontal padding to the modal content.

Pull Requests opened during the Coding Period

#26201 - bot-settings: Add modal to generate Integration URL.

This PR adds a modal that makes it easier to generate an Integration URL. Earlier, the user has to copy paste things from the bot settings page and then piece them together to generate the URL. This modal makes it easier for the user to generate the URL by just filling in the required fields.

Commits:

  • c535e8e4 - integrations: Extract integration event types returning function.
  • 3b9dd259 - events: Add display name and event types to realm_incoming_webhook_bots.
  • b0678d6b - api-docs: Clarify name field in realm_incoming_webhook_bots object.
  • 71b57b2b - bot-settings: Add modal to generate Integration URL.

#26212 - integrations: Improve GitHub discussion comment notifications.

This makes the following improvement to GitHub discussion comment notifications:

  • Usage of consistent markdown code boundaries.
  • Instead of "created" being used as an action for every event, the action is now based upon the value of payload["action"].
  • When a topic param is present in the Webhook, the notification sent has the discussion title in it -- earlier it didn't.
  • Usage of Git Functions to generate them.

#26239 - integrations: Send GitHub pull request comment alerts to correct topic.

Pull request comment alerts were previously sent to a topic for an issue, which resulted in two different topics for the same PR. This PR fixes that and now the events are sent to the same topic.

Pull Requests opened before but merged during Coding Period

#25106 - integrations: Add Linear webhook integration.

This PR added the Linear Integration. It supported events related to:

  • Issues
  • Sub-Issues
  • Issue Comments

#25610 - drafts: Add functionality to bulk delete drafts.

This PR added the functionality to bulk delete drafts quickly. Instead of deleting them one by one, the user can now select the drafts that they want to delete and then delete them in one go. Some of the work for already done in #19943.

Commits:

  • fcf2fff1 - drafts: Remove classes that had the same effect.
  • 4a74c76f - drafts: Remove unused CSS styles.
  • 2abe2f26 - app_components: Convert "overlay_message_controls" div to flexbox.
  • 21159451 - drafts: Add functionality to bulk delete drafts.
  • 5d2b9f61 - drafts: Increase tippy delay for "Delete Drafts" icon.
  • 4460a91e - drafts: Rename class name to provide more context.

#25796 - integrations: Simplify regex checks in GitHub Integration.

This PR replaced the regex check with a simpler "startswith" function.

#25801 - integrations: Update links for various events in GitLab Integration.

This PR updated the fixtures for events related to notes in GitLab Integration. Additionally, some changes were made to the URLs of various events. URLs of some events were not found in the payload. For those kinds of events, the URL format has been changed to conform with the new one.

#25802 - message_formatting: Improve the message formatting tips table.

This PR improved the message formatting tips table by adding some more information to it.

Pull Requests opened and merged during the Community Bonding Period

#25593 - select_recipient_widget: Use "button" tag instead of "div".

This PR changed the select_recipient_widget inside the compose section to use a button tag instead of div. This made sure that when the user hovered over the select recipient button a hand pointer is shown instead of mouse/text pointer.

#25650 - message_formatting: Add a row for "---" in message formatting tips and Remove line from emoji formatting tips.

This PR added a row for --- in the message formatting tips table and removed an unnecessary line from the emoji formatting tips table.

#25679 - billing-helpers: Add commas to formatted amount.

This PR added commas to the formatted amount in the billing-helpers module. It achieved this by utilizing the Intl.NumberFormat to apply the necessary formatting.

#25698 - stream_settings: Migrate popovers to tippy.

This PR migrated tooltips created in stream_ui_updates.js to use tippy.js instead of Bootstrap popovers. It also fixed a bug in which no tooltip was shown when the Subscribe button for a private stream was disabled.

#25701 - ts: Convert rtl.js to TypeScript.

This PR converted rtl.js to TypeScript.

#25745 - message_formatting: Reorder items to prioritize more useful ones.

This PR reordered the items in the message formatting tips table to prioritize the more useful ones.

#25746 - integrations: Ignore merge queue push events for GitHub Integration.

This PR allowed GitHub Integration to ignore merge queue push events instead of sending a 500.

Impact πŸ“ˆ

The bulk deletion of drafts feature was a feature that I feel was long overdue. It would help the users to quickly delete the drafts that they don't need.

The modal to generate integration URLs would help the users generate the URLs quickly, easily, and without any errors. It would save the users from the hassle of copying and pasting things to create the URL.

The audio call feature would help the users to quickly create an audio call with the click of a button. It was a highly requested feature and I am glad that I was able to implement it.

The improvements to the GitHub Integration would help the users to receive more accurate notifications about various events.

Future Work πŸ“…

I would love to continue contributing to Zulip and would like to make sure that the work that I have done is maintained and improved upon. I will try to be more active on the Zulip development community as well.

I will make sure to continue improving the integrations provided by Zulip as well as will try to delve into other parts of the codebase especially the backend.

Once my current pull requests are merged, some of the things I will work next on would be:

  • Adding support for filtering events in the integration URL modal. #25976
  • Adding audio call functionality for Zoom and BigBlueButton. #26549 #26550
  • #26239 has been discussed and after that discussion comes to some kind of conclusion then I can work on that PR as well.

Again, I would like to thank the Zulip team for giving me this opportunity and for all the valuable feedback on my work. I would definitely recommend Zulip to anyone who is looking for a great open-source project to contribute to. πŸ’™

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment