Skip to content

Instantly share code, notes, and snippets.

@abhigyank
Last active January 20, 2019 14:32
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 abhigyank/decf6160ab574631375a9b00e6f4b6a8 to your computer and use it in GitHub Desktop.
Save abhigyank/decf6160ab574631375a9b00e6f4b6a8 to your computer and use it in GitHub Desktop.
Google Summer of Code 2018 Work Summary

GSoC 2018 Summary: Zulip Electron

Abhigyan Khaund | GitHub | Email | Twitter | View Project

I. Introduction

I'd like to thank the Zulip's awesome community for making my summer really so interesting, fun and knowledgeable. I would also like to thank my mentor @akashnimare for his continuous guidance before and throughout the summer. Over the GSoC period, I worked on the development of Zulip's desktop app (contribution graph). I worked on several high priority features and issues of the desktop app ranging from proxy settings and custom certificates to unit tests. Below is a description of some of my works.

II. Brief Highlights

1. System Proxy Settings

Implemented support for using System Proxy Settings by reading and parsing them from the system directly and putting them to use in both browser window and webview. In the past there was support for only manual proxy settings which generally confused a lot of users, but now it is just at a click of a button. Addition of this feature also resulted in addition of proxy rules to the main zulip tools documentation.

2. Auto Updates

The app used a very basic implementation of auto-updater module. Now it has extended support for separate Linux notifications, manual checking of updates and registering of error when update fails making it much easier to debug.

3. File Attachment Downloads

This was a two-level implementation. Initial implementation included opening a dialog to save the file in user-chosen folder and then download the file, doing a big improvement over the original behavior of opening attachments in browsers. After many user requests, implemented automatic file capture and download to a default download folder and opening the file/download folder from the download complete notification directly.

4. Self-signed/Custom Server Certificates

Provide a system for storing self-signed/custom certificates that can be used to verify the domains while adding. This improves the security state of the app enabling users to add servers only with trusted certificates.

5. Error Reporting and Logging

This involved addition of several features to improve the overall error logging and debugging process. Refactoring the entire codebase to use our logger-util to log errors in separate files. These now can be taken from the user with a single click that zips all the logs into a folder and opens. This has proved to be very helpful in debugging a lot of user issues. This was followed by implementation of sentry. Sentry is now part of most of the codebase and has been implemented in such a way that it is now very easy to include it in any new part of the codebase in the future to report both expected and unexpected exceptions. We have been receiving several error logs helping us fix and analyse known and unknown bugs.

6. Electron-Bridge

Completed parts of a pending PR of electron bridge that sets up a link between the webapp and desktop app to communicate with each other. We are now leveraging this to update the user presence status from the desktop app interaction of the desktop app in the webapp.

7. Tests

Have an open PR, that sets-up karma unit tests in the desktop app. Initialising the setup and also adding an initial spell checker unit test using karma to set up a template for adding tests in future. Also fixed the failing e2e tests using Spectron and Gulp.

III. Contributions

The following PRs include the work for the above-mentioned highlights and also several other miscellaneous refinements and bug fixes during the GSoC period.

Merged PRs

#468 - shortcuts-menu: Add a tip-section to link to webapp's built-in hotkeys.

#472 - internal-links: open image link in webapp lightbox.

#473 - sidebar: Add scrollbar for list of organizations on overflow.

#478 - feature: Add DND button in left sidebar.

#480 - proxy-setting: Feature to use system proxy settings.

#483 - internal-links: Download file attachment links using downloadURL.

#486 - loading-indicator: Fix to hide loading indicator when server is loaded

#487 - menu: Add option to check for updates.

#494 - settings: Add option to add custom certificates

#9535 - documentation: Change #electron stream links to #desktop stream link.

#499 - documentation: Change #electron stream links to #desktop stream link.

#501 - config-util: Add isConfigItemExists to check if a key exists.

#502 - config-util: Change return to a single return statement in isConfigItemExists.

#505 - logger: Replace all instances of console.log with our logger-util.

#9841 - user docs: Document custom certificate and proxy feature in desktop usage guide.

#508 - config-files: Move all the configuration files into config folder.

#509 - error-logs: Zip files into Downloads folder when user clicks on Show App Logs

#511 - package.json: Move adm dependecy to app/package.json

#512 - Setup sentry for the repository

#514 - Download file attachments to a default location.

#515 - certificates: Make default option "No" on enter key press to reject certificate.

#516 - electron-bridge: Implement electron bridge

#519 - gulpfile: Update syntax and methods for gulp v4.x.

#9979 - desktop: Update app version to v2.3.3.

#521 - files: Handle downloading files failure.

#525 - fixes: Fix null of downloadPath when settings.json fails.

#530 - attachments: Fix failing attached file downloads.

Open PRs

#507 - [WIP] config-util: Use package reload instead of custom reload.

#526 - [WIP] Setup karma unit tests

#535 - proxy: Set environment proxy variables as per proxyRules.

#10254 - electron_bridge: Request dekstop app focus status on updating presence.

All PRs - zulip-electron, zulip

All opened issues - zulip-electron, zulip

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