Mailspring/internal_packages
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-sidebar cleanup(*): Remove dead .bowerrc, .gitignore files 2016-10-14 11:39:34 -07:00
attachments lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
category-picker feat(SFDC): Initial SFDC commit 2016-10-26 19:46:54 -04:00
composer feat(undo-send): Add undo send 2016-10-26 20:40:10 -07:00
composer-emoji Fix JSON spacing (#2958) 2016-10-26 11:54:48 -07:00
composer-markdown feat(popout-threads) Add functionality to open threads in popout windows 2016-10-12 13:55:11 -07:00
composer-signature lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
composer-spellcheck lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
composer-templates lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
composer-translate cleanup(*): Remove dead .bowerrc, .gitignore files 2016-10-14 11:39:34 -07:00
draft-list lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
events fix(thread-popout) Add missing packages to the 'thread-popout' window 2016-10-18 11:02:30 -07:00
github-contact-card lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
keybase fix(db): Return; preventing ThreadSearch indexing 2016-10-19 16:54:00 -07:00
main-calendar lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
message-autoload-images fix(thread-popout) Add missing packages to the 'thread-popout' window 2016-10-18 11:02:30 -07:00
message-list feat(SFDC): Initial SFDC commit 2016-10-26 19:46:54 -04:00
message-view-on-github lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
mode-switch fix(copy): Updating language for onboarding tour 2016-09-14 14:16:19 -04:00
notifications 🎨(notifications): Remove indent and left padding from notifications 2016-10-26 12:19:12 -07:00
onboarding fix(onboarding): Don’t display “Welcome Back” screen 2016-10-20 16:34:59 -07:00
participant-profile feat(SFDC): Initial SFDC commit 2016-10-26 19:46:54 -04:00
personal-level-indicators lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
phishing-detection cleanup(*): Remove dead .bowerrc, .gitignore files 2016-10-14 11:39:34 -07:00
plugins lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
preferences feat(undo-send): Add undo send 2016-10-26 20:40:10 -07:00
print fix(thread-popout) Add missing packages to the 'thread-popout' window 2016-10-18 11:02:30 -07:00
remove-tracking-pixels fix(thread-popout) Add missing packages to the 'thread-popout' window 2016-10-18 11:02:30 -07:00
screenshot-mode feat(package): require 'engines': {'nylas': '*'} in package.json 2016-04-25 15:06:37 -07:00
send-and-archive feat(undo-send): Add undo send 2016-10-26 20:40:10 -07:00
system-tray feat(babel6): 1,774 linter errors 2016-05-06 11:55:46 -07:00
theme-picker feat(SFDC): Initial SFDC commit 2016-10-26 19:46:54 -04:00
thread-list lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
thread-search Revert "Fix issue #2758. Press Escape after a finished search to get back to … (#2939)" 2016-10-26 13:20:26 -07:00
thread-search-index fix(search): Update local search syntax to include more results 2016-09-28 11:06:10 -07:00
thread-snooze lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
ui-dark Revert "🎨(ui-dark): Remove iframe inversion" 2016-05-25 23:46:36 -07:00
ui-darkside feat(sidebar-notifs) Create sidebar notifications to replace old bars 2016-10-04 08:08:23 -07:00
ui-less-is-more fix(lint): fix minor linter issue 2016-05-09 13:42:18 -04:00
ui-light feat(theme-selector): Add theme selector to preferences page 2015-12-15 10:29:58 -08:00
ui-taiga feat(sidebar-notifs) Create sidebar notifications to replace old bars 2016-10-04 08:08:23 -07:00
ui-ubuntu fix(size): remove unused docs & screenshots 2016-09-01 11:32:52 -07:00
undo-redo feat(undo-send): Add undo send 2016-10-26 20:40:10 -07:00
unread-notifications fix+🎨(notifs): Cleanup, handle nonexistent thread when opening notification 2016-10-01 00:08:19 -07:00
verify-install-location lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
worker-sync Fix broken test 2016-09-26 16:49:22 -07:00
worker-ui cleanup(*): Remove dead .bowerrc, .gitignore files 2016-10-14 11:39:34 -07:00