Skip to content

Instantly share code, notes, and snippets.

@jai2201
Last active September 12, 2022 14:58
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 jai2201/9532297793a71fe96c3af31d6be0e3ff to your computer and use it in GitHub Desktop.
Save jai2201/9532297793a71fe96c3af31d6be0e3ff to your computer and use it in GitHub Desktop.
Google Summer of Code'22 work report

Google Summer of Code work report

This document is a summary of the work that I did as a student developer in the Zulip open source project, as part of Google Summer of Code 2022. Most of my work during GSoC is around left sidebar, compose box, stream settings, message view and edit areas along with some minor bug fixes and code refactoring

Quick links

GitHub profile: jai2201
Repository contributed to: zulip/zulip
Merged Commits: https://github.com/zulip/zulip/commits/main?author=jai2201
Merged pull requests: https://github.com/zulip/zulip/pulls?page=1&q=is%3Apr+author%3Ajai2201

Project

During the coding period, my work was mainly focused on doing Zulip's redesign work for the webApp and fix high-priority issues reported. The projects I worked on are listed below, along with the relevant pull requests.

  1. Create collapsible "Private messages" section in left sidebar -
    Uptil now private messages were collapsed in the left sidebar, unless the user is in a private message narrow, which had several down sides for easy access of PMs for users. So now we have separated out Private messages from top_left_corner section and shifted it below the global_filters in a different separate section along with stream list with common scroll bar in left-sidebar. The new PM section will be opened by-default on loading the page and will have a toggle-icon in its header, clicking on which makes the section collapse/expand accordingly. In default view, only recent 5 PM threads would be shown and would append the active conversation as the 6th one at last if not present in those 5, similar to how topics list work. In PM section with unreads, a maximum of 8 conversations would be shown and rest of them would be hidden behind the 'more conversations' li-item, clicking on which take to the zoomedIn view of PM section where all the present PM threads would be visible and rest of the sections of left-sidebar will get collapsed.

    • #21726 left-sidebar: Collapsible PM section.
    • #22709 pm_list: Handle narrow functions separately for pm_section.
    • #21357 left-sidebar: Add logic for pm_list_data parallel to topic_list_data.
    • #21425 pm_list : Clean up in node tests.
    • #21424 pm_list : Refactor code and tests.
  2. Indicate which streams and topics have unread @-mentions -
    When looking at streams and topics in the left sidebar, it would be helpful to know which ones have unread messages where the user has been @-mentioned. To address this, we now display an @ to the left of the unread message count when there is at least one unread message with an @-mention in the stream or topic.

    • #22583 unread: Indicate which streams and topics have unread @-mentions.
  3. Make n hotkey respect left-sidebar filter -
    When going to the next unread message we should restrict the streams according to the stream filter, if it is filled in. And similarly for the topic filter, if you're currently viewing "more topics". So, modified the algorithm to iterate through the unread actively-filtered topics first, then the other unread topics in the stream, and then all the unfiltered topics of other streams (no filters applied for any of those).

    • #22798 unread: Make the n key respect the left sidebar filter.
  4. Add Stream Count Information to Left sidebar -
    Uptil now, we only had a link "Subscribe to more streams" for allowing user to browse more streams in left-sidebar, So to make the "Subscribe to more streams" link more informative and appropriate to the user's situation, we added the
    following changes -

    • When the user has N>0 streams they can subscribe to: Replaced the link with: "Browse N more streams"

    • When the user has no streams they can subscribe to: If the user has permission to create streams, we show a "Create a stream" link, which goes to the same place as the
      "Create a stream" link from the "+" menu next to the STREAMS header. If the user doesn't have permission to create streams, don't show a link at all.

    • #22421 left-sidebar: Add Stream Count Information to Left sidebar.

  5. Fix UI elements which change hash but don't have hrefs -
    We have some UI elements, buttons etc in the webapp, clicking on which takes the user to another URL, but don't have a href tags on them. These work because we use click-handlers to call the relevant functions to change the hash, do browser history work etc. However, these aren't detected as "links" by browsers, and hence do not show some behaviors expected of links -- for example, Ctrl+left-clicking on these would not open the URL in a new browser tab, but rather, in the same tab., So we want to add a proper href link to all these tags so that they work as expected from a link.

    • #22411 Fix UI elements which change hash but don't have hrefs.
  6. Minor bug fixes and commits -

    • #22765 message_edit: Use disabled instead of readonly to disable controls.
    • #21143 stream_settings: Use ListWidget instead of using list to render Alert Words table.
    • #22713 dispatch: Remove a stale comment.
    • #22681 message_edit: Close message edit UI after message is moved.
    • #22580 message-edit: Make uneditable topic field unclickable.
    • #22579 message-edit: Do not show topic when stream and topic are not editable.
    • #21589 stream_notifications: Send 'No description' in case of empty description.
    • #21330 tippy: Make tooltip visible for elements with '.selected'.
    • #21293 tippy: Fix compose box cancel button tooltip.
    • #21257 documentation: Fix a typo in gSoc.md.
    • #21240 Add width CSS property in filter check icon for recent-topics table.
    • #21126 message-menu: Add tabindex attribute for anchor tag to allow focus.
    • #21118 UI-Improvement: Wrap longer tooltips.
    • #21044 UI-Improvement: Remove the parentheses around notice markers.
    • #21021 left-sidebar: Allow upto 2 lines for PMs.
    • #21002 settingsUI: Fix the UI of Authentication settings.
    • #20937 fix: throw proper error message through backend in generate_api_key.

Acknowledgements

The last couple of months have been great! I learnt a lot of new things, and spent a really productive summer working on Zulip. I would like to thank my mentor, Puneeth Chaganti, for guiding me and helping me out when I was blocked on something. I would also like to thank Tim Abbott and Alya Abbott for reviewing my work and providing valuable feedback for following better code practices as well as understanding a better user perspective towards UI.

Overall, the whole journey of Google Summer of Code with Zulip has been an enriching experience for me, massively helped me improve as a developer. I also learned the art of breaking huge changes into commits that are easy updates based on reviews, and also about tackling big issues. I look forward to continue contributing in Zulip and keep improving myself as a developer.

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