Skip to content

Instantly share code, notes, and snippets.

@prakhar1144
Last active August 24, 2023 10:50
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 prakhar1144/b53cd64e4babdff4de5c1acbeee1831e to your computer and use it in GitHub Desktop.
Save prakhar1144/b53cd64e4babdff4de5c1acbeee1831e to your computer and use it in GitHub Desktop.
Google Summer of Code 2023 @zulip - Work Product

Google Summer of Code 2023 with Zulip - Work Product

This is a summary of the work I did for the zulip server and web application as a part of Google Summer of Code 2023.

๐Ÿ“‹ Introduction

Zulip: Open-source team chat with topic-based threading

Zulip combines the immediacy of real-time chat with an email threading model. With Zulip, you can catch up on important conversations while ignoring irrelevant ones.

Why Zulip? - Efficient communication with organized team chat.

๐Ÿ”– Project Description

๐Ÿ’ป Contributions

๐Ÿ“š What exactly is a topic?

Alright, I've referred to the term topic multiple times already, but taking a moment to delve into its significance is well worth our time, especially considering that the entire project is built upon this very notion.

Let's take a concise but insightful look at what we mean by topic:

    ps: click on the arrows

    Streams are like channels in Slack or IRC
    Topics are unique to Zulip
    Organized conversations
    An example for better understanding
    Messages retain their context
    Topics increase efficiency

    Image credits: zulip.com

Summary: Topics are light-weight subjects, very similar to the subject line of an email. Like in email or a forum, messages about the same topic are shown together as a conversational thread.

๐ŸŒŸ Project 1 - Follow Topics

This feature holds a special place as one of the 5 most requested features for the Zulip project.

Feature requests: #6027, #12309, #8754, #11042, #25619 and many more...

Knowing that the work we accomplished this summer will make a positive impact on thousands of Zulip users fills me with happiness and pride.

๐Ÿง  Problem it solves

Suppose in an organization there is a stream named weekend-sports and it has topics named cricket, football, basketball, rugby, and 20 other sports.

Suppose a user interested in weekend-sports wants to receive:

  • desktop and email notifications for messages in cricket
  • only email notifications for messages in other sports or topics.
  • no notifications for messages in rugby.

Earlier, we could turn notifications on and off for a stream and mute a topic. The feature provides the user with control over notifications at the granularity of stream + topic, rather than just stream.

You can now mute rugby, have only email notifications enabled for messages in weekend-sports (stream-level notification setting), and Follow the cricket topic with desktop + email notifications enabled for Followed Topics.

Summary: We can Follow a topic and Get notifications for messages in 'Followed Topics' as per the notification settings in the 'Notification Triggers' table.

๐ŸŽ‰ Merged pull requests

  • #25640 notifications: Implement the notification aspect of the "Followed Topic" feature.

  • #26016 topic_popover: Add support to follow a topic from the topic_popover.

  • #26353 follow_topics: Add support to follow a topic from the message header and recent topics UI.

  • #26486 topic_popover: Add a 'Default' option and Show 'Unmute' option conditionally.

  • #26536 follow_topics: Turn on a core part of the feature on CZO. - Deployed on CZO

๐Ÿ” Under review

  • #26054 settings: Add options to automatically follow and/or unmute topics.

๐Ÿ”ฎ Future work

    The feature has been deployed on chat.zulip.org, so we need to fix any regressions or feedback we receive there.

    Also, there are a few high-priority and possible follow-ups to work on. See #25673

๐ŸŒŸ Project 2 - Topic Mention

This feature is a rust community requested feature and indeed a valuable one to add.

Feature details: #22829 Add @topic mentions

๐Ÿง  Problem it solves

Earlier, we could mention all the users subscribed to a stream using @all, @everyone, or @stream. It was not possible to mention only the participants in a topic.

Using the previous example, you could mention all the users who subscribed to weekend-sports but there are situations where you only want to mention users who are interested in football only.

Note: mentioning a user sends a notification to the user and it is used to call their attention to a message.

This feature makes it possible to mention participants in a topic.

๐ŸŽ‰ Merged pull requests

  • #25828 mention: Implement notification part of @topic mention.

  • #25978 mention: Replace 'wildcards' with 'stream_wildcards'.

  • #26195 mention: Fetch users to be notified of @topic mentions.

  • #26506 topic_mentions: Fix the incorrectly set wildcard_mentioned flag.

๐Ÿ” Open or Under review

  • #26371 topic_mentions: Add @topic mention typeahead.

  • #26382 topic_mentions: Highlight the @topic mention for topic participants.

๐Ÿ”ฎ Future work

    There has been a discussion around modifying the permissions for @topic mentions. Discussing and implementing it would be of great help.

๐ŸŒŸ Miscellaneous

Refactoring and other commits, not related to any major feature.

๐ŸŽ‰ Merged pull requests

  • #25704 user_topics: Update API documentation.

  • #26427 notifications: Rename private_message to direct_message.

  • #26404 test_users: Use 'do_change_user_setting' instead of '.save()'.

  • #26400 test_event_queue: Set the notification settings explicitly.

  • #26339 notifications: Remove the stray notification trigger strings.

  • #26337 settings: Add a saving-saved indicator to the 'SETTINGS/TOPICS' UI.

โœจ Learnings and Closing Remarks

As the exhilarating journey of Google Summer of Code with Zulip comes to a close, I find myself reflecting on the incredible experiences and growth this program has offered. Working alongside the talented Zulip community has been a privilege.

My confidence in my Git skills, effective communication, and writing unit tests has grown significantly. I've gained practical insight into the significance of diverse database design concepts that were previously only theoretical knowledge. Learning to manage backward compatibility and exercising meticulous care during the process of refactoring to handle data in the tornado queues were both new learning experiences for me.

Zulip's documentation proved to be an exceptional source of learning. Anders Kaseorg's presentation on Git, the smart decisions and trade-offs made, Shell tips, and my exploration into tools like Sphinx and Read the Docs underscored the efficiency of modern documentation workflows.

One aspect that truly stood out was the collaborative nature of feature development and engineering choices. The community's involvement, coupled with a well-defined life cycle for pull requests โ€” encompassing product review, QA testing, code review, and integration โ€” highlighted the meticulous process driving the project's success.

I want to express my gratitude to Abhijeet Prasad Bodas and Tim Abbott for their continuous engagement in discussions, diligent code reviews, and invaluable assistance throughout the program. Greg Price for his wonderful, clear explanations on numerous occasions.

Thanks to everyone at Zulip for the best open-source experience.

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