Skip to content

Instantly share code, notes, and snippets.

@chdinesh1089
Last active August 22, 2021 16:40
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 chdinesh1089/4ef61a95af291e4f225dedfd03a5e987 to your computer and use it in GitHub Desktop.
Save chdinesh1089/4ef61a95af291e4f225dedfd03a5e987 to your computer and use it in GitHub Desktop.
Google Summer of Code Work Report 2021

Google Summer of Code 2021 -- Zulip

I worked on several full-stack features that can potentially improve user experience with zulip during the GSoC period. Work on other valuable areas include projects like adding example tests to act as documentation.

They are listed below in detail.

Read receipts

This feature lets users see who all read a particular message. #18935 has the code for this feature. Most of the design decision discussion resides at chat.zulip.org in #design>typing indicators and read receipts.

Typing indicators for streams

Implemented typing indicators for streams. Most of the work on this was done prior to GSoC but I made a few tweaks and rebases during the GSoC period. PR: #17040

User settings to configure sending typing notifications and read receipts

Adds three settings to allow users to configure whether they want to let other users know they're typing in PMs, or streams and if they've read a message. PR: #19200

Though the above two projects were completed, they haven't been merged since we wanted to make sure users can opt-out of using those. So, we added non-functional settings in this project to configure them. These settings will be made effective in the actual PRs.

This was blocked by some immediate work on the settings system which raised a few questions on how we want these new settings to be organized from an API perspective and also code clarity. The below project addresses that.

Create _legacy dicts for existing settings

Refactored code to distinguish the settings added before the addition of user_settings in the /register response and allow only the old settings to be sent in-line at /register. To understand this better it would be best to see the discussion at #api design>user settings response in /register and the PR #19561.

Example code snippets for tests

Zulip has example tests to act as documentation for beginners to get acquainted with writing tests and also for experienced developers to brush up on writing tests. I added a few more:

Illustrate use of self.assertLogs(), self.settings(), and self.assert_in_success_response()

Added a unittest example to illustrate how to use the above-mentioned functions along with code comments. The example resides at zerver.tests.test_example.TestDevelopmentEmailsLog. PR: #18921

Demonstrate mocking

Added an example explaining mocking briefly and demonstrating how it can be helpful with a test dealing with code related to datetime. This also resides in test_example.py as TestMocking. PR: #19139

Add a mock_template example

mock_template is a zulip javascript test function that helps to mock handlebars templates. Added an example for that in #19316 and rewrote in #19421 to a better example. This resides on upstream at frontend_tests/node_tests/example8.js

Banner to notify user when messages aren't being marked as read

Added a banner that is shown in views such as search where messages are not marked as read. It notifies the user that messages aren't being marked as read and lets them switch to a mark-as-read mode that marks the messages as user scrolls. PR: #18807

Also, opened #19462 which is a simpler version that allows to just mark all messages in the view as read.

Improve user interactions with message timestamp

  • Made timestamp a permalink to message. be3b637
  • Migrate timestamp tooltip from title to a TippyJS tooltip.
  • Refactor timerender code.
  • Reformat tooltip content. #19026

The work on this was started in #18856.

TippyJS tooltip migrations and bug fixes

  • Use TippyJS tooltip for <time> and reformat its content. #19086
  • Fix blueslip error on popover 'add emoji reaction' hover. #18824
  • tippy: Fix blueslip error on edit history timestamp hover. #19305
  • recent_topics_timestamp: Fix tooltip content. #19108
  • Use tippy tooltip for topic header timestamp. afe6404

Button to go to the narrow to which a message is being composed

Added a button that allows users to go the narrow (message view) they're composing the message to. The button appears/hides smartly based on which view they're in. This reduces the number of clicks thereby improving user experience with compose box. #19590

Migrate logging mocks to assertLogs

Finished migration of logging mocks to assertLogs that were not migrated by the PRs referencing the issue #15331. PR: #19392


If you're more interested in my work at zulip, checkout merged commits and pull requests by me.

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