Work Product: Google Summer of Code 2021 with Zulip
Improving Zulip’s terminal interface.
Zulip-terminal is the official terminal client for Zulip which has been actively developing for the past few years and has already reached a certain level where it’s no longer considered a temporary client. It still has a long way to go to match the level of web-app, in terms of feature enhancements. So, my primary objective this summer would be to provide more feature support to Zulip-terminal and improve upon the existing ones by fixing bugs and potentially adding and improving upon the test suite. Abstract
Over the summer, I worked on several high-priority issues, including Migrating to the new quoting style #514 which was implemented via #854, improvements and additions to the Stream Info popup such as Stream members section, extra fields related to stream settings and a configurable Visual notification checkbox all via [#856, #878, #880, #900, and #1080]. A lot of bugfixes were merged that fixed Wildcard mentions not shown in the mentions narrow #1038, Buggy Quote rendering logic #942, and WSL detection bug #1059 among others. Several feature enhancements were also pushed that added Support for opening messages in browser #991, Support for renaming topic of messages with (no topic) #946, but the most important feature that I worked on was Adding support for reacting to messages #913, which also needed a preparatory PR to Migrate our emoji storage to couple original+aliases together #1084, and was based on the work of Kaustubh Nair from the previous GSoC.
In these past few months, I have learned a lot; from writing maintainable code and proper unit-tests to the need of extensive code-reviews and putting up comprehensible pull requests - all thanks to my mentors, Neil and Preet. :)
- Zeeshan Equbal's Pull Request under zulip/zulip-terminal
- Zeeshan Equbal's Issues under zulip/zulip-terminal
- Zeeshan Equbal's Commit History under zulip/zulip-terminal
- Zeeshan Equbal's Reviewed PRs under zulip/zulip-terminal
Merged Pull Requests
This was a bugfix PR which fixed two bugs related to displaying selection hints in the footer, by migrating related mouse_event from
View so that the hint is displayed when the user performs mouse_drag event anywhere inside the terminal window. It also fixed the case when the hint got stuck in the footer if the mouse was dragged from the
MessageView and released outside of it.
This PR improved our platform handling by defining an isolated module
config/platform_detection.py that holds the platform detection logic and uses a single variable
PLATFORM to specify the name of the platform that the current ZT instance is loaded on. This also fixed a bug in WSL (Windows) where the platform was incorrectly detected as Linux.
This PR defined two global variables to hold the mouse scroll-speed in MiddleColumn and SidePanels of 1 and 5 respectively. Then, refactored the logic for scrolling the side-panels to consistently follow this defined value.
This PR fixed a bug that made incoming new topics render badly in the
TopicView due to incorrect parameters being passed to
TopicButton. This PR also migrated
TopicButton to accept only named parameters so that there's no scope of future bug and connascence between parts of the program is reduced.
This PR removed the deprecated
recipient_id field from the entire codebase and added a comment in
api_types that the server recommends clients to use the
display_recipients field instead. The
sender_short_name fields were also completely removed from the codebase as a result of its removal in server version 3.1; ZFL 26+.
The server defines several
wildcard_mentions like @all/@everyone/@stream, which are not marked with 'mentions' in the message flags, rather 'wildcard_mentions'. This bugfix adds checks for this flag in the message response from the server and appropriately categorizes these messages as mentioned and also updates the count in the respective narrows.
This PR restricted input beyond certain max-limit for compose box, as specified in initial_data's realm object. ZT didn't had this restriction which resulted in certain long topic/messages getting cropped without the user noticing, until the message was sent. Restrciting content length of
ReadlineEdit widget was also added via readline/#18.
This PR extracted some initial commits from #397 and #698 and cleaned and refactored them. Also added support for opening external links in the browser from the
MessageLinkButton via the
This PR added support for renaming messages that had no topic, by anyone as long as the
True for the organization. This is the behavior that is followed by web app for message editing events, and brought ZT's message-editing capabilities one more step closer to it.
This critical feature enhancement PR added support for reacting to messages with emojis. This PR implemented an
EmojiPicker popup which lists all the supported emojis, sorts it by count and allows searching for any emoji via
p hotkey inside the popup. This was partially based on the work of Kaustubh Nair's #707. Before working on the UI related aspects of this feature, a preparatory PR was needed to:
This feature had a set of PRs that collectively addressed improvements to the
StreamInfo popup. The PRs were responsible for adding Stream members section inside the popup, along with a lot of new fields and setting added after discussing server support and backporting for older versions. The set of PRs included:
- Adding Stream members view within the StreamInfo popup #856
- Support for configuring Visual desktop notifications #900
This PR changed the message quoting format in ZT to include the name of the user whose message was quoted (and his user_id) along with a link that would narrow to the quoted message. For interoperability, the link to the quoted message is the same as that of the web app, so narrowing to the quote is also possible via #708.
This PR sets a footer text notifying the user everytime he sends or edits a message that is outside the current narrow. This will give the user a pointer as to why the message disappeared from the screen.
Minor bugfixes and UI/test improvements
- Fixed buggy quote rendering logic #942
- Fixed ZT crashing due to
- Emphasize column titles to differentiate it from regular texts #952
- Add Application configuration section in About menu #821
- Simplify message template generation in conftest using factory fixture #1022
- Migrate keypress functions to use commands instead of hard-coded keys #953
Open Pull Requests
This PR handles change in
wildcard_mentioned flags and its related consequence (i.e. unread count) on message-edit events. This is also the first step in implementing events related to
This PR adds a new event action in model that looks for
delete_message events, potentially handling it by removing the message completely from the index, and then updating the
rendered_view to handle the event dynamically without needing to switch narrows.
The current approach registers a callback when the
StreamInfo view is open and looks for subscription events to trigger a callback, which in turn updates the checkbox UI.
This PR disables cycling from the recipient box to any other box inside the
WriteBox view using arrow keys, if the recipient name is invalid. This is very similar to
CYCLE_COMPOSE_FOCUS using Tab key.
My primary future goal would be get my outstanding PRs reviewed and merged as soon as possible. The next step would be adding support for
alert_words, or atleast the related events and the UI feature could be dealt later on. I will also try my best to keep in touch with the community as much as possible and help any new contributors get started with the project. :)