Mailspring/internal_packages/composer/lib
Evan Morikawa c9ea5b6483 feat(scheduler): Add Overlaid Components
Summary:
SEE ASSOCIATED SUBMODULE DIFF

This enables rich React components (like the Scheduler's `NewEventCard`)
to be used in contenteditables.

We introduce the concept of an "Overlaid Component". These are rendered
React components that are absolutely positioned on top of an equivalent
"Anchor" in a contenteditable.

Inside the contenteditable are special `<img />` tags that have an
id corresponding to a particular rich overlaid component. This way, even
if those img tags are cut and pasted or moved, they'll have a mapping to a
  particular component stored in the `OverlaidComponentStore`. Img tags
  are fairly well handled natively by contenteditable and allow you to
  maniuplate these overlaid components as normal text elements.

The `OverlaidComponentStore` is responsible for listening to and managing
the state of the Anchors and their equivalent OverlaidComponents.

We use a decorator called `ListenToChanges` that allows us to wrap
components to update their corresponding anchor. Since we need to know
about ALL changes that could affect rendered height and width, we need to
use a `MuatationListener` instead of the React render cycle.

This is only the initial diff. There are several TODOs here:
https://paper.dropbox.com/doc/Composer-Overlaid-Components-FoZrF0cFggzSUZirZ9MNo

Test Plan: TODO. Manual

Reviewers: juan, bengotow

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2946
2016-05-24 15:47:49 -07:00
..
account-contact-field.jsx fix(lint): final linter fixes 2016-05-06 16:32:34 -07:00
action-bar-plugins.jsx fix(send-later): Check if draft is valid before scheduling send later 2016-05-19 13:28:28 -07:00
collapsed-participants.jsx fix(lint): final linter fixes 2016-05-06 16:32:34 -07:00
compose-button.jsx fix(lint): final linter fixes 2016-05-06 16:32:34 -07:00
composer-editor.jsx fix(undo): Move undo/redo to session, properly undo all changes 2016-05-24 11:48:33 -07:00
composer-header-actions.jsx fix(lint): final linter fixes 2016-05-06 16:32:34 -07:00
composer-header.jsx fix(mail-merge): Pass session to injected subject 2016-05-13 16:01:12 -07:00
composer-view.jsx feat(scheduler): Add Overlaid Components 2016-05-24 15:47:49 -07:00
fields.es6 fix(lint): Various linter fixes 2016-05-06 16:23:48 -07:00
file-upload.jsx fix(focus): Remove focusedField in favor of imperative focus, break apart ComposerView 2016-04-04 15:22:01 -07:00
image-file-upload.jsx fix(lint): final linter fixes 2016-05-06 16:32:34 -07:00
main.es6 feat(scheduler): Add Overlaid Components 2016-05-24 15:47:49 -07:00
send-action-button.jsx fix(lint): final linter fixes 2016-05-06 16:32:34 -07:00
subject-text-field.jsx feat(mail-merge): Add ability to drop tokens in subject 2016-05-12 10:47:41 -07:00