Skip to content

Instantly share code, notes, and snippets.

@ganpa3
Last active August 22, 2021 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ganpa3/3a9202aff4f08a9aab418c48f9505898 to your computer and use it in GitHub Desktop.
Save ganpa3/3a9202aff4f08a9aab418c48f9505898 to your computer and use it in GitHub Desktop.
GSoC 2021 Work Report

Google Summer of Code 2021 with Zulip

Project Description

Mentors

Repository

zulip/zulip

Contributions

Summary

Merged Pull Requests

  • Dynamically loading parts of the web app

When the web app loads, the server sends out all the HTML files stored at the backend. A better way would be to render content only when it's needed. I worked on this project which involved migrating the HTML files from the backend to the frontend using the Handlebars templates. This allowed the web app to be more dynamic and probably save some bandwidth. This involved a series of pull requests:

Apart from this, I also ported some other parts of the web app to load dynamically:

The Zulip web app uses Bootstrap 2 which is kinda old. One issue with that was that the modals wouldn't work well when a user rapidly clicked the button invoking the modal. This would cause the modal to not open again after subsequent clicks and would require a refresh to fix.

The recently-added muting users feature missed one thing - muting deactivated users. Although the users are deactivated, muting them helps in case they are reactivated.

Zulip provides a lot of keyboard shortcuts (Zulip also supports Vim bindings!). However, those shortcuts can interfere while a modal is present. Disabling them in that case makes sense.

Zulip has a great poll feature wherein users can vote their choice. A bug in the rendering of the poll widget caused it to no longer work when a user changed the view to All messages.

Zulip also has a great time widget feature, wherein a user can pick a time and others get to see it in their local timezones. The original formatting of the time string was the ISO standard one, but that's pretty unreadable at a glance. I changed to a more human-readable format. It did get reverted though since the new formatting messed with the markdown tables.

A small improvement where a user can click on their emoji status to bring up the status modal to change the status.

Unmerged pull requests

As noted above, the older Bootstrap version was causing problems. We set out on a long-term project of just moving on from Bootstrap and instead have modular libraries. In this, I worked on migrating the modal infrastructure from Bootstrap to a separate library, Micromodal.

Zulip uses tornado to manage requests at scale. Unfortunately, we got stuck on version 4.5 which is 2 years old, and missed out on all the new improvements. The upgrade was more involved since tornado migrated from their event loop to Python's asyncio loop. This changed things quite a bit for us since we customized some internal functions. This helped me learn more about asynchronous programming in general.

Zulip provides extensive searching support. However, one thing it's missing was searching by date.

Closing notes

I'm immensely grateful to my mentors, the Zulip community, and Google for giving me such a wonderful opportunity. I learned a lot this past summer. From reading code to writing code to collaborating and debugging. It's great to see your code being used in real-world software.

I will continue contributing to Zulip and helping out new contributors spreading the joy of open source.

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