signal-desktop/js
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
..
models Explicitly make onDestroy have void return type 2018-03-26 16:49:21 -04:00
modules Introduce React, TypeScript, TSLint and React-StyleGuidist (#2219) 2018-04-06 08:13:00 -07:00
views Full styleguide now available via yarn styleguide 2018-04-04 16:08:38 -07:00
.eslintrc Auto-fixes: UX Improvements (#2077) 2018-03-02 15:54:15 -05:00
background.js Sync read receipt configuration upon relink 2018-04-04 18:12:25 -04:00
chromium.js Remove extension.notification 2017-09-14 16:53:45 -07:00
conversation_controller.js Strengthen precondition of ConversationController.getOrCreate 2018-03-27 19:52:18 -04:00
database.js Conditionally run post-attachment migrations 2018-04-02 17:42:04 -04:00
delivery_receipts.js Immediately remove delivery receipts from the retry cache (#1719) 2017-11-07 18:30:54 -08:00
emoji_util.js Upgrade emoji support (#1482) 2017-09-15 13:22:11 -07:00
expire.js Build expiration date 2017-09-14 16:53:38 -07:00
expiring_messages.js Fetch all conversations on startup of app, not on inbox load (#1437) 2017-09-06 18:18:46 -07:00
focus_listener.js Ensure isFocused always returns boolean 2018-03-08 16:21:27 -05:00
jquery.js Set parent window for about/new version, escape to close (#1795) 2017-11-21 15:23:18 -08:00
keychange_listener.js Fetch conversations once, clean up ConversationController API (#1420) 2017-09-01 09:10:41 -07:00
libphonenumber-util.js Refactor number parsing and validation 2015-12-09 18:58:51 -08:00
libsignal-protocol-worker.js Update libsignal-protocol v1.0.0 2016-06-14 16:27:34 -07:00
logging.js Remove unused require 2018-03-08 17:50:10 -05:00
Mp3LameEncoder.min.js Copy audio-related files into js/ instead of symlinking them (#1456) 2017-09-14 17:03:18 -07:00
notifications.js Simplify log statement 2018-03-19 19:27:59 -04:00
read_receipts.js Feature: Blue check marks for read messages if opted in (#1489) 2017-10-04 15:28:43 -07:00
read_syncs.js Feature: Blue check marks for read messages if opted in (#1489) 2017-10-04 15:28:43 -07:00
registration.js Remove config after unlink, clear db when linked with new number 2018-03-14 14:42:13 -07:00
reliable_trigger.js Apply reliable trigger to Backbone.Collection as well 2017-08-04 12:03:25 -07:00
rotate_signed_prekey_listener.js Prefer ISO date formatting 2018-04-02 18:57:58 -04:00
signal_protocol_store.js Refactor: db tasks to database.js, log delete to modules/logs.js 2018-03-14 14:42:15 -07:00
spell_check.js Merge locale-provided strings into english for failover support 2017-09-14 17:03:17 -07:00
storage.js Improve storage.fetch error message 2018-04-02 17:42:04 -04:00
wall_clock_listener.js Reschedule all timers on time travel, set interval back to 1000ms 2017-09-14 16:53:53 -07:00
WebAudioRecorderMp3.js Copy audio-related files into js/ instead of symlinking them (#1456) 2017-09-14 17:03:18 -07:00