Mailspring/spec
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
..
components feat(tokens): Multi-select for tokenized text fields 2016-10-26 13:58:57 -07:00
fixtures es6(db): Didn’t wait for NylasLint… 2016-09-21 09:45:11 -07:00
models lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
n1-spec-runner feat(tokens): Multi-select for tokenized text fields 2016-10-26 13:58:57 -07:00
services Move specs into subfolders 2016-10-16 20:10:19 -07:00
stores feat(undo-send): Add undo send 2016-10-26 20:40:10 -07:00
tasks lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
themes rm(grim): We’re not using Grim for deprecations 2016-10-25 11:36:20 -07:00
utils Move specs into subfolders 2016-10-16 20:10:19 -07:00
action-bridge-spec.coffee es6(db): Move DatabaseStore to ES6 2016-09-30 15:24:34 -07:00
auto-update-manager-spec.coffee fix(autoupdater): Change feed URL when Nylas ID or accounts changes 2016-08-18 13:22:56 -07:00
buffered-process-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
component-registry-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
database-object-registry-spec.es6 es6(db): Convert the ORM specs to ES2016 2016-10-14 12:06:07 -07:00
default-client-helper-spec.coffee feat(win32): Allow N1 to become the system-wide mailto: handler 2016-10-12 16:05:36 -07:00
extension-registry-spec.coffee feat(babel6): Detect when packages don't have a default export 2016-05-06 11:54:57 -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 lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
menu-manager-spec.coffee refactor(menus): Major prune of keymaps/commands, real conditional menus 2016-04-24 12:16:25 -05: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
nylas-api-spec.coffee es6(db): Move DatabaseStore to ES6 2016-09-30 15:24:34 -07:00
nylas-env-spec.es6 fix(specs): Fix specs on Linux 2016-06-15 16:30:52 -07:00
nylas-protocol-handler-spec.es6 fix(specs) convert nylas-protocol-handler-spec to ES6 (#2886) 2016-10-12 11:38:30 -07:00
nylas-test-utils.coffee cson(cleanup): Remove imports, only used for config.cson now 2016-04-24 20:33:34 -05:00
package-manager-spec.coffee rm(grim): We’re not using Grim for deprecations 2016-10-25 11:36:20 -07:00
package-spec.coffee cleanup(specs): Remove space-pen. Goodbye, jQuery! 2016-04-26 13:14:07 -07:00
spellchecker-spec.jsx fix(spellchecker): Use cross-platform misspellings, fix lint error 2016-10-12 17:07:22 -07:00
undo-stack-spec.es6 lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00