Mailspring/internal_packages/composer
Juan Tejada 05bb03bae1 fix(mail-merge/preview): Don't unmount components when toggling preview
Summary:
See edgehill revision: https://phab.nylas.com/D3160

- CustomContenteditableComponents.get now takes a single component to register as an overlaid component, and this component will be passed a prop `{isPreview: true}` when it is meant to be rendered as a preview. Update scheduler and mail-merge to use this new api.

- This prevents the mail merge state from being incorrectly updated when we toggled preview mode -- previously, it believed that the tokens had been unmounted when toggling preview, so they were incorrectly removed from the mail merge state.

- Additionally, makes sure that tokens are correctly added to the mail merge state whenever a token is rendered via componentDidMount -- previously, we only added the token to state when a token was dropped on the contenteditable, however, a token might be pasted or an anchor node might be added by any other means, in which case we want the mail merge state to reflect that. (Adds docs about this)

Test Plan: Manual

Reviewers: jackie, evan

Reviewed By: jackie, evan

Differential Revision: https://phab.nylas.com/D3161
2016-08-16 13:21:41 -07:00
..
keymaps fix(keymaps): "Delete" => "Del" to fix keycode 46 2016-05-04 09:29:42 -07:00
lib add(composer): Turn emails into mailto for debugging purposes 2016-08-12 16:06:22 -07:00
spec fix(quoted-text): Check that message is reply 2016-07-21 17:45:47 -07:00
stylesheets fix(mail-merge/preview): Don't unmount components when toggling preview 2016-08-16 13:21:41 -07:00
.bowerrc fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
.gitignore fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
package.json feat(win): faster popout windows 2016-04-22 13:30:42 -07:00
README.md fix(drafts): Rename files inbox-composer =>composer 2015-02-03 17:16:25 -08:00

composer package