Mailspring/spec/stores
Ben Gotow 7452705c31 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
..
account-store-spec.coffee perf(autolinker): Use requestIdleCallback to fix hanging on large bodies 2016-03-23 19:03:21 -07:00
badge-store-spec.coffee fix(tray): Use total count, not unread count, for tray icon 2016-03-21 17:36:18 -07:00
category-store-spec.es6 fix(snooze): Correctly query and create snooze categories per account 2016-03-14 15:36:39 -07:00
contact-store-spec.coffee fix(contact-search): Keep only ranked contacts, query for others. Massive perf boost. 2016-01-28 14:56:15 -08:00
database-setup-query-builder-spec.coffee perf(db): Use subselect to improve thread list query perf (53%!) 2016-04-11 13:29:05 -07:00
database-store-spec.coffee feat(tasks): add Create, Update, Destroy tasks plus spec & lint fixes 2016-01-15 15:16:21 -05:00
database-transaction-spec.coffee perf(db): Use subselect to improve thread list query perf (53%!) 2016-04-11 13:29:05 -07:00
draft-factory-spec.es6 fix(fwd): Do not mention Bcc'd recipeints in forward headers #1873 2016-04-06 14:51:17 -07:00
draft-store-proxy-spec.coffee refactor(composer): Make session, draft available everywhere 2016-04-19 16:05:15 -07:00
draft-store-spec.es6 fix(composer): Show when rendered, send draft JSON to composer windows 2016-04-04 18:30:50 -07:00
file-download-store-spec.coffee fix(downloads): Properly handle network errors, retries of downloads 2016-03-08 18:32:47 -08:00
file-upload-store-spec.coffee feat(dock-icon): Drop files to attach them to new msg 2016-03-17 13:14:55 -07:00
focused-contacts-store-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
focused-content-store-spec.coffee Merge branch 'master' into unified-inbox 2016-01-25 17:28:29 -08:00
focused-perspective-store-spec.coffee fix(perspective): Fix specs for FocusedPerspectiveStore 2016-04-11 07:59:40 -07:00
message-store-spec.coffee fix(bodies): Move loading into component, add retry, loading spinner 2016-03-09 19:14:54 -08:00
nylas-sync-status-store-spec.es6 fix(specs): Remove fdescribe 2016-03-14 15:39:42 -07:00
task-queue-spec.coffee feat(offline-status): Show a bar when not connected to the API 2016-04-04 17:11:09 -07:00