steils / deltachat-desktop

Desktop Application for https://delta.chat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

deltachat-desktop

Desktop Application for delta.chat

Build Status JavaScript Style Guide

Run the app

$ npm start

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

If you get errors running npm install, you might need to install meson, ninja and libssl1.0-dev. Also, libetpan-dev can't be installed globally.

On Linux (e.g. Debian Stretch):

$ sudo apt-get install python3-pip ninja-build libssl1.0-dev
$ sudo pip3 install meson
$ sudo apt-get remove libetpan-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.

About

Desktop Application for https://delta.chat

License:GNU General Public License v3.0


Languages

Language:TypeScript 43.4%Language:JavaScript 29.7%Language:CSS 26.4%Language:Shell 0.4%Language:HTML 0.2%