Commit Graph

557 Commits

Author SHA1 Message Date
Josh Perez afddc852cc
Add interpolation for fallback dialog messages 2020-02-13 10:14:08 -08:00
Josh Perez 18fd44f504
Move all status/alert dialogs into the Left Pane 2020-02-12 13:30:58 -08:00
Scott Nonnenberg f5be32ba14 Simplify linkification filter - check for ASCII/non-ASCII only 2019-12-18 14:45:11 -05:00
Ken Powers 11d47a8eb9 Sticker Creator 2019-12-17 12:28:46 -08:00
Scott Nonnenberg 0876bf7ae7 Visual bug fixes for v1.29 2019-11-21 10:17:55 -08:00
Scott Nonnenberg 8194b2446b Move to CTRL+= for windows, remove the need for the shift 2019-11-15 14:34:24 -08:00
Scott Nonnenberg 927a0677f1 Zoom In: Remove custom accelerator for windows/linux 2019-11-15 14:34:24 -08:00
Scott Nonnenberg 20a892247f Keyboard shortcuts and accessibility 2019-11-13 16:53:42 -08:00
Scott Nonnenberg 0c09f9620f Improve message download performance 2019-10-10 14:56:14 -07:00
Scott Nonnenberg 8ccb89310b New Idle timer; messages not marked read if user is idle 2019-09-24 13:43:08 -07:00
Scott Nonnenberg b19659f5ac Address beta feedback
* Use signal blue for search box focus outline
* Reduce debounce for draft saves
* Be less aggressive in our scrolling corrections
* Lightbox: Ensure that a tall image is still fully visible
* Fix spell checking after Electron API breaking changes
* Fix link preview image generation
* Message highlight: Move to border in signal blue
2019-08-22 17:11:36 -04:00
Scott Nonnenberg d3d2b0ec52 Use curve functions from native module 2019-08-21 14:55:12 -07:00
Scott Nonnenberg 9d4f2afa5a Persist drafts 2019-08-21 14:52:30 -07:00
Scott Nonnenberg 5ebd8bc690 Virtualize Messages List - only render what's visible 2019-08-21 14:52:30 -07:00
Scott Nonnenberg e62a1a7812 Receive support for View Once photos 2019-07-17 11:29:51 -07:00
Michael Walker 4a8e0bd466 Add pinterest domain and asset domains for link preview support
Co-authored-by: ken@signal.org
Co-authored-by: @cmswalker
2019-05-16 15:43:29 -07:00
Scott Nonnenberg c41bc53614 Refactor messages model; New timeline react components 2019-05-16 15:23:21 -07:00
Jonathan Canfield 97b26778b3 Remap zoom to Command+= on macOS (#3296) 2019-04-08 10:17:35 -07:00
Scott Nonnenberg 74cb808763 New MessageController as the single place for in-memory messages 2019-04-04 17:17:19 -07:00
Scott Nonnenberg 8c4d90df07 Send long text as an attachment instead of inline
Remove Android length warning

Handle incoming long message attachments

Show long download pending status in message bubble

Fix the width of the smallest spinner

Remove Android length warning from HTML templates
2019-03-14 17:30:46 -07:00
Scott Nonnenberg b3ac1373fa Move left pane entirely to React 2019-03-12 17:44:14 -07:00
Scott Nonnenberg ae161c6cf6 Update to Electron 4.x 2019-03-12 17:44:14 -07:00
Scott Nonnenberg ae2db9f09a Improve handling for URLs composed of mixed character sets 2019-03-12 17:44:14 -07:00
Scott Nonnenberg 5b54c9554e Remove groups table, conversation is single source of truth 2019-02-13 16:04:58 -08:00
Scott Nonnenberg 041fe4be05 Remove JSON column and Backbone Model for unprocessed 2019-02-13 16:04:58 -08:00
Scott Nonnenberg 9c540ab977 Add cache support to Signal Protocol Store 2019-02-13 16:04:58 -08:00
Scott Nonnenberg 1d2c3ae23c Download attachments in separate queue from message processing 2019-02-12 16:34:21 -08:00
Scott Nonnenberg 858c7e629f Fine-tune linkification technique for link previews 2019-02-11 18:32:05 -08:00
Scott Nonnenberg 813924685e Link Previews 2019-01-29 13:53:14 -08:00
Scott Nonnenberg e4babdaef0 Updates to backup infrastructure 2019-01-04 12:21:26 -08:00
Scott Nonnenberg 47f834cf5c Encrypt device name on account create, on first launch if needed 2019-01-04 12:21:26 -08:00
Scott Nonnenberg 313d08344a Request configuration sync on startup of new version 2018-11-28 12:35:26 -08:00
Scott Nonnenberg 70eed938d9 Store arrayBuffers in database for remote identity keys 2018-11-26 16:22:49 -08:00
Scott Nonnenberg 11fdf22881 Change sessions.id to a TEXT field to prevent type coercion 2018-11-26 15:22:55 -08:00
Scott Nonnenberg e828253ef0 Restor full function syntax to custom Mocha reporter 2018-11-07 16:53:41 -08:00
Scott Nonnenberg dbf0be2db5 eslintify all test files 2018-11-07 16:34:38 -08:00
Scott Nonnenberg 884bc9333d Make timestamp test a bit more forgiving 2018-11-07 16:34:20 -08:00
Scott Nonnenberg 0297279084 Eliminate some conversation fields which are no longer used 2018-11-01 17:00:24 -07:00
Scott Nonnenberg 1755e0adfd Move all remaining stores to SQLCipher 2018-10-31 17:36:51 -07:00
Scott Nonnenberg a7d78c0e9b Sealed Sender support
https://signal.org/blog/sealed-sender/
2018-10-29 14:49:18 -07:00
Scott Nonnenberg ca61c9cb85 Warnings for dangerous files 2018-10-09 13:48:32 -07:00
Scott Nonnenberg cd60bdd08a Move conversations to SQLCipher 2018-10-01 18:18:37 -07:00
Scott Nonnenberg 7983300f4a Use base64 strings for incoming message cache instead of binary 2018-08-10 13:13:25 -07:00
Scott Nonnenberg 3105b77475 Migrate to SQLCipher for messages/cache
Quite a few other fixes, including:
  - Sending to contact with no avatar yet (not synced from mobile)
  - Left pane doesn't update quickly or at all on new message
  - Left pane doesn't show sent or error status

Also:
 - Contributing.md: Ensure set of linux dev dependencies is complete
2018-07-31 17:08:45 -07:00
Scott Nonnenberg 61f7b8360b Conversation: store lastMessage/lastMessageStatus in memory only 2018-07-27 10:55:10 -07:00
Scott Nonnenberg f39a96bc76 Move to centralized message/cache data layer
Also, ensure that conversation.messageCollection has nothing in it
unless it has an associated ConversationView.
2018-07-27 10:55:10 -07:00
Scott Nonnenberg 34231168a7 On message delete, ensure that all external files are deleted 2018-07-27 09:15:57 -07:00
Scott Nonnenberg 5933a34a18 Use window.log in browser context, turn on console eslint rule 2018-07-21 14:52:43 -07:00
Scott Nonnenberg b159a8d7c7 Update the user agent for debug log requests 2018-07-18 20:00:10 -07:00
Scott Nonnenberg 3c69886320 Finish new Message component, integrate into application
Also:
- New schema version 8 with video/image thumbnails, screenshots, sizes
- Upgrade messages not at current schema version when loading messages
  to show in conversation
- New MessageDetail react component
- New ConversationHeader react component
2018-07-17 15:58:07 -07:00
Scott Nonnenberg 43a44793c5 Remove jshint - move everything over to eslint
Also removed all hints of previous linters
2018-07-17 15:54:32 -07:00
Scott Nonnenberg fc5c52fbdf Remove iOS theme in favor of plain light/dark themes 2018-07-17 15:45:40 -07:00
Scott Nonnenberg ad4387803b New media permission, show dialog when not enabled for voice msg
UI now in separate renderer:
  - the permissions popup
  - settings dialog
  - debug log dialog
  - about window

Couple bug fixes:
  - About Window: Fix 'escape' to close window
  - Remove outdated dist/copy tasks from Gruntfile

Eslintified settings_view.js
2018-07-03 16:04:21 -07:00
Scott Nonnenberg 4415293100 Make all OS menus localizable
Turns out that Electron is not localizing the 'role' elements like we
expected would happen.
2018-07-03 16:04:21 -07:00
Scott Nonnenberg 8eeaad8e18 Remove unused export/import functionality 2018-06-21 11:54:01 -07:00
Scott Nonnenberg 068cce61e6 Fix path-oriented unit test on Windows 2018-05-31 14:09:41 -07:00
Scott Nonnenberg f3bd0cf903 Refactor api.js into web_api, which encapsulates all web access 2018-05-31 13:25:45 -07:00
Scott Nonnenberg eec61f5289 Fine-tune file protocol filter 2018-05-31 13:25:45 -07:00
Scott Nonnenberg 06b0544bbe Hardening: normalize on-disk attachment paths before save/load 2018-05-31 13:25:45 -07:00
Scott Nonnenberg cfe0bd0e79 Move to npm for several dependencies
mustache
jQuery
underscore
backbone
mocha
chai
intl-tel-input
2018-05-23 16:26:48 -07:00
Scott Nonnenberg 01be58acc2 Remove formatting in importError localization string 2018-05-23 16:26:48 -07:00
Scott Nonnenberg 548c8e69cf Emojification now all done with react via a few new components
Three locations were changed:
  1. a group update, which lists a set of contacts
  2. the contact name in the left pane
  3. the conversation title

Three new components were added to window.Signal.Components to support
these scenarios, respectively:
  1. Emojify
  2. ContactName
  3. ConversationTitle

Note that there are a number of other places in the app that should be
emojified, but never have been before. Essentially any place that a
contact name might be shown. A non-exhaustive list:
  - Show group members
  - Show safety number
  - Verified change notification
  - Disappearing timer change notification
  - Contact verification notification
  - Quote contact name
2018-05-23 16:26:47 -07:00
Scott Nonnenberg a5416e42c4 Refactor all emoji utility methods into window.Signal.Emoji 2018-05-23 16:26:47 -07:00
Scott Nonnenberg e2d044e02b Filter file scheme; disable http, https and ftp entirely 2018-05-23 16:26:40 -07:00
Scott Nonnenberg 4e5c8965ff Move to react for newlines, emoji, and links in message body 2018-05-14 16:09:37 -07:00
Scott Nonnenberg aa13a2c6f7 Parse phone numbers into e164 as part of schema upgrade 2018-05-10 11:54:58 -07:00
Daniel Gasienica 16bc1d34c6 Message schema 6: Change classification of media and documents
For an easier implementation, we change our original definition of
`initializeAttachmentMetadata`. This means we have to re-run it marked as
version 6 and mark schema version 5 as deprecated as its definition has changed.
2018-05-08 16:41:07 -04:00
Scott Nonnenberg 26be658892 Remove 'Contact' from 'Contact.*' properties, clean->parse 2018-05-08 13:12:11 -07:00
Scott Nonnenberg adbe989949 validateContact: Return error instead of logging 2018-05-08 10:31:16 -07:00
Scott Nonnenberg 420f81ebcd Move contact migrate code from message.js to contact.js 2018-05-08 09:48:47 -07:00
Scott Nonnenberg 41be7f126b Visuals for embedded contacts as well as contact detail screen 2018-05-07 19:09:55 -07:00
Scott Nonnenberg 3ea3e4e256 Contact sharing: protos and data pipeline
As of this commit: 82b76ccf37
2018-05-07 19:09:55 -07:00
Daniel Gasienica 5c8f734e67 Remove newlines from group IDs 2018-05-03 13:24:39 -04:00
Daniel Gasienica a102016ed8 Port `Settings` and `OS` to TypeScript 2018-05-02 20:01:57 -04:00
Daniel Gasienica 95321e5d3e Remove Vim mode lines 2018-04-30 16:53:34 -04:00
Daniel Gasienica 1dd87ad197 Format all source code using Prettier 2018-04-30 16:53:34 -04:00
Daniel Gasienica 41fe50553f Replace Backbone `saveFile` with `Attachment.save` 2018-04-27 16:31:42 -04:00
Daniel Gasienica 9a76d4bcf8 Whitelist `assert` global for tests 2018-04-27 16:31:42 -04:00
Daniel Gasienica 19411a78c8 Remove dead code 2018-04-25 15:25:12 -04:00
Daniel Gasienica 52e4e5aece Omit undefined keys when comparing IndexedDB data 2018-04-25 15:25:12 -04:00
Daniel Gasienica f36f206a01 Use `IndexablePresence` for `hasFileAttachments` and `hasVisualMediaAttachments`
Reduces index size, makes it easier to debug using IndexedDB inspector, and
hopefully improves lookup performance.
2018-04-25 15:25:12 -04:00
Daniel Gasienica 3a33d862c0 Update backup test fixture 2018-04-25 15:25:12 -04:00
Daniel Gasienica 8b9516de72 Update test for attachment metadata 2018-04-25 15:24:52 -04:00
Daniel Gasienica b0e1cc49a5 Remove legacy Backbone lightbox 2018-04-25 15:24:51 -04:00
Daniel Gasienica 9d84b2f420 Index messages with attachments using a boolean
When indexing message attachment metadata using numeric indexes such as:

```javascript
{
  conversationId: '+12223334455',
  received_at: 123,
  attachments: […],
  numAttachments: 2,
},
{
  conversationId: '+12223334455',
  received_at: 456,
  attachments: [],
  numAttachments: 0,
}
{
  conversationId: '+12223334455',
  received_at: 789,
  attachments: [],
  numAttachments: 1,
}
```

It creates an index as follows:

```
[conversationId, received_at, numAttachments]
['+12223334455', 123, 2]
['+12223334455', 456, 0]
['+12223334455', 789, 1]
```

This means a query such as…

```
lowerBound: ['+12223334455', 0,                1               ]
upperBound: ['+12223334455', Number.MAX_VALUE, Number.MAX_VALUE]
```

…will return all three original entries because they span the `received_at`
from `0` through `Number.MAX_VALUE`. One workaround is to index booleans using
`1 | undefined` where `1` is included in the index and `undefined` is not, but
that way we lose the ability to query for the `false` value. Instead, we flip
adjust the index to `[conversationId, hasAttachments, received_at]` and can
then query messages with attachments using

```
[conversationId, 1 /* hasAttachments */, 0                /* received_at */]
[conversationId, 1 /* hasAttachments */, Number.MAX_VALUE /* received_at */]
```
2018-04-25 15:24:51 -04:00
Daniel Gasienica f9e4613395 Move TS test for message migration 2018-04-25 15:24:50 -04:00
Daniel Gasienica 867bece952 Add `Message.initializeAttachmentMetadata` 2018-04-25 15:24:50 -04:00
Daniel Gasienica df2e6e7864 Port `MIME` module to TypeScript 2018-04-25 15:24:50 -04:00
Scott Nonnenberg bf81c3db63
Document Message v4, remove data-free thumbnails 2018-04-23 16:43:25 -07:00
Scott Nonnenberg c02860af5c
Responding to pull request review feedback
- messages.getQuoteObjectUrl: early return
- backup.js: explaining variables for long if statement
- types/messages.js: Log if thumbnail has neither data nor path
- sendmessage.js:
  - remove extraneous logging
  - fix indentation
  - upload attachments and thumbnails in parallel
- preload: don't load fs for tests, just fse
- _conversation.scss: split two selectors into two lines, 0px -> 0
- backup_test.js: use fse.existsSync and comment twoSlashes regex
- network_tests_view_test.js: Comment duplicate assignment to window.getSocketStatus
2018-04-23 15:36:47 -07:00
Scott Nonnenberg 6ec6bf08c8
Backup E2E test: Normalize paths because glob returns / on WIN 2018-04-20 17:29:55 -07:00
Scott Nonnenberg 1bfc1ed63e
Backup E2E test: Fix path analysis on windows 2018-04-20 16:56:39 -07:00
Scott Nonnenberg a7d44d3344
Backup and end-to-end test! 2018-04-20 15:24:04 -07:00
Scott Nonnenberg c3acf43c47
Eslintify test/backup_test.js 2018-04-20 15:24:04 -07:00
Scott Nonnenberg 3abaeb807d
Prevent infinite repeated errors on leaving electron tests open 2018-04-20 15:24:03 -07:00
Scott Nonnenberg 334fe32210
Fix electron test race condition with protobuf loading 2018-04-20 15:24:02 -07:00
Scott Nonnenberg 12257e1560
MessageView: Show menu w/ 'reply to message' on triple-dot click 2018-04-20 15:23:55 -07:00
Scott Nonnenberg 26e4e97592
Tighten up CSS
- Remove extra padding at top of Android bubbles, via sibling selector
- Don't include .attachments, .quote-wrapper, .content in bubble unless
  we actually need them. This allows for sibling selectors.
- This is a different technique for adding the ReactWrapperView for
  quotes - it is now appended to the DOM instead of attaching to
  something already in the DOM. This allows us to use .remove(), so it's
  a bit cleaner.
- Users of ReactWrapperView can now specify tagName and className
2018-04-20 15:23:47 -07:00
Scott Nonnenberg 30957341e4
Show three dot icon next to message on hover
But only if it doesn't have an error.

Also: reformatted message template in legacy_templates.js to match what
is in background.html for easier diffing.
2018-04-20 15:23:47 -07:00
Scott Nonnenberg a563dc8b37
Style Guide: Additional message examples, a few fixes to enable 2018-04-20 15:23:47 -07:00
Scott Nonnenberg 3bbbf65a6b
Fix iOS: tail, blue partial border, extra attachment space
Turns out that display: inline on the img tag resulted in a mysterious
3px of space added below it.
2018-04-13 18:10:52 -07:00
Scott Nonnenberg 9ad55c803f
Fix handling attachment thumbnails using thumbnail key 2018-04-13 18:10:51 -07:00
Scott Nonnenberg fce9bb7342
Move to central MIME functions, remove some console.log
And generally address PR feedback.
2018-04-13 18:10:51 -07:00
Scott Nonnenberg 92a89a8e41
Fix MessageView test: p -> div 2018-04-13 18:10:48 -07:00
Scott Nonnenberg 2243e348f1
Wire up fake window.Signal.HTML because it's captured on load 2018-04-13 18:10:48 -07:00
Scott Nonnenberg 054d3887a1
Quotes: The full pipeline into the database
1. MessageReceiver always pulls down thumbnails included in quotes
2. Message.upgradeSchema has a new schema that puts all thumbnails on
   disk just like happens with full attachments.
3. handleDataMessage pipes quote from dataMessage into the final message
   destined for the database
2018-04-13 18:05:45 -07:00
Scott Nonnenberg e69586200a
Unleash eslint on message_receiver.js - lots of change 2018-04-13 18:05:45 -07:00
Scott Nonnenberg 21bf02c94d
Fixed examples in Quote.md, rough Android visuals 2018-04-13 18:05:44 -07:00
Scott Nonnenberg ae043bf239
In iOS theme, join attachment bubble with caption bubble 2018-04-13 18:05:42 -07:00
Scott Nonnenberg 3a76c3c86e
Styleguide: Incoming/outgoing attachments of all types 2018-04-13 18:05:42 -07:00
Daniel Gasienica ad05efb7a0 Expose `Signal.Types.Conversation` 2018-04-11 19:34:21 -04:00
Daniel Gasienica 96c07c6373 Bump timeout of `debuglogs` test 2018-04-11 16:36:42 -04:00
Daniel Gasienica 15d221ae0e Simplify testing and linting
Separate linting from testing as follows:

- `yarn jscs`: Run JSCS.
- `yarn jshint`: Run JSHint.
- `yarn lint`: Run all linters, i.e. ESLint, TSLint, JSHint, and JSHint.

- `yarn test-node`: Run Mocha tests in Node.js environment.
- `yarn test-electron`: Run tests in Electron environment via Grunt.
- `yarn test`: Run all tests.

CI
- Align Travis and AppVeyor scripts as much as possible.
- Run linting before tests to fail fast.
- Run Node.js (headless and fast) tests first.
- Run Electron tests last (Travis seems to require custom setup in `travis.sh`).
2018-04-11 16:36:42 -04:00
Daniel Gasienica 24f4ad53bc Use single quotes for identifiers 2018-04-11 15:54:32 -04:00
Daniel Gasienica 432a6ebd7f Redact file paths with escaped slashes 2018-04-11 15:30:59 -04:00
Daniel Gasienica d41e3cd6fc Add test for regular `_redactPath` 2018-04-11 15:30:59 -04:00
Daniel Gasienica a8a7525609 Redact stack traces with forward and backslashes 2018-04-11 15:30:59 -04:00
Daniel Gasienica b0da7d965e Redact URL encoded file paths in stack traces 2018-04-11 15:30:59 -04:00
Daniel Gasienica 2ee78ec556 Prefer `path` over `Path` 2018-04-11 15:30:59 -04:00
Scott Nonnenberg c6c3b65bbc
Introduce React, TypeScript, TSLint and React-StyleGuidist (#2219)
Quite a bit of change here.

First, the basics:

- New dependencies were added: react, typescript, tslint, and react-styleguidist
- A new npm script: transpile. It uses typescript to process .tsx files in js/react, putting .js files next to the original file. It's part of the watch functionality of grunt dev as well as the default task run with just grunt (used to build the app prior to release). A lighter-weight to get watch behavior when just working on React components is to run yarn transpile --watch.
- yarn run clean-transpile will remove generated .js files


Style guide via react-styleguidist. Example site: https://react-styleguidist.js.org/examples/basic/

- Start with yarn styleguide
- Component.md files right next to the .tsx file
- jsdoc-style comments are picked up and added to the generated part of the styleguide - the overall summary and a table listing methods and properties of the component
- It has hot-reloading!
- It uses webpack, which means that our app now pulls in webpack though we don't use it to generate anything for the production app.
- I did a bunch of work to enable the use of Backbone views in this context, which will allow us to move smoothly from the old world to the new. First, add all the permutations in the old way, and then slowly start to re-render those same views with React.

A bit of dependency cleanup to enable use in React components:

- moment was moved from our Bower dependencies to our npm dependencies, so it can be used in React components not running in a browser window.
- i18n was moved into the new commonjs format, so it can be used in React components even if window is not available.

Lastly, a bit of Gruntfile cleanup:

- Removal of Chrome App-era modifications of background.js
- Make jshint/jscs watch more targeted, since more and more we'll be using other tools
2018-04-06 08:13:00 -07:00
Scott Nonnenberg 05303233fb
window.Signal.React -> window.Signal.Components 2018-04-05 16:10:59 -07:00
Scott Nonnenberg 23537546fe
Big refactor: ts/ directory for all typescript, including react
Split out test-specific and general utility react components too.

And moved our test/legacy* files for the Style Guide into a styleguide/
subdirectory of test/.

I think we'll be able to live in this directory structure for a while.
2018-04-05 15:30:40 -07:00
Scott Nonnenberg 887abd75dd
Add missing shim, fix typo 2018-04-05 08:31:19 -07:00
Scott Nonnenberg 104a1ca5d4
Remove i18n.js from jshint run, fix missing semicolon 2018-04-04 17:26:57 -07:00
Daniel Gasienica 4c4443390a Rename `createImporter` to `createAttachmentDataWriter` 2018-04-04 19:11:46 -04:00
Scott Nonnenberg 1326b26585
Full styleguide now available via `yarn styleguide`
Due to a number of hacks, the style guide can be used to show Backbone
views. This will allow a smooth path from the old way of doing things to
the new.
2018-04-04 16:08:38 -07:00
Scott Nonnenberg f86a6ef752
Update style of i18n, pull it in via preload instead of .html 2018-04-04 16:03:10 -07:00
Daniel Gasienica bf67254cc5 Add `Message.createImporter` 2018-04-04 18:41:50 -04:00
Daniel Gasienica 5a6668e677 Add `Attachments.createWriteForExisting`
This function lets us choose where to write attachment to instead of picking
random name.
2018-04-04 18:41:50 -04:00
Daniel Gasienica efd673083d Rename `writeAttachmentData` to `writeNewAttachmentData` 2018-04-04 18:41:50 -04:00
Daniel Gasienica ce8fe0d345 Add `Signal.Startup` module 2018-04-04 18:10:52 -04:00
colefranz 234411cb29 issue-2023: introduce unit tests for inbox view
There were no unit tests for the file at all so I added some simple ones
mostly focused on my changes.
2018-04-04 15:42:13 -04:00
Daniel Gasienica 8474f3cf7f Use `create*` prefix to clarify curried functions 2018-04-03 15:25:24 -04:00
Daniel Gasienica 9c7afab21b Clear database before message view tests 2018-04-03 11:45:11 -04:00
Daniel Gasienica 9065b647ad Run migrations before clearing database during tests 2018-04-03 11:45:11 -04:00
Daniel Gasienica 01480f5dd2 Improve formatting 2018-04-03 11:45:11 -04:00
Daniel Gasienica d6ea158e46 Avoid `dangerouslyCreateAndAdd` in `MessageView` test 2018-03-27 19:52:18 -04:00
Daniel Gasienica 83c979fb84 Rename `createTemporary` to `dangerouslyCreateAndAdd`
Class: `ConversationController`.

This function should not be used in application code as it creates potentially
invalid `Conversation` instances in our global conversation collection. We keep
making it available for testing purposes.
2018-03-27 19:52:17 -04:00
Daniel Gasienica 867f73b80a Use double quotes for identifiers in error messages 2018-03-26 16:38:34 -04:00
Daniel Gasienica 06e7bca276 Use new `stringToArrayBuffer` function 2018-03-26 16:38:34 -04:00
Daniel Gasienica 10afcf1bb0 Add `Attachments.deleteData` 2018-03-26 16:38:34 -04:00
Daniel Gasienica 9b636a1885 Add test for `Attachments.readData` 2018-03-26 16:38:34 -04:00
Daniel Gasienica f6f0359a61 Use `assert.deepEqual` instead of Lodash `isEqual` 2018-03-26 16:38:34 -04:00
Daniel Gasienica aba261122f 🎨 Use `camelCase` for mutable variable 2018-03-26 16:38:34 -04:00
Daniel Gasienica 1c8123ff1a Move `writeAttachmentData` into `Attachments`
Encapsulates all attachment operations that require Node.js / Electron APIs,
e.g. file system access.
2018-03-26 16:38:34 -04:00
Daniel Gasienica 6355c54114 Return relative path from `writeAttachmentData`
This will make our app more robust to changes in location on the file system.
2018-03-26 16:38:34 -04:00
Daniel Gasienica 1262d1d696 Shorten prefix to 2 characters
Using 2 hex characters [0-9a-f] will give us 16 * 16 = 256 root folders which
seems more manageable than 4096 (16^3). Assuming a user has 10,000 attachments,
they should roughly distribute at ~40 per folder with prefix length 2 rather
than ~2.5 per folder with a prefix of 3.
2018-03-26 16:38:34 -04:00
Daniel Gasienica 2cd3d5ac16 Add `Message` schema version 3 2018-03-26 16:38:34 -04:00
Daniel Gasienica ebe2a769c9 Add `Attachment.migrateDataToFileSystem` 2018-03-26 16:38:34 -04:00
Daniel Gasienica 1283c77518 Switch from hashed to random attachment file names
Using hashes, we get the benefit of deduplication but if a user receives two
messages with the same attachment, deleting one would delete it for both since
they are only stored once. To avoid the complexity of tracking number of
references, we simply generate random file names similar to iMessage on MacOS
(?) and Signal Android.
2018-03-26 16:38:34 -04:00
Daniel Gasienica d9de6dacba Add `writeAttachmentData` module 2018-03-26 16:38:34 -04:00
Vincent 5b5903c70e Fix link to Signal update location
Fixes #2043.
2018-03-23 12:15:52 -07:00
Scott Nonnenberg cea42bde7d
Encryption support for backup and restore
Also moved to the _ prefix in backup.js for all private methods exported
for testing.
2018-03-20 11:53:54 -07:00
Scott Nonnenberg 6d8f4b7b6e
Backup: zipped messages.json, flat attachments dir
Backup creates, in a target directory:
  - An attachments folder, with all attachments, each named for their
    parent message's id - a GUID. If there is more than one attachment
    in a given message,  each attachment beyond the first will end with
    '-N', zero-indexed.
  - A file named messages.zip. It contains exactly what went to disk in
    the original export code, but zipped up.

Export is now only 'light,' and in this new messages.zip format.

Import supports both the new format and the old format. If the target
directory has a messages.zip file, we'll treat it as the new format.

Next up: Encrypting attachments and the messages.zip!
2018-03-20 11:53:22 -07:00
Scott Nonnenberg e583434366
Refactor: Move Backup under window.Signal 2018-03-20 11:53:19 -07:00
Daniel Gasienica 8dfaa5619f Prefix private functions with underscore 2018-03-19 19:27:59 -04:00
Daniel Gasienica ed336d31d7 Move schema versioning from `Attachment` to `Message` 2018-03-19 19:27:59 -04:00
Daniel Gasienica b9e9f5e19a 🎨 `withInheritedSchemaVersion` to `inheritSchemaVersion` 2018-03-19 19:27:59 -04:00
Daniel Gasienica c27746b79e Add `Message.withInheritedSchemaVersion` 2018-03-19 19:27:59 -04:00
Daniel Gasienica e9e46464c2 Add `SchemaVersion` type 2018-03-19 19:27:59 -04:00
Daniel Gasienica add4b11df3 Skip invalid attachments and make function sync 2018-03-19 19:27:59 -04:00
Daniel Gasienica 3dfc823716 Add `Attachment.removeSchemaVersion` 2018-03-19 19:27:59 -04:00
Scott Nonnenberg a728c9efbf
Remove all mention of obsolete safety-number-approval setting 2018-03-14 14:42:15 -07:00
Scott Nonnenberg 26c273618a
Refactor: db tasks to database.js, log delete to modules/logs.js 2018-03-14 14:42:15 -07:00
Daniel Gasienica 43b47fd349 Avoid `ensure-error` for privacy reasons
Example:

```
> node
> const nonError = {foo: 'i-am-private'};
undefined

// before
> util.inspect(nonError);
'{ foo: \'i-am-private\' }'

// after
> nonError.toString()
'[object Object]'
>
```
2018-03-08 16:23:51 -05:00
Daniel Gasienica 44b81f68dd Remove privacy redaction from `Errors.toLogFormat` 2018-03-08 16:23:51 -05:00
Daniel Gasienica e71246a9e3 Add tests for `Privacy` module 2018-03-08 16:23:51 -05:00
Daniel Gasienica 49e0850fb2 Extract `Privacy` module
Centralizes how we redact sensitive information.
2018-03-08 16:23:51 -05:00
Daniel Gasienica be3e4d86c2 Add `Errors.toLogFormat`
Allows errors to be formatted and sanitized for logging. Removes sensitive paths
such as the app root directory.

Ideally, this module would be called singular `Error` but that is already a
global name. Using `Errors` plural is  similar to Java convention for utilities
such as `Arrays`, `Collections`, `Files`, etc. See:
https://stackoverflow.com/a/11673838
2018-03-08 16:22:38 -05:00
Daniel Gasienica 52f7de6a10 Add `debuglogs` module 2018-03-08 16:21:27 -05:00
Daniel Gasienica 1e2cd3ae1f Rename ‘File a Bug’ to ‘Report an Issue’
This makes it more consistent with ‘Report an issue’ under View > Debug Log.

Not using ellipsis as menu item doesn’t require user confirmation:
https://stackoverflow.com/a/637708
2018-03-08 16:21:27 -05:00
Daniel Gasienica 85b121aca4 Rename `shouldShowAudioNotificationSetting`
Use `isAudioNotificationSupported` to make it less presentation layer specific.
2018-03-05 10:29:11 -05:00
Daniel Gasienica 105eb95391 Add tests for `Settings.shouldShowAudioNotificationSetting` 2018-03-05 10:29:11 -05:00
Daniel Gasienica 40ee88ead3
Remove ‘Ctrl+,’ keyboard shortcut on Windows & Linux (#2099) 2018-03-02 16:46:04 -05:00
Daniel Gasienica 3df22026ab UX Improvements: Global Menu & Copy Changes (#2078)
- [x] Removed ‘Restart Signal’ global menu item
- [x] Change _Click to create contact…_ to _Start conversation…_
- [x] Move global menu (top-left kebab) into OS menu bar,
      i.e. **Settings** > **Preferences…**
- [x] Add tests for OS menu bar templates
- [x] Fix bug with **Window** menu on macOS when showing setup options
- [x] Use _Title Case_ for all OS menu bar menu items for consistency

commit dedf7c9af0
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 16:53:42 2018 -0500

    Use ‘Title Case’ to be consistent with OS menus

    References:
    - Apple:
        - https://developer.apple.com/macos/human-interface-guidelines/menus/menu-anatomy/#menu-and-menu-item-titles
        - https://developer.apple.com/library/content/documentation/FinalCutProX/Conceptual/FxPlugHIG/TextStyleGuidelines/TextStyleGuidelines.html#//apple_ref/doc/uid/TP40013782-CH6-SW1
    - https://titlecaseconverter.com/

commit 3286da29b3
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 16:36:50 2018 -0500

    Fix bug for macOS ‘Window’ menu with setup options

commit 236a23d1ea
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 16:27:46 2018 -0500

    Test menus with included setup options

commit c5d5f5abb8
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 16:10:27 2018 -0500

    Move settings (‘Preferences’) into OS-level menu

    This reduces our reliance on custom UI until we have more design resources.

commit 027803f8f4
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 16:02:56 2018 -0500

    Prepare tests for menu with/without included setup

commit 9e2f006924
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 15:55:46 2018 -0500

    Destructure `includeSetup`

commit 6b2a1eccdf
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 15:55:14 2018 -0500

    🔤 `createTemplate` `options`

commit c2fecba34b
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 12:49:55 2018 -0500

    Test menu for Windows and Linux

commit 60281b1af9
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 12:40:39 2018 -0500

    Add `yarn run test-app` command

commit 1a0489919c
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 12:40:29 2018 -0500

    Add test for `SignalMenu.createTemplate` on macOS

commit 9638b86c0f
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 12:34:46 2018 -0500

    Make `createTemplate` pure

    Extracting `options.platform` makes it easier to test without having to
    stub `process.platform`.

commit 9c26404892
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 11:47:39 2018 -0500

    Extract `locale.load` `appLocale` & `logger` for testability

    This allows us to run this code in a non-Electron environment, e.g. Node.js
    Mocha test suite.

commit 710b22438d
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 11:46:13 2018 -0500

    🔤 npm scripts

commit 9ae22937fb
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 11:45:30 2018 -0500

    Use 2-space indendation for `app` module tests

commit 22c26baf61
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 11:22:55 2018 -0500

    Prefer named exports

commit 9c95261952
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 11:22:46 2018 -0500

    🔤 Organize `require`s

commit 2f144d24d9
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 27 11:13:50 2018 -0500

    Remove existing global hamburger menu

    This will be replaced by a OS-level ‘Preferences’ menu.

commit f5adb374cb
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 26 18:40:54 2018 -0500

    Remove ‘Restart Signal’ menu from settings

    Apparently, this is a remnant from the Chrome web application.

commit d7a206bc8e
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 26 17:16:49 2018 -0500

    Clarify label for starting a new conversation

    When user a enters a number that is not a contact, we prompt them to start a new
    conversation.

commit 715a406436
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 26 16:46:26 2018 -0500

    Use ‘Enter name or number’ as prompt’

    This follows implementation of Android and recommendation from Alissa.
2018-03-02 15:59:39 -05:00
Scott Nonnenberg 426dab85a2
New design for import/install, 'light' import (#2053)
- A new design for the import flow. It features:
  - Icons at the top of every screen
  - Gray background, blue buttons, thinner text
  - Simpler copy
- A new design for the install flow. It features:
  - Immediate entry into the QR code screen
  - Animated dots to show that we're loading the QR code from the server
  - Fewer screens: 1) QR 2) device name 3) sync-in-progress
- When not set up, the app opens directly into the install screen, which has been streamlined. The `--import` command-line argument will cause the app to open directly into the import flow.
- Support for two different flavors of builds - the normal build will open into the standard registration flow, and the import flavor will be exactly the same except during setup it will open directly into the import flow.
- A new design for the (dev-only) standalone registration view
- When these install sequences are active, the OS File menu has entries to allow you to switch the method of setup you'd like to use. These go away as soon as the first step is taken in any of these flows.
- The device name (chosen on initial setup) is now shown in the settings panel
- At the end of a light import, we hand off to the normal device link screen, starting at the QR code. On a full import, we remove the sensitive encryption information in the export to prevent conflicts on multiple imports.
- `Whisper.Backup.exportToDirectory()` takes an options object so you can tell it to do a light export.
- `Whisper.Backup.importFromDirectory()` takes an options object so you can force it to load only the light components found on disk. It also returns an object so you can tell whether a given import was a full import or light import.
- On start of import, we build a list of all the ids present in the messages, conversations, and groups stores in IndexedDB. This can take some time if a lot of data is in the database already, but it makes the subsequent deduplicated import very fast.
- Disappearing messages are now excluded when exporting
- Remove some TODOs in the tests
2018-02-22 10:40:32 -08:00
Daniel Gasienica a1ac810343 Security: Replace Unicode order overrides in attachment names
As a user, when I receive a file attachment, I want to have confidence that the
filename I see in the Signal Desktop app is the same as it will be on disk.

To prevent user confusion when receiving files with Unicode order override
characters, e.g. `test<LTRO>fig.exe` appearing as `testexe.gif`, we replace all
occurrences of order overrides (`U+202D` and `U+202E`) with `U+FFFD`.

**Changes**
- [x] Bump `Attachment` `schemaVersion` to 2.
- [x] Replace all Unicode order overrides in `attachment.filename`:
      `Attachment.replaceUnicodeOrderOverrides`.
- [x] Add tests for existing `Attachment.upgradeSchema`
- [x] Add tests for existing `Attachment.withSchemaVersion`
- [x] Add tests for `Attachment.replaceUnicodeOrderOverrides` positives.
- [x] Add `testcheck` generative property-based testing library
      (based on QuickCheck) to ensure valid filenames are preserved.

---

commit 855bdbc7e647e44f73b9e1f5e6d64f734c61169a
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 22 13:02:01 2018 -0500

    Log error stack in case of error

commit 6e053ed66aee136f186568fa88aacd4814b2ab07
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 22 12:30:28 2018 -0500

    Improve `upgradeStep` error handling

commit 8c226a2523b701cb578b2137832c3eaf3475bb2b
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 22 12:30:08 2018 -0500

    Check for expected version before upgrade

    Prevents out of order upgrade steps.

commit 28b0675591e782169128f75429b7bab2a22307fa
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 22 12:29:52 2018 -0500

    Reject invalid attachments

commit 41f4f457dae9416dae66dc2fa2079483d1f127a9
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 22 12:29:36 2018 -0500

    Fix upgrade pipeline order

commit 3935629e91c49b8d96c1e02bd37b1b31d1180720
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 22 12:28:25 2018 -0500

    Avoid `_.isPlainObject`

    Attachments are deserialized from a protocol buffer and can have a
    non-plain-object constructor.

commit 39f6e7f622ff4885e2ccafa354e0edb5864c55d8
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 22 12:19:07 2018 -0500

    Define basic attachment validity

commit adcf7e3243cd90866cc35990c558ff7829019037
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 22 12:18:54 2018 -0500

    Add tests for attachment upgrade pipeline

commit 82fc4644d7e654eea9f348518b086497be2b0cb4
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 21 12:20:24 2018 -0500

    Favor `async` / `await` over `then`

commit 8fe49e3c40e78ced0b8f2eb0b678f4bae842855d
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 21 12:19:59 2018 -0500

    Add `eslint-more` plugin

    This will enable us to disallow `then` in favor of `async` / `await`.

commit 020beefb25f508ae96cf3fc099599fbbca98802b
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 21 11:31:49 2018 -0500

    Remove unnecessary `async` modifiers

commit 177090c5f5ad9836f0ca0a5c2f298779519e3692
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 21 11:30:55 2018 -0500

    Document `operator-linebreak` ESLint rule

commit 25622b7c59291cb672ae057c47e7327a564cca40
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 21 11:14:15 2018 -0500

    Prefix internal function with `_`

commit 6aa3cf5098df71e9b710064739ec49d74f81b7bf
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 16 19:00:07 2018 -0500

    Replace all Unicode order override occurrences

commit fd6e23b0a519bce3c12c5b9ac676bcd198034fed
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 16 17:48:41 2018 -0500

    Whitelist `testcheck` `check` and `gen` globals

commit 400bae9fac5078821813bc0ca17a5d7a72900161
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 16 17:46:57 2018 -0500

    🎨 Fix lint errors

commit da53d3960aa7aa36b7cc1fcff414c9e929c0d9fc
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 16 17:42:42 2018 -0500

    Add tests for `Attachment.withSchemaVersion`

commit ec203444239d9e3c443ba88cab7ef4672151072d
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 16 17:42:17 2018 -0500

    Add test for `Attachment.upgradeSchema`

commit 4540d5bdf7a4279f49d2e4c6ee03f47b93df46bf
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 16 17:05:29 2018 -0500

    Rename `setSchemaVersion` --> `withSchemaVersion`

    Put the schema version first for better readability.

commit e379cf919feda31d1fa96d406c30fd38e159a11d
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 16 17:03:22 2018 -0500

    Add filename sanitization to upgrade pipeline

commit 1e344a0d15926fc3e17be20cd90bfa882b65f337
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 16 17:01:55 2018 -0500

    Test that we preserve non-suspicious filenames

commit a2452bfc98f93f82bed48b438757af2e66a6af82
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 16 17:00:56 2018 -0500

    Add `testcheck` dependency

    Allows for generative property-based testing similar to Haskell’s QuickCheck.
    See: https://medium.com/javascript-inside/f91432247c27

commit ceb5bfd2484a77689fdb8e9edd18d4a7b093a486
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 16 16:15:33 2018 -0500

    Replace Unicode order override characters

    Prevents users from being tricked into clicking a file named `testexe.fig`
    that appears as `testexe.gif` due to a Unicode order override character.

    See:
    - http://unicode.org/reports/tr36/#Bidirectional_Text_Spoofing
    - https://krebsonsecurity.com/2011/09/right-to-left-override-aids-email-attacks/

commit bc605afb1c6af3a5ebc31a4c1523ff170eb96ffe
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 16 16:12:29 2018 -0500

    Remove `CURRENT_PROCESS_VERSION`

    Reintroduce this whenever we need it. We currently only deal with schema version
    numbers within this module.
2018-02-22 13:21:53 -05:00
Daniel Gasienica a0da73ca8d Auto-orient image attachments based on EXIF metadata
As described in #998, images are sometimes displayed with an incorrect
orientation. This is because cameras often write files in the native sensor byte
order and attach the `Orientation` EXIF metadata to tell end-user devices how to
display the images based on the original author’s capture orientation.

Electron/Chromium (and therefore Signal Desktop) currently doesn’t support
applying this metadata for `<img>` tags, e.g. CSS `image-orientation: from-
image`. As a workaround, this change uses the `loadImage` library with the
`orientation: true` flag to auto-orient images ~~before display~~ upon receipt
and before sending.

**Changes**
- [x] ~~Auto-orient images during display in message list view~~
  - [x] Ensure image is not displayed until loaded (to prevent layout reflow) .
- [x] Auto-orient images upon receipt and before storing in IndexedDB
      (~~or preserve original data until Chromium offers native fix?~~)
- [x] Auto-orient images in compose area preview.
- [x] ~~Auto-orient images in lightbox view~~
- [x] Auto-orient images before sending / storage.
- [x] Add EditorConfig for sharing code styles across editors.
- [x] Fix ESLint ignore file.
- [x] Change `function-paren-newline` ESLint rule from
      `consistent` to `multiline`.
- [x] Add `operator-linebreak` ESLint rule for consistency.
- [x] Added `blob-util` dependency for converting between array buffers,
      blobs, etc.
- [x] Extracted `createMessageHandler` to consolidate logic for
      `onMessageReceived` and `onSentMessage`.
- [x] Introduce `async` / `await` to simplify async coding (restore control flow
      for branching, loops, and exceptions).
- [x] Introduce `window.Signal` namespace for exposing ES2015+ CommonJS modules.
- [x] Introduce rudimentary `Message` and `Attachment` types to begin defining a
      schema and versioning. This will allow us to track which changes, e.g.
      auto-orient JPEGs, per message / attachment as well as which fields
    are stored.
- [x] Renamed `window.dataURLtoBlob` to `window.dataURLToBlobSync` to both fix
      the strange `camelCase` as well as to highlight that this operation is
      synchronous and therefore blocks the user thread.
- [x] Normalize all JPEG MIME types to `image/jpeg`, eliminating the
      invalid `image/jpg`.
- [x] Add `npm run test-modules` command for testing non-browser specific
      CommonJS modules.
- **Stretch Goals**
  - [ ] ~~Restrict `autoOrientImage` to `Blob` to narrow API interface.~~ Do
        this once we use PureScript.
  - [ ] ~~Return non-JPEGs as no-op from `autoOrientImage`.~~ Skipping
        `autoOrientImage` for non-JPEGs altogether.
  - [ ] Retroactively auto-orient existing JPEG image attachments in the
        background.

---

Fixes #998

---

- **Blog:** EXIF Orientation Handling Is a Ghetto:
    https://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/
- **Chromium Bug:** EXIF orientation is ignored:
    https://bugs.chromium.org/p/chromium/issues/detail?id=56845
- **Chromium Bug:** Support for the CSS image-orientation CSS property:
    https://bugs.chromium.org/p/chromium/issues/detail?id=158753

---

commit ce5090b473
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 16 10:35:36 2018 -0500

    Inline message descriptors

commit 329036e59c
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 15 17:34:40 2018 -0500

    Clarify order of operations

    Semantically, it makes more sense to do `getFile` before `clearForm`
    even though it seems to work either way.

commit f9d4cfb2ba
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 15 17:18:26 2018 -0500

    Simplify `operator-linebreak` configuration

    Enabling `before` caused more code changes and it turns out our previous
    configuration is already the default.

commit db588997ac
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 15 17:15:59 2018 -0500

    Remove obsolete TODO

commit 799c881763
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 15 17:12:18 2018 -0500

    Enable ESLint `function-paren-newline` `multiline`

    Per discussion.

commit b660b6bc8e
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Thu Feb 15 17:10:48 2018 -0500

    Use `messageDescriptor.id` not `source`

commit 5e7309d176
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 14 16:29:01 2018 -0500

    Remove unnecessary `eslint-env`

commit 393b3da55e
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 14 16:19:17 2018 -0500

    Refactor `onSentMessage` and `onMessageReceived`

    Since they are so similar, we create the handlers using new
    `createMessageHandler` function. This allows us to ensure both synced and
    received messages go through schema upgrade pipeline.

commit b3db0bf179
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 14 16:18:21 2018 -0500

    Add `Message` descriptor functions

commit 8febf125b1
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 14 14:46:56 2018 -0500

    Fix typo

commit 98d951ef77
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 14 12:22:39 2018 -0500

    Remove `promises` reference

commit a0e9559ed5
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 14 12:22:13 2018 -0500

    Fix `AttachmentView::mediaType` fall-through

commit 67be916a83
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 14 12:03:41 2018 -0500

    Remove minor TODOs

commit 0af186e118
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 14 11:44:41 2018 -0500

    Enable ESLint for `js/views/attachment_view.js`

commit 28a2dc5b8a
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 14 11:44:12 2018 -0500

    Remove dynamic type checks

commit f4ce36fcfc
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 14 11:27:56 2018 -0500

    Rename `process` to `upgradeSchema`

    - `Message.process` -> `Message.upgradeSchema`
    - `Attachment.process` -> `Attachment.upgradeSchema`
    - `Attachment::processVersion` -> `Attachment::schemaVersion`

    Document version history.

commit 41b92c0a31
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 14 11:11:50 2018 -0500

    Add `operator-linebreak` ESLint rule

    Based on the following discussion:
    https://github.com/signalapp/Signal-Desktop/pull/2040#discussion_r168029106

commit 462defbe55
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Wed Feb 14 11:01:30 2018 -0500

    Add missing `await` for `ConversationController.getOrCreateAndWait`

    Tested this by setting `if` condition to `true` and confirming it works.
    It turns rotating a profile key is more involved and might require
    registering a new account according to Matthew.

commit c08058ee4b
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 16:32:24 2018 -0500

    Convert `FileList` to `Array`

commit 70a6c42019
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 15:46:34 2018 -0500

    🎨 Fix lint errors

commit 2ca7cdbc31
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 15:07:09 2018 -0500

    Skip `autoOrientImage` for non-JPEG images

commit 58eac38301
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 14:55:35 2018 -0500

    Move new-style modules to `window.Signal` namespace

commit 02c9328877
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 14:35:23 2018 -0500

    Extract `npm run test-modules` command

commit 2c708eb94f
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 13:25:51 2018 -0500

    Extract `Message.process`

commit 4a2e52f68a
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 13:25:12 2018 -0500

    Fix EditorConfig

commit a346bab5db
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 13:13:02 2018 -0500

    Remove `vim` directives on ESLint-ed files

commit 7ec885c635
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 13:08:24 2018 -0500

    Remove CSP whitelisting of `blob:`

    We no longer use `autoOrientImage` using blob URLs. Bring this back if we
    decide to auto-orient legacy attachments.

commit 879b6f58f4
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 12:57:05 2018 -0500

    Use `Message` type to determine send function

    Throws on invalid message type.

commit 5203d945c9
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 12:56:48 2018 -0500

    Whitelist `Whisper` global

commit 8ad0b066a3
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 12:56:32 2018 -0500

    Add `Whisper.Types` namespace

    This avoids namespace collision for `Whisper.Message`.

commit 785a949fce
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 12:55:43 2018 -0500

    Add `Message` type

commit 674a7357ab
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 12:35:23 2018 -0500

    Run ESLint on `Conversation::sendMessage`

commit cd985aa700
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 12:34:38 2018 -0500

    Document type signature of `FileInputView::readFile`

commit d70d70e52c
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 12:31:16 2018 -0500

    Move attachment processing closer to sending

    This helps ensure processing happens uniformly, regardless of which code
    paths are taken to send an attachment.

commit 532ac3e273
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 12:22:29 2018 -0500

    Process attachment before it’s sent

    Picked this place since it already had various async steps, similar to
    `onMessageReceived` for the incoming `Attachment.process`.

    Could we try have this live closer to where we store it in IndexedDB, e.g.
    `Conversation::sendMessage`?

commit a4582ae2fb
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 12:21:42 2018 -0500

    Refactor `getFile` and `getFiles`

    Lint them using ESLint.

commit 07e9114e65
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 11:37:31 2018 -0500

    Document incoming and outgoing attachments fields

    Note how outgoing message attachments only have 4 fields. This presumably
    means the others are not used in our code and could be discarded for
    simplicity.

commit fdc3ef289d
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 11:36:21 2018 -0500

    Highlight that `dataURLToBlob` is synchronous

commit b9c6bf600f
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 11:35:49 2018 -0500

    Add EditorConfig configuration

commit e56101e229
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 11:34:23 2018 -0500

    Replace custom with `blob-util` functions

    IMPORTANT: All of them are async so we need to use `await`, otherwise we get
    strange or silent errors.

commit f95150f6a9
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 11:17:30 2018 -0500

    Revert "Replace custom functions with `blob-util`"

    This reverts commit 8a81e9c01bfe80c0e1bf76737092206c06949512.

commit 33860d93f3
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 11:13:02 2018 -0500

    Revert "Replace `blueimp-canvas-to-blob` with `blob-util`"

    This reverts commit 31b3e853e4afc78fe80995921aa4152d9f6e4783.

commit 7a0ba6fed6
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 11:12:58 2018 -0500

    Replace `blueimp-canvas-to-blob` with `blob-util`

commit 47a5f2bfd8
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 10:55:34 2018 -0500

    Replace custom functions with `blob-util`

commit 1cfa0efdb4
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 10:47:02 2018 -0500

    Add `blob-util` dependency

commit 9ac26be1bd
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 10:46:44 2018 -0500

    Document why we drop original image data during auto-orient

commit 4136d6c382
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 10:46:27 2018 -0500

    Extract `DEFAULT_JPEG_QUALITY`

commit 4a7156327e
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 10:37:11 2018 -0500

    Drop support for invalid `image/jpg` MIME type

commit 69fe96581f
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 09:54:30 2018 -0500

    Document `window.onInvalidStateError` global

commit a48ba1c774
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 09:54:04 2018 -0500

    Selectively run ESLint on `js/background.js`

    Enabling ESLint on a per function basis allows us to incrementally improve
    the codebase without requiring large and potentially risky refactorings.

commit e6d1cf826b
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 09:16:23 2018 -0500

    Move async attachment processing to `onMessageReceived`

    We previously processed attachments in `handleDataMessage` which is mostly a
    synchronous function, except for the saving of the model. Moving the
    processing into the already async `onMessageReceived` improves code clarity.

commit be6ca2a9aa
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 09:14:49 2018 -0500

    Document import of ES2015+ modules

commit eaaf7c4160
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 09:14:29 2018 -0500

    🎨 Fix lint error

commit a25b0e2e3d
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 09:13:57 2018 -0500

    🎨 Organize `require`s

commit e0cc3d8fab
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 09:07:17 2018 -0500

    Implement attachment process version

    Instead of keeping track of last normalization (processing) date, we now
    keep track of an internal processing version that will help us understand
    what kind of processing has already been completed for a given attachment.
    This will let us retroactively upgrade existing attachments.

    As we add more processing steps, we can build a processing pipeline that can
    convert any attachment processing version into a higher one,
    e.g. 4 -> 5 -> 6 -> 7.

commit ad9083d0fd
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 08:50:31 2018 -0500

    Ignore ES2015+ files during JSCS linting

commit 96641205f7
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 08:48:07 2018 -0500

    Improve ESLint ignore rules

    Apparently, using unqualified `/**` patterns prevents `!` include patterns.
    Using qualified glob patterns, e.g. `js/models/**/*.js`, lets us work
    around this.

commit 255e0ab15b
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 08:44:59 2018 -0500

    🔤 ESLint ignored files

commit ebcb70258a
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 08:35:47 2018 -0500

    Whitelist `browser` environment for ESLint

commit 3eaace6f3a
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 08:35:05 2018 -0500

    Use `MIME` module

commit ba2cf7770e
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 08:32:54 2018 -0500

    🎨 Fix lint errors

commit 65acc86e85
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 08:30:42 2018 -0500

    Add ES2015+ files to JSHint ignored list

commit 8b6494ae6c
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 08:29:20 2018 -0500

    Document potentially unexpected `autoScale` behavior

commit 8b4c69b200
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 08:26:47 2018 -0500

    Test CommonJS modules separately

    Not sure how to test them as part of Grunt `unit-tests` task as
    `test/index.html` doesn’t allow for inclusion of CommonJS modules that use
    `require`. The tests are silently skipped.

commit 213400e4b2
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Tue Feb 13 08:24:27 2018 -0500

    Add `MIME` type module

commit 37a726e4fb
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 20:18:05 2018 -0500

    Return proper `Error` from `blobArrayToBuffer`

commit 164752db56
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 20:15:41 2018 -0500

    🎨 Fix ESLint errors

commit d498dd79a0
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 20:14:33 2018 -0500

    Update `Attachment` type field definitions

commit 141155a153
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 20:12:50 2018 -0500

    Move `blueimp-canvas-to-blob` from Bower to npm

commit 7ccb833e5d
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 16:33:50 2018 -0500

    🎨 Clarify data flow

commit e7da41591f
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 16:31:21 2018 -0500

    Use `blobUrl` for consistency

commit 523a80eefe
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 16:28:06 2018 -0500

    Remove just-in-time image auto-orient for lightbox

    We can bring this back if our users would like auto-orient for old
    attachments.

commit 0739feae9c
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 16:27:21 2018 -0500

    Remove just-in-time auto-orient of message attachments

    We can bring this back if our users would like auto-orient for old
    attachments. But better yet, we might implement this as database migration.

commit ed43c66f92
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 16:26:24 2018 -0500

    Auto-orient JPEG attachments upon receipt

commit e2eb8e36b0
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 16:25:26 2018 -0500

    Expose `Attachment` type through `Whisper.Attachment`

commit 9638fbc987
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 16:23:39 2018 -0500

    Use `contentType` from `model`

commit 032c0ced46
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 16:23:04 2018 -0500

    Return `Error` object for `autoOrientImage` failures

commit ff04bad851
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 16:22:32 2018 -0500

    Add `options` for `autoOrientImage` output type / quality

commit 87745b5586
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 16:18:46 2018 -0500

    Add `Attachment` type

    Defines various functions on attachments, e.g. normalization
    (auto-orient JPEGs, etc.)

commit de27fdc10a
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 16:16:34 2018 -0500

    Add `yarn grunt` shortcut

    This allows us to use local `grunt-cli` for `grunt dev`.

commit 59974db5a5
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 10:10:11 2018 -0500

    Improve readability

commit b5ba96f1e6
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 10:08:12 2018 -0500

    Use `snake_case` for module names

    Prevents problems across case-sensitive and case-insensitive file systems.

    We can work around this in the future using a lint rule such as
    `eslint-plugin-require-path-exists`.
    See discussion:
    https://github.com/signalapp/Signal-Desktop/pull/2040#discussion_r167365931

commit 48c5d3155c
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Mon Feb 12 10:05:44 2018 -0500

    🎨 Use destructuring

commit 4822f49f22
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 17:41:40 2018 -0500

    Auto-orient images in lightbox view

commit 7317110809
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 17:40:14 2018 -0500

    Document magic number for escape key

commit c790d07389
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 17:38:35 2018 -0500

    Make second `View` argument an `options` object

commit fbe010bb63
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 17:27:40 2018 -0500

    Allow `loadImage` to fetch `blob://` URLs

commit ec35710d00
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 16:57:48 2018 -0500

    🎨 Shorten `autoOrientImage` import

commit d07433e3cf
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 16:57:19 2018 -0500

    Make `autoOrientImage` module standalone

commit c285bf5e33
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 16:55:44 2018 -0500

    Replace `loadImage` with `autoOrientImage`

commit 4431854923
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 16:53:23 2018 -0500

    Add `autoOrientImage` module

    This module exposes `loadImage` with a `Promise` based interface and pre-
    populates `orientation: true` option to auto-orient input. Returns data URL
    as string.

    The module uses a named export as refactoring references of modules with
    `default` (`module.exports`) export references can be error-prone.
    See: https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html

commit c77063afc6
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 16:44:30 2018 -0500

    Auto-orient preview images

    See: #998

commit 06dba5eb8f
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 16:43:23 2018 -0500

    TODO: Use native `Canvas::toBlob`

    One challenge is that `Canvas::toBlob` is async whereas
    `dataURLtoBlob` is sync.

commit b15c304a31
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 16:42:45 2018 -0500

    Make `null` check strict

    Appeases JSHint. ESLint has a nice `smart` option for `eqeqeq` rule:
    https://eslint.org/docs/rules/eqeqeq#smart

commit ea70b92d9b
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 15:23:58 2018 -0500

    Use `Canvas::toDataURL` to preserve `ImageView` logic

    This way, all the other code paths remain untouched in case we want to
    remove the auto-orient code once Chrome supports the `image-orientation`
    CSS property.

    See:
    - #998
    - https://developer.mozilla.org/en-US/docs/Web/CSS/image-orientation

commit 62fd744f9f
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 14:38:04 2018 -0500

    Use CSS to constrain auto-oriented images

commit f4d3392687
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 14:35:02 2018 -0500

    Replace `ImageView` `el` with auto-oriented `canvas`

    See: #998

commit 1602d7f610
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 14:25:48 2018 -0500

    Pass `Blob` to `View` (for `ImageView`)

    This allows us to do JPEG auto-orientation based on EXIF metadata.

commit e6a414f2b2
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 14:25:12 2018 -0500

    🔪 Remove newline

commit 5f0d9570d7
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 11:17:02 2018 -0500

    Expose `blueimp-load-image` as `window.loadImage`

commit 1e1c62fe2f
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 11:16:46 2018 -0500

    Add `blueimp-load-image` npm dependency

commit ad17fa8a68
Author: Daniel Gasienica <daniel@gasienica.ch>
Date:   Fri Feb 9 11:14:40 2018 -0500

    Remove `blueimp-load-image` Bower dependency
2018-02-21 10:28:13 -05:00
Scott Nonnenberg 7b49180bc0
Big update to new signal branding (#2018) 2018-01-30 14:22:51 -08:00
Scott Nonnenberg d503d1ace3
Remove built assets from repo, updates to docs + GH templates (#1955)
* Revamp issue and pull request templates, other docs tweaks

`yarn test` now runs all of our tests.

* Remove generated files from the repository

* Update to new Signal support URL

* Prevent the 'Test failed 2 == 1' from test-release in CI

* Another attempt to fix grunt test-release on Appveyor

* grunt test-release: Fail build if test fails

* Lint fix, and move jshint earlier in CI process
2018-01-09 15:31:23 -08:00
Scott Nonnenberg 64fe9dbfb2
Clean logs on start - and eslint/mocha with code coverage (#1945)
* Clean logs on startup; install server-side testing/linting

* Add eslint config, make all of app/ conform to its demands

* Add Node.js testing and linting to CI

* Lock project to Node.js 7.9.0, used by Electron 1.7.10

* New eslint error: trailing commas in function argumensts

Node 7.9.0 doesn't like trailing commas, but Electron does

* Move electron to devDependency, tell eslint it's built-in
2018-01-08 13:19:25 -08:00
Scott Nonnenberg 66aa76e501
Log out information from DOMException when import fails (#1923)
This should give us the information we're looking for when imports fail
mysteriously!

https://developer.mozilla.org/en-US/docs/Web/API/DOMException
2018-01-04 16:26:41 -08:00
Scott Nonnenberg f0aaa7a1c5
Introduce intl-friendly sort order for contact lists (#1900) 2017-12-14 16:30:11 -08:00
Lilia 9c7ba87d6a Add support for Emoji 5 (#1797)
* Add support for Emoji 5

Update to latest emoji-datasource and emoji-js and switch to an up-to-date fork
of emoji-panel.

// FREEBIE

* Dark theme support for emoji-panel

Fixes #1763

// FREEBIE
2017-11-27 15:54:59 -08:00
Scott Nonnenberg 75cece3358 Improve OS menu (#1563)
* Remove reload options, new file/help menus, tools/log at bottom

* Further menus refactor: install handlers at template creation

* WIP: Further tune menus, add custom about window

* New About window, new help menu items, menu labels now i18n

* Default device name on registration is now computer hostname

The OS of the device makes sense for those of us testing across a lot of
different OSes. And maybe for a user with just one desktop device. But
most users with multiple desktop devices are using the same OS for both.

* About window: Only show window when content is ready

* Fix typo in app/menu.js
2017-10-13 16:49:16 -07:00
Scott Nonnenberg 61a2a1a8f8 Improve fixtures, restore InboxView rendering on the test page (#1562) 2017-10-13 16:48:50 -07:00
Scott Nonnenberg 9db0cb49c4 setTimeout/setImmediate workaround for linux hangs (#1497)
FREEBIE
2017-09-22 11:06:52 -07:00
Lilia 4449a5f110 Upgrade emoji support (#1482)
* Upgrade emoji deps and move to node_modules

Add support for Emoji 3.0 and switch from bower to yarn for managing emoji
dependencies.

// FREEBIE

* Delete old emoji deps

// FREEBIE

* Don't copy emoji on windows

It is no longer necessary since the symlinked image dir is gone.

// FREEBIE

* Update emoji test

// FREEBIE

* Fix emoji tests; remove all overrides of emoji-js functions

FREEBIE
2017-09-15 13:22:11 -07:00
Scott Nonnenberg 7f8ade7747
Remove migration-related functionality, leaving export stuff
FREEBIE
2017-09-14 17:03:14 -07:00
Scott Nonnenberg 0fbe43c2dc
Protobufs: More logging on failure to load protobufs, fix tests
FREEBIE
2017-09-14 17:02:45 -07:00
Scott Nonnenberg 63e41612b7
Remove spellchecking on the debug log field - causes big slowdown
FREEBIE
2017-09-14 16:53:52 -07:00
lilia 33a82cc8e8
Add spellcheck smoke test
Exposes the spellcheck provider as window.spellChecker, which allows it to be
called from tests.
2017-09-14 16:53:48 -07:00
Scott Nonnenberg 63dcd43025
Add manual test scenarios for remembering window state
FREEBIE
2017-09-14 16:53:48 -07:00
Scott Nonnenberg 3a3aa3efb6
Remove test/protos symlink, use window.PROTO_ROOT for config 2017-09-14 16:53:48 -07:00
Scott Nonnenberg f84d8038c1
Remove i18n stub used in NetworkStatusView tests
FREEBIE
2017-09-14 16:53:47 -07:00
Scott Nonnenberg cb296fcfaa
Cleanup: Add unit-tests task to grunt test, fix style checks
And improve success logging in unit-tests.

FREEBIE
2017-09-14 16:53:47 -07:00
Scott Nonnenberg b9b9abf76a
Fix emoji tests - image paths are no longer absolute
FREEBIE
2017-09-14 16:53:47 -07:00
Scott Nonnenberg 4402a91976
Use correct locale, fall back to en if we don't have translations
FREEBIE
2017-09-14 16:53:47 -07:00
Scott Nonnenberg 18b8907c96
Fix non-rendering unicode characters on test page
FREEBIE
2017-09-14 16:53:46 -07:00
Scott Nonnenberg a9b4109e9b
Fix NetworkStatusView tests' stubbing of window.i18n
FREEBIE
2017-09-14 16:53:46 -07:00