You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-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
7 years ago
..
models Explicitly make `onDestroy` have `void` return type 7 years ago
modules Introduce React, TypeScript, TSLint and React-StyleGuidist (#2219) 7 years ago
views Full styleguide now available via `yarn styleguide` 7 years ago
.eslintrc Auto-fixes: UX Improvements (#2077) 7 years ago
Mp3LameEncoder.min.js Copy audio-related files into js/ instead of symlinking them (#1456) 8 years ago
WebAudioRecorderMp3.js Copy audio-related files into js/ instead of symlinking them (#1456) 8 years ago
background.js Sync read receipt configuration upon relink 7 years ago
chromium.js Remove extension.notification 8 years ago
conversation_controller.js Strengthen precondition of `ConversationController.getOrCreate` 7 years ago
database.js Conditionally run post-attachment migrations 7 years ago
delivery_receipts.js Immediately remove delivery receipts from the retry cache (#1719) 8 years ago
emoji_util.js Upgrade emoji support (#1482) 8 years ago
expire.js Build expiration date 8 years ago
expiring_messages.js Fetch all conversations on startup of app, not on inbox load (#1437) 8 years ago
focus_listener.js Ensure `isFocused` always returns boolean 7 years ago
jquery.js Set parent window for about/new version, escape to close (#1795) 8 years ago
keychange_listener.js Fetch conversations once, clean up ConversationController API (#1420) 8 years ago
libphonenumber-util.js Refactor number parsing and validation 10 years ago
libsignal-protocol-worker.js Update libsignal-protocol v1.0.0 9 years ago
logging.js Remove unused `require` 7 years ago
notifications.js Simplify log statement 7 years ago
read_receipts.js Feature: Blue check marks for read messages if opted in (#1489) 8 years ago
read_syncs.js Feature: Blue check marks for read messages if opted in (#1489) 8 years ago
registration.js Remove config after unlink, clear db when linked with new number 7 years ago
reliable_trigger.js Apply reliable trigger to Backbone.Collection as well 8 years ago
rotate_signed_prekey_listener.js Prefer ISO date formatting 7 years ago
signal_protocol_store.js Refactor: db tasks to database.js, log delete to modules/logs.js 7 years ago
spell_check.js Merge locale-provided strings into english for failover support 8 years ago
storage.js Improve `storage.fetch` error message 7 years ago
wall_clock_listener.js Reschedule all timers on time travel, set interval back to 1000ms 8 years ago