Work Product for Google Summer of Code 2022 at Zulip
Even while writing this, I feel immense joy, satisfaction and gratitude to have been part of Google Summer of Code for 2022. A huge thanks to my mentors Neil Pilgrim and Sai Rohitth Chiluka for guiding and supporting me throughout this program. Their reviews and suggestions have been very valuable to me. The ease with which they have explained even the most sophisticated logics still amazes me. Apart from my mentors, I would also like to thank the entire Zulip community which has been very supportive and helpful through the entire length of the program.
- Title: API migration and search functionality improvement
- Organization: Zulip
- Repository: zulip-terminal
- Mentors: Neil Pilgrim and Sai Rohitth Chiluka
- My GitHub profile: mounilKshah
- Pull requests opened during GSoC: zulip/zulip-terminal
- Commit history: zulip/zulip-terminal
- PRs reviewed: zulip/zulip-terminal
Through this summer, I worked on a variety of issues and PRs. A major chunk involved migration of Zulip terminal to modern API elements, automation of docstrings and expanding search functionality.
Merged pull requests during GSoC
This PR introduces a new linting tool for ZT, that is,
lint-docstrings. Using this tool, the developer file-overview document can be linted against the existing docstrings in the files. In case of an mismatch, the overview file can also be generated by passing the
--fix flag. An extension to this PR was #1254 which added linting docstring to CI.
- 3cb107b: docstrings: Add docstrings to files matching developer-file-overview.md.
- 2c825da: tools: Add tools/lint-docstring to generate developer-file-overview.md.
- 5a712b5 lint-docstring/lint-all: Add linting for developer-file-overview.
As per ZFL 139 under Zulip 6.0, the
is_muted event is supported by the server. However, for backwards compatibility, the server sends two events, one containing
in_home_view and another with
is_muted. This PR is to provide support for handling
- 7d69b92 model: Add support for stream muting via is_muted property in events.
The purpose of this PR was to migrate event handling for subscription events from
is_muted events due to server version upgrades.
- 989e852 refactor: api_types/model: Migrate from in_home_view to is_muted.
Partially Merged Pull Requests
Prior to this pull request, the changes in the meta data of the user were not being handled by ZT. The commits from this PR which have been merged handle events under the
realm_user. This can later be extended to displaying changes on the UI and allowing the user to change the meta data through ZT itself (#989).
- 8571383 api_types: Add RealmUserEvent and RealmUserEventPerson.
- 01b3853 model: Add function to handle realm_user update events.
Pull requests opened and unmerged
The purpose of this PR is to enhance search fucntionality. This PR enables the user to enter keywords as mentioned in the list of operators and search under the desired narrow. It extracts the keywords from the search text and constructs the corresponding narrow as the user desires.
This pull request adds support to handle
add operations under
subscription events. The aim here was to make changes to the internal data structures when the user subscribes or unsubscribes a stream. The new key binding introduced in the PR opens a popup of all the streams present in the
realm, across which the user can toggle subscribe/unsubscribe.
As part of API migrations towards higher server versions, this pull request was to take the
subject attribute of
Message and change it to
Pull requests reviewed during GSoC
Pull Requests opened during Application Period
Pull requests worked on before the application period
Challenges and learnings
The most important skills and lessons that I learned were version control, Commit flow for PRs, linting and testing and value of peer reviews. The valuable feedback that I got from the community on my PRs helped me improve the quality of my code and the structure of my commits. I learned to write maintainable, simplified code without any complex logic. I got a chance to learn what it is like to work on a project that is used in real time, by people regularly.
The biggest challenge was to take time out for contributions towards Zulp, as I am a working professional. Contributing on weekdays had become very difficult, hence my mentors suggested that I should try pushing updates on weekends and thus make the review cycle quicker on weekends. Apart from this, writing tests had always been challenge to me. Earlier, writing tests consumed more time for me, than writing the functional code. But over the course of the summer, I understood the philosophhy behind writing tests and now, I have become much better at that.
A huge takeaway from this program for me was that just thinking over a solution is not useful enough. One has to come up with at least WIP level functional code which can help initiate discussion with the mentors and help you understand the direction you are supposed to be headed. Asking for help is not a bad thing, open source is not a competition and everyone here is with the intention of a collaboration, helping beginners always feels good, because I too was once a beginner. But one has to make an effort and try their best before asking for help.
- My experience with Zulip for the entire program of Google Summer of Code 2022 has been amazing and filled with a lot of learnings.
- My knowledge and understanding about version control has drastically improved. Creating atomic commits with appropriate commit messages has made me a much better programmer. Very high emphasis is put on commit structure, and over this summer, I understood the importance of this practice.
- The idea of involving the contributors in peer reviews has helped me enhance my ability to read, understand and test code quickly. Writing maintainable and clean code has now become a habit for me, all thanks to Zulip.
- The well maintained (API and developer) documentations and codebase with extensive comments have shown me that there's a lot more to software development apart from just writing functional code.
- All this has become possible due to the support I got from my mentors – Neil Pilgrim and Sai Rohitth Chiluka. Their knowledge and technical skills still continue to amaze me. My mentors made me realise that one of the key factors towards becoming a successful open contributor involve understanding the importance of communication. I shall never forget all that I have learnt from them and the entire Zulip community at large. I am proud to be a contributor at this great organisation and at the project of Zulip-terminal.
I intend to continue contributing to the Zulip terminal project, with my first priority being working on my pending PRs and getting them to a mergeable state. Other than that, I hope to expand my contributions towards other projects under Zulip.