Mailspring/spec/stores
Ben Gotow c265cf0dfa fix(drafts): Formalize draft factory, add reply "behaviors" #1722
Summary:
This diff implements a behavior change described in https://github.com/nylas/N1/issues/1722.

Reply buttons should prefer to focus an existing draft in reply to the same message, if one is pristine, altering it as necessary to switch between reply / reply-all. If no pristine reply is already there, it creates one.

Reply keyboard shortcuts should do the same, but more strictly - the shortcuts should switch between reply / reply-all for an existing draft regardless of whether it's pristine.

This diff also cleans up the DraftStore and moves all the draft creation itself to a new DraftFactory object. This makes it much easier to see what's going on in the DraftStore, and I also refactored away the "newMessageWithContext" method, which was breaking the logic for Reply vs Forward between a bunch of different helper methods and was hard to follow.

Test Plan: They're all wrecked. Will fix after concept is greenlighted

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2776
2016-03-22 15:47:51 -07:00
..
account-store-spec.coffee fix(config): Move account tokens to system keychain 2016-03-14 15:14:08 -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 DatabaseTransaction / QueryBuilder spec fixes 2016-01-25 11:11:57 -08: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 DatabaseTransaction / QueryBuilder spec fixes 2016-01-25 11:11:57 -08:00
draft-factory-spec.es6 fix(drafts): Formalize draft factory, add reply "behaviors" #1722 2016-03-22 15:47:51 -07:00
draft-store-proxy-spec.coffee fix(syncback): Bidirectional transforms, ready-to-send saved state 2016-03-16 19:27:12 -07:00
draft-store-spec.es6 fix(drafts): Formalize draft factory, add reply "behaviors" #1722 2016-03-22 15:47:51 -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(focused-persepective): Init saved perspective correctly 2016-02-09 20:10:33 -08: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 fix(queue): Delay retries up to 30s when tasks request a retry 2016-03-18 13:25:30 -07:00