Mailspring/internal_packages/thread-list/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
..
category-removal-target-rulesets.es6 fix(remove-from-view): Fix logic for delete/remove-from-view behavior: 2016-03-07 18:16:37 -08:00
injects-toolbar-buttons.jsx feat(selection): Add new display for selection count + update toolbar 2016-03-21 12:20:11 -07:00
main.cjsx feat(selection): Add new display for selection count + update toolbar 2016-03-21 12:20:11 -07:00
message-list-toolbar.jsx fix(message-list-toolbar): Fix observable for selection & focused thread 2016-03-22 11:28:55 -07:00
selected-items-stack.jsx feat(selection): Add new display for selection count + update toolbar 2016-03-21 12:20:11 -07:00
thread-list-columns.cjsx feat(selection): Add new display for selection count + update toolbar 2016-03-21 12:20:11 -07:00
thread-list-context-menu.es6 fix(drafts): Formalize draft factory, add reply "behaviors" #1722 2016-03-22 15:47:51 -07:00
thread-list-data-source.coffee feat(outbox): Sending status now appears beside drafts 2016-02-04 14:14:24 -08:00
thread-list-icon.cjsx feat(tooltip): use native tooltip style 2015-10-21 11:27:57 -07:00
thread-list-participants.cjsx fix(contact): Converge on displayName(), don't show account label in ThreadList. Fixes #1157 2016-02-01 19:12:06 -08:00
thread-list-quick-actions.cjsx fix(gmail-labels): Constraint so threads always belong to all,spam or trash 2016-03-10 14:13:31 -08:00
thread-list-scroll-tooltip.cjsx feat(selection): Add new display for selection count + update toolbar 2016-03-21 12:20:11 -07:00
thread-list-store.coffee feat(selection): Add new display for selection count + update toolbar 2016-03-21 12:20:11 -07:00
thread-list-toolbar.jsx feat(selection): Add new display for selection count + update toolbar 2016-03-21 12:20:11 -07:00
thread-list.cjsx feat(selection): Add new display for selection count + update toolbar 2016-03-21 12:20:11 -07:00
thread-toolbar-buttons.cjsx feat(selection): Add new display for selection count + update toolbar 2016-03-21 12:20:11 -07:00