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
Summary:
Refactored signature preferences page to allow more signatures than the previous 1-1 mapping for signatures and accounts. Created a multi select dropdown of the accounts for which a certain signature is set as default for. Added a button into the draft header From field to toggle between saved signatures.
refactor(signatures): Add basic add/remove capabilities to static
refactor(signatures): Hooked up signature actions and signature store for basic functionality
fix(signatures): Cleaned up signature store and started on multiselectdropdown
fix(signatures): Add multi signature toggle select to multiselect dropdown
build(signatures): Built framework for multiselect dropdown
build(signatures): Toggle button functionality for dropdown
build(signatures): Build multi select from components and add debounce
refactor(signatures): Move signature actions and signature store into flux
fix(signatures): Styled composer signatures button/dropdown and fixed preferences checkmarks
build(signatures): Finish main functionality, about to refactor composer signature button into injected component
fix(signatures): Changed position styles
fix(signatures): Fixed background color for dropdown button when blurred
build(signatures): Began to write tests for signatures store, preferences and dropdown
Test Plan: Wrote tests for preferences signatures, signature store, signature composer dropdown and refactored tests for signature composer extension. For signature composer extension I removed applyTransformsToDraft and unapplyTransformsToDraft and tested by sending emails with signatures to different providers to make sure the <signature> tag caused problems.
Reviewers: bengotow, juan
Reviewed By: juan
Differential Revision: https://phab.nylas.com/D3073
Summary:
Adds new redesigned preferences with horizontal tab bar and refactored code.
Converts Preferences, Plugins, and a few components to ES6.
Test Plan: Tested locally.
Reviewers: evan, bengotow
Reviewed By: bengotow
Subscribers: juan
Differential Revision: https://phab.nylas.com/D2818