Mailspring/internal_packages/composer/lib
Ben Gotow 92bff6ca5a fix(drafts): Formalize draft factory, add reply "behaviors" #1722
Summary:
This diff implements a behavior change described in https://github.com/nylas/N1/issues/1722.

Reply buttons should prefer to focus an existing draft in reply to the same message, if one is pristine, altering it as necessary to switch between reply / reply-all. If no pristine reply is already there, it creates one.

Reply keyboard shortcuts should do the same, but more strictly - the shortcuts should switch between reply / reply-all for an existing draft regardless of whether it's pristine.

This diff also cleans up the DraftStore and moves all the draft creation itself to a new DraftFactory object. This makes it much easier to see what's going on in the DraftStore, and I also refactored away the "newMessageWithContext" method, which was breaking the logic for Reply vs Forward between a bunch of different helper methods and was hard to follow.

Test Plan: They're all wrecked. Will fix after concept is greenlighted

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2776
2016-03-22 15:47:51 -07:00
..
account-contact-field.cjsx More sending fixes - attachments working! 2016-01-26 18:03:01 -08:00
collapsed-participants.cjsx fix(drafts): Formalize draft factory, add reply "behaviors" #1722 2016-03-22 15:47:51 -07:00
compose-button.cjsx feat(tooltip): use native tooltip style 2015-10-21 11:27:57 -07:00
composer-editor.jsx fix(quoted-text): div vs blockquote, signature cleanup #1746 2016-03-17 13:11:00 -07:00
composer-header-actions.cjsx fix(composer): Refactor header actions, clean up layout 2016-03-21 11:32:48 -07:00
composer-view.cjsx fix(drafts): Formalize draft factory, add reply "behaviors" #1722 2016-03-22 15:47:51 -07:00
expanded-participants.cjsx fix(composer): Refactor header actions, clean up layout 2016-03-21 11:32:48 -07:00
fields.cjsx feat(composer): participants collapse 2015-09-14 10:37:00 -04:00
file-upload.cjsx fix(uploads): Display icon regardless of ext capitalization 2016-03-15 09:31:22 -07:00
image-file-upload.cjsx Refactor FileUploadStore and composer attachments - WIP 2016-01-26 15:36:38 -08:00
main.cjsx fix(composer): Refactor header actions, clean up layout 2016-03-21 11:32:48 -07:00
participants-text-field.cjsx fix(composer): fix dissapearing participant bug w/ multiple composers 2016-02-15 18:12:41 -05:00
send-action-button.cjsx feat(composer): new composer footer and icon design 2016-02-23 13:42:10 -08:00