Mailspring/static/components
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
..
button-dropdown.less fix(collapsed-participants): Resize in correct scenarios 2016-04-05 14:16:24 -07:00
contenteditable.less fix(composer): Wrap composer instead of allowing overflow-x 2016-09-28 17:39:44 -07:00
date-input.less
date-picker.less fix(schedule): Move z-indexes to prevent dropdown layering issue 2016-04-11 14:58:58 -07:00
disclosure-triangle.less fix(sidebar): Fix overflow of account name 2016-04-26 15:53:51 -07:00
editable-list.less
editable-table.less fix(build): resolve lesslint issue 2016-04-27 19:20:59 -07:00
empty-list-state.less fix(empty): Add padding to empty message 2016-04-11 18:20:28 -07:00
extra.less
fixed-popover.less feat(keybase): Adds PGP Encryption Plugin 2016-06-07 13:30:04 -07:00
generated-form.less feat(SFDC): Initial SFDC commit 2016-10-26 19:46:54 -04:00
key-commands-region.less
list-tabular.less
menu.less refactor(signatures): Removed old signature imgs and made static empty signatures page 2016-07-11 12:35:41 -07:00
modal.less feat(SFDC): Initial SFDC commit 2016-10-26 19:46:54 -04:00
multiselect-dropdown.less refactor(signatures): Removed old signature imgs and made static empty signatures page 2016-07-11 12:35:41 -07:00
nylas-calendar.less feat(calendar): can pick which calendars you want displayed 2016-10-13 11:37:19 -04:00
outline-view.less fix(sidebar): Show icons when hovering over entire section 2016-06-06 17:57:39 -07:00
scroll-region.less
spinner.less
switch.less 🎨(preferences): Updates preferences to look prettier 2016-04-01 14:01:26 -07:00
table.less perf(mail-merge): Add lazy rendering to table 2016-04-29 13:10:15 -07:00
time-picker.less feat(scheduler): better time picker 2016-04-07 15:14:33 -07:00
toast.less feat(undo-send): Add undo send 2016-10-26 20:40:10 -07:00
tokenizing-text-field.less feat(SFDC): Initial SFDC commit 2016-10-26 19:46:54 -04:00
tutorial-overlay.less fix(tutorial): Minor tweaks, finalized styling 2016-09-16 17:34:22 -07:00
undo-toast.less feat(undo-send): Add undo send 2016-10-26 20:40:10 -07:00
unsafe.less