Mailspring/spec/stores
Juan Tejada 5d837ffd02 feat(undo-send): Add undo send
Summary:
Add ability to undo send. We decided to make undo send completely client side for a couple of reasons. If we rely on send-later for undo-send, we would be giving /all/ send load to our send-later backend. If this increases the send-later load too much, it might cause delays in the regular send-later functionality and potentially other plugins like snooze that run under the same service. We would also need to rely on the network to be able to cancel a send, which would make it unusable offline or hard to debug if that specific request fails for any given reason.

This commit also refactors the way `ComposerExtension.sendActionConfig` works. The method has been renamed and now must return an array of send actions. Also, all of the business logic to handle different send actions registered by extensions has been pieced apart from the SendActionButton and into a new SendActionStore. This also enables undo send to undo custom send actions registered by extensions.
Along the way, this also fixes a pending TODO to show all registered custom send actions in the preferences for choosing the preferred send action for sending.

Undo send works via a task, so in case N1 closes before send goes through, it will still be persisted to the task queue and restored when opened again. Undoing a send means dequeuing this task.

Test Plan: Manual

Reviewers: jackie, bengotow, halla, evan

Reviewed By: bengotow, halla, evan

Differential Revision: https://phab.nylas.com/D3361
2016-10-26 20:40:10 -07:00
..
account-store-spec.coffee fix(identity): Always refresh accounts after identity 2016-09-28 11:29:26 -07:00
badge-store-spec.coffee feat(babel6): Convert to use new es6 require syntax 2016-05-06 11:54:55 -07:00
category-store-spec.es6 feat(babel6): 1,774 linter errors 2016-05-06 11:55:46 -07:00
contact-store-spec.coffee es6(db): Move DatabaseStore to ES6 2016-09-30 15:24:34 -07:00
database-setup-query-builder-spec.es6 es6(db): Convert the ORM specs to ES2016 2016-10-14 12:06:07 -07:00
database-store-spec.es6 es6(db): Convert the ORM specs to ES2016 2016-10-14 12:06:07 -07:00
database-transaction-spec.es6 es6(db): Convert the ORM specs to ES2016 2016-10-14 12:06:07 -07:00
draft-editing-session-spec.coffee es6(db): Move DatabaseStore to ES6 2016-09-30 15:24:34 -07:00
draft-factory-spec.es6 fix(mailto): Support body with \n or \r characters 2016-10-18 10:37:27 -07:00
draft-helpers-spec.es6 fix(drafts): Sanitize quoted text to avoid overlaid component issues [!!] 2016-09-27 17:45:51 -07:00
draft-store-spec.es6 feat(undo-send): Add undo send 2016-10-26 20:40:10 -07:00
file-download-store-spec.coffee fix(downloads): Add a check to see if last download directory is different, only show item in folder if true 2016-07-26 15:02:09 -07:00
file-upload-store-spec.coffee feat(inline-images): Drag & drop or paste inline images 2016-09-26 17:01:19 -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 feat(babel6): Convert to use new es6 require syntax 2016-05-06 11:54:55 -07:00
focused-perspective-store-spec.coffee fix+🎨(notifs): Cleanup, handle nonexistent thread when opening notification 2016-10-01 00:08:19 -07:00
message-store-spec.coffee fix+🎨(notifs): Cleanup, handle nonexistent thread when opening notification 2016-10-01 00:08:19 -07:00
nylas-sync-status-store-spec.es6 fix(lint): Correct more linter errors 2016-05-06 14:10:28 -07:00
send-actions-store-spec.es6 feat(undo-send): Add undo send 2016-10-26 20:40:10 -07:00
task-queue-spec.coffee es6(db): Move DatabaseStore to ES6 2016-09-30 15:24:34 -07:00
task-subclass.es6 Revert "fix(task-queue): performLocal now operates serially" 2016-09-26 17:04:23 -07:00
undo-redo-store-spec.es6 fix(undo): can redo more than one undo item 2016-05-18 16:43:48 -07:00