Desktop Application for https://delta.chat
Clone or download
Jikstra and ralphtheninja Fix accidentially skipped message (for loops from last to first index (
…#398)

are hard) and fix unnecessary rerenders if ChatView is scrolled to top.
Fixes #378
Latest commit 8f3dfc9 Dec 8, 2018

README.md

deltachat-desktop

Desktop Application for delta.chat

Build Status JavaScript Style Guide

If you are upgrading: please see UPGRADING.md.

Run the app

$ npm run build
$ npm start

The first npm run build step is optional and only needed if code has changed or if the app has never been built before.

Watch the code

It is recommended to run this watch command in a separate terminal

$ npm run watch

Configuration and databases

The configuration files and database are stored at application-config's default filepaths.

Each database is a sqlite file that represents the account for a given email address.

Code structure

  • static: static files used directly in the app
  • images: image files used for the 'conversations' module. This should probably be moved to the module at some point..
  • src: the original javascript source files, both for main and renderer
  • es5: the compiled es5 source files for front-end
  • dist: the final distributions and executables for all supported platforms
  • .tx: configuration files for transifex
  • _locales: source files for translations
  • bin: misc. scripts
  • build: files needed only at build time (for electron-builder)
  • conversations: react components pulled out of signal

How to Contribute

Get the code

$ git clone https://github.com/deltachat/deltachat-desktop.git
$ cd deltachat-desktop
$ npm install

Troubleshooting

This module builds on top of deltachat-core, which in turn has external dependencies. Instructions below assumes a Linux system (e.g. Ubuntu 18.10).

If you get errors when running npm install, they might be related to the build dependencies meson and ninja.

If meson is missing:

sudo apt-get install python3-pip
sudo pip3 install meson

If ninja is missing:

sudo apt-get install ninja-build

You might also need the following system dependencies:

  • libssl-dev
  • libsasl2-dev
  • libsqlite3-dev
  • zlib1g-dev

To fix these issues do:

sudo apt-get install libssl-dev libsasl2-dev libsqlite3-dev zlib1g-dev

Then try running npm install again.

Please see build instructions for additional information.

Run linters

$ npm test

Run integration tests

$ npm run test-integration

The integration tests use Spectron and Tape. They click through the app, taking screenshots and comparing each one to a reference. Why screenshots?

  • Ad-hoc checking makes the tests a lot more work to write
  • Even diffing the whole HTML is not as thorough as screenshot diffing. For example, it wouldn't catch an bug where hitting ESC from a video doesn't correctly restore window size.
  • Chrome's own integration tests use screenshot diffing iirc
  • Small UI changes will break a few tests, but the fix is as easy as deleting the offending screenshots and running the tests, which will recreate them with the new look.
  • The resulting Github PR will then show, pixel by pixel, the exact UI changes that were made! See https://github.com/blog/817-behold-image-view-modes

For MacOS, you'll need a Retina screen for the integration tests to pass. Your screen should have the same resolution as a 2016 12" Macbook.

For Windows, you'll need Windows 10 with a 1366x768 screen.

When running integration tests, keep the mouse on the edge of the screen and don't touch the mouse or keyboard while the tests are running.

Update translations

Install the transifex-client and get added to the Delta Chat Desktop project.

When you add new strings that need to be translated, run:

tx push --source

And periodically we can run the following command to get the new translation strings from translators:

tx pull --all

Deploy workflow

  1. Create a draft release on github, e.g. vX.Y.Z
  2. Change version field in package.json to X.Y.Z
  3. Commit and push modified package.json (repeat until release is ready)
  4. Once done, publish the release on github, which will create the tag

Also see https://www.electron.build/configuration/publish

License

Licensed under the GPLv3, see LICENSE file for details.

Copyright © 2018 DeltaChat contributors.