Skip to content

Instantly share code, notes, and snippets.

@sumanthvrao
Last active November 17, 2019 10:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sumanthvrao/696c0ea86e7c1abf58394db626803008 to your computer and use it in GitHub Desktop.
Save sumanthvrao/696c0ea86e7c1abf58394db626803008 to your computer and use it in GitHub Desktop.
Work Product of GSoC 2019 for the Zulip Open Source Project - Sumanth V Rao

The Zulip Open Source Project

Sumanth V Rao - GSoC Work Product 2019

drawing

Repository: Zulip-Terminal

Mentor : Neil Pilgrim (neiljp)

My work in the summer was centered around improving the aesthetics and functionality of Zulip's terminal client (ZT). Most of the work included introducing new features, fixing up most of the high priority issues and refactoring code, as well as improving and adding to the current test suite.

I would like to thank my mentor and the folks at Zulip for offering their advice and help when reviewing my code and also when answering my queries on the community forum.

All of my merged commits can be found here

A complete list of all the PRs I have submitted during the GSoC period can be found here

A complete list of all the issues I have filed during the GSoC period can be found here

What code got merged?

This is a summary of the many small-to-medium sized projects worked on during the summer.

  • Adding support for displaying topic list for streams: This adds a new topic view which can be toggled with t keypress on any stream button. The topic view displays topics in the stream sorted with the most recent topic at the top. This is similar to the topic (threads) in the web-app. Further, unread counts are displayed for topics and one can 'narrow' to the topic view with enter on the topic button. This project required studying different parts of the codebase (With respect to existing stream view), learning some core concepts in urwid and some multithreading concepts to parallelize data fetching.

  • Improve UI (Recipient bar layout and design): This change improves the top header and message recipient bar and removes the old redundant information to better display which narrow the user is currently in. I gained knowledge of working with type annotations and hints in mypy while working on this PR as this was my first introduction to it.

  • Add support to mute streams: This extends to a series of PRs which added support to mute streams from within ZT. This project helped me gain knowledge of using pythons partial function to help make a methods more generalizable.

  • Indent blockquotes to improve readability: This was an intriguing problem which involved using urwid's basic tool-kit to add the rather tricky UI feature to indent blockquotes based on their level of quoting. This project helped me explore Beautiful Soup library and try out various techniques to achieve the desired result.

  • Tool to update API field of zuliprc file: This was a tool was written for the Zulip/ repository and helps save time for terminal and other bots developers. The aim of the tool is to update a local zuliprc file with the correct API key from the server, after the key has been changed by an activity such as provisioning / rebuilding database. This project required studying about vagrant, configparser and about handling various possible errors in python.

  • Autocomplete / typeaheads: This series of PRs added typeahead support for @usernames, @groupnames and #streamnames. This project helped explore urwid-readlines, a tool to help provide autocomplete suggestions from a known possible list of names and implement. This library is built on top or urwid. As a result of this project, we helped identify and file a bug upstream, which was fixed in a new release of the tool.

  • Fixing non-deterministic race conditions Some interesting bugfixes included debugging tricky race-conditions like #389 and #462. I learnt the challenges of debugging for races first hand and some debugging techniques to help find the culprit easily.

  • Add custom Emoji support This project helped me explore emoji package and how Zulip provides support for different types of emojis. Due to poor rendering support for urwid with respect to unicode emojis, we had to move away from the original plan of displaying the emojis to just displaying the text.

  • Update user list dynamically This feature helped in updating the active-idle user list dynamically after the application has started. This was my first introduction to the Zulip Rest API and the functionality it provides.

  • Improve message search This patch introduced a more intuitive design for message search by searching for message within the same narrow and displaying the results in a Search Result narrow.

What code is yet to be merged?

  • Add dummy message in empty narrow: This PR has been quite a long journey and was one of my initial contributions. It adds support to show a message from welcome bot when a narrow is empty. This PR helped me familiarize with different parts of the codebase.

  • Add button to view @ mentions: This adds support similar to the web-app to view @mentions. This button is displayed on the left side below starred messages.

  • Mute topics from within ZT: This adds support to toggle mute on topics with M keypress. This is similar to the design for stream muting implemented earlier.

What's left to do?

Plenty of issues have been filed regarding possible follow-ups and improvements to the features I have added during the summer. The entire list of issues can be found here.

  • Topic editing: Add support to edit topic from the topic view. This is supported in preliminary stage right now with e on messages but having it integrated into topic view would help.

  • Make ZT handle events from other clients: Currently when one reads messages from the web-app and has ZT running, the read events don't get updated. That is, some events from server aren't handled by ZT but the other way around takes place.

Besides the projects listed above, there are plenty more ideas based on brainstorming alone which ZT would benefit from. Some of these have issues tracking them. For example, #458 tracks message search followups and #448 handles auto complete followups.

It has been fun to review others PRs and offer them help, whether it be with Zulip or Git related technologies. A complete list of all the PRs I have reviewed can be found here.

The experience of working on a good open source project during the summer has had a lasting impact on me and has helped me become a better Software developer. I would love to continue contributing to Zulip and expand my knowledge into other areas of Zulip as well. Undoubtedly, I would continue to keep learning from the awesome community here.



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