Mailspring/spec
Ben Gotow 585dab7cdf refactor(composer): Make session, draft available everywhere
Summary:
Up until now, we've been requiring that every plugin control in the composer take the draftClientId, retreive the session, listen to it, build state from the draft, etc. This is a huge pain and is hard to explain to newcomers becaus it frankly makes no sense.

In 0.3.45 we made it so that the ComposerView always has a non-null draft and session. (It isn't rendered until they're available). In this diff, I just pass those through to all the plugins and remove all the session retrieval cruft.

Almost none of the buttons have state of their own, which I think is appropriate.

They do render on every keystroke, but they were already running code (to recompute their state) on each keystroke and profiling suggests this has no impact.

Prepare for immutable

In preparation for Immutable models, make the draft store proxy returns a !== draft if any changes have been made. This means you can safely know that a draft has changed if `props.draft !== nextProps.draft`

Test Plan: Run tests

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D2902
2016-04-19 16:05:15 -07:00
..
components tests(calendar): adding calendar and scheduler tests 2016-04-19 11:54:15 -07:00
extensions fix(quick-schedule): Update to use new APIs, remove leftover docs 2016-03-18 10:43:43 -07:00
fixtures perf(db): Use subselect to improve thread list query perf (53%!) 2016-04-11 13:29:05 -07:00
models fix(db-spec): Accompanying spec changes 2016-04-05 19:03:47 -07:00
services feat(paste): Paste accepts more HTML, paste and match style now available 2015-12-07 15:34:03 -08:00
stores refactor(composer): Make session, draft available everywhere 2016-04-19 16:05:15 -07:00
tasks fix(schedule): Use draft session to udpate metadata, always save in syncback 2016-04-11 14:32:54 -07:00
action-bridge-spec.coffee refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
auto-update-manager-spec.coffee bump(electron): 0.34.3 => 0.35.1 2015-11-23 22:09:17 -08:00
buffered-process-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
clipboard-spec.coffee refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
component-registry-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
database-object-registry-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
date-utils-spec.es6 fix(date-utils): Add localization to date formats 2016-03-07 16:44:54 -08:00
dom-utils-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
extension-registry-spec.coffee update(extensions): Rename DraftStoreExtension and MessageStoreExtension 2015-11-30 16:08:05 -08:00
jasmine-helper.coffee refactor(spec): remove spectron from main app 2015-12-02 13:42:09 -08:00
jasmine-jquery.js refactor(dir): move exports to src/global and consolidate tests 2015-10-02 09:19:37 -07:00
jasmine.js refactor(dir): move exports to src/global and consolidate tests 2015-10-02 09:19:37 -07:00
launch-services-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
list-selection-spec.coffee feat(outbox): Sending status now appears beside drafts 2016-02-04 14:14:24 -08:00
mail-rules-processor-spec.coffee fix(mail-rules): Catch and disable mail rules building bad actions 2015-12-28 18:39:06 -08:00
mailbox-perspective-spec.es6 feat(unread/spam): New items in the sidebar for unread and spam 2016-04-19 11:32:33 -07:00
menu-manager-spec.coffee refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
module-cache-spec.coffee fix(specs): Update specs following 0.29.2 > 0.34.3 move 2015-11-17 17:40:06 -08:00
n1-spec-reporter.coffee 🎨: Smaller buttons, smaller toolbar, smaller text 2016-02-09 19:45:24 -08:00
nylas-api-spec.coffee fix(specs): * 2016-04-08 16:03:21 -07:00
nylas-env-spec.coffee fix(specs): handle Electron 0.37 remote method calls (#1943) 2016-04-13 10:29:13 -07:00
nylas-protocol-handler-spec.coffee fix(specs): Update specs following 0.29.2 > 0.34.3 move 2015-11-17 17:40:06 -08:00
nylas-test-utils.coffee bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
package-manager-spec.coffee refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
package-spec.coffee refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
quoted-html-transformer-spec.coffee feat(quote): add new quoted text detector for quote strings 2016-03-03 17:30:36 -08:00
quoted-plain-text-transformer-spec.coffee feat(paste): Paste accepts more HTML, paste and match style now available 2015-12-07 15:34:03 -08:00
spec-bootstrap.coffee bump(*): Electron 0.36.7, version to 0.4.6 2016-02-08 18:35:23 -08:00
spec-helper-platform.coffee fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
spec-helper.coffee tests(calendar): adding calendar and scheduler tests 2016-04-19 11:54:15 -07:00
spec-suite.coffee refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
spellchecker-spec.coffee fix(spellcheck): let win < 8 fallback to hunspell 2015-12-11 16:41:41 -05:00
style-manager-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
styles-element-spec.coffee refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
task-factory-spec.es6 fix(remove-from-view): Fix logic for delete/remove-from-view behavior: 2016-03-07 18:16:37 -08:00
theme-manager-spec.coffee feat(tasks): add Create, Update, Destroy tasks plus spec & lint fixes 2016-01-15 15:16:21 -05:00
time-override.coffee feat(tests): add integration tests 2015-12-02 13:41:14 -08:00
time-reporter.coffee refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
undo-manager-spec.coffee fix(composer): support Chinese & others - handle composition events 2015-10-30 20:03:33 -04:00
utils-spec.coffee fix(trash/spam): New inAllMail filter applied to all mailbox views except trash and spam 2016-03-10 12:41:32 -08:00