Commit graph

317 commits

Author SHA1 Message Date
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