Mailspring/src/components
Ben Gotow 7452705c31 refactor(composer): Make session, draft available everywhere
Summary:
Up until now, we've been requiring that every plugin control in the composer take the draftClientId, retreive the session, listen to it, build state from the draft, etc. This is a huge pain and is hard to explain to newcomers becaus it frankly makes no sense.

In 0.3.45 we made it so that the ComposerView always has a non-null draft and session. (It isn't rendered until they're available). In this diff, I just pass those through to all the plugins and remove all the session retrieval cruft.

Almost none of the buttons have state of their own, which I think is appropriate.

They do render on every keystroke, but they were already running code (to recompute their state) on each keystroke and profiling suggests this has no impact.

Prepare for immutable

In preparation for Immutable models, make the draft store proxy returns a !== draft if any changes have been made. This means you can safely know that a draft has changed if `props.draft !== nextProps.draft`

Test Plan: Run tests

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D2902
2016-04-19 16:05:15 -07:00
..
contenteditable fix(lists): Commented out during testing, landed accidentally 2016-04-14 14:57:15 -04:00
nylas-calendar tests(calendar): adding calendar and scheduler tests 2016-04-19 11:54:15 -07:00
button-dropdown.cjsx fix(focus): Remove focusedField in favor of imperative focus, break apart ComposerView 2016-04-04 15:22:01 -07:00
config-prop-container.cjsx fix(config): observe fires immediately, causing re-renders 2016-01-29 00:31:10 -08:00
date-input.jsx fix(warning): Check if DateInput has unmounted when clearing state 2016-03-09 13:56:46 -08:00
date-picker.jsx feat(scheduler): add new date & time picker 2016-04-05 18:42:19 -07:00
disclosure-triangle.cjsx add(docs): Add docs for OutlineView and OutlineViewItem 2016-01-28 15:28:15 -08:00
draggable-img.cjsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
drop-zone.cjsx perf(*): Replace _.omit, refresh scrollbar height less often 2016-03-24 15:14:41 -07:00
editable-list.jsx bump(react) 0.14.7 => 15.0.1 2016-04-12 16:58:45 -07:00
empty-list-state.cjsx feat(thread-search): Add spinner to indicate search in progress 2016-04-10 16:20:26 -07:00
evented-iframe.cjsx fix(require): Move more requires to new electron format 2016-04-13 15:35:01 -07:00
fixed-popover.jsx fix(build): FIx linting and react errors and popover spec 2016-03-31 16:10:09 -07:00
flexbox.cjsx fix(scheduler): fix jumping calendar and add popover 2016-04-11 18:23:06 -04:00
flux-container.cjsx perf(*): Replace _.omit, refresh scrollbar height less often 2016-03-24 15:14:41 -07:00
focus-container.cjsx feat(selection): Add new display for selection count + update toolbar 2016-03-21 12:20:11 -07:00
generated-form.cjsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
injected-component-label.cjsx refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
injected-component-set.cjsx perf(*): Replace _.omit, refresh scrollbar height less often 2016-03-24 15:14:41 -07:00
injected-component.cjsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
key-commands-region.cjsx fix(cc/bcc): Make targets bigger, wait longer before declaring focus left 2016-04-06 13:54:39 -07:00
list-data-source.coffee Fix drafts 2016-01-25 16:37:34 -08:00
list-selection.coffee revert(list-selection): Using clientIds had unintended consequences 2016-02-05 10:17:41 -08:00
list-tabular-item.cjsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
list-tabular.cjsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
listens-to-observable.jsx feat(selection): Add new display for selection count + update toolbar 2016-03-21 12:20:11 -07:00
mail-important-icon.cjsx fix(important): Icon does not update from nextProps 2016-02-09 15:02:11 -08:00
mail-label-set.jsx fix(lint): Fix in MailLabelSet 2016-03-10 17:27:51 -08:00
mail-label.cjsx refactor(rip-current-account): Rips out AccountStore.current 2016-01-08 14:22:13 -08:00
menu.cjsx fix(search-bar): Apparently we were not providing keys 2016-04-13 16:08:24 -07:00
metadata-composer-toggle-button.jsx refactor(composer): Make session, draft available everywhere 2016-04-19 16:05:15 -07:00
modal.jsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
multiselect-action-bar.cjsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
multiselect-list-interaction-handler.coffee Unified inbox mailbox perspectives working (sidebar disabled atm) 2016-01-18 00:47:04 -08:00
multiselect-list.cjsx fix(drag): Pass correct drag coordinates from event 2016-04-05 17:59:48 -07:00
multiselect-split-interaction-handler.coffee Unified inbox mailbox perspectives working (sidebar disabled atm) 2016-01-18 00:47:04 -08:00
multiselect-toolbar.jsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
newsletter-signup.cjsx fix(react): Fix several warnings in missing imports 2016-04-05 14:53:37 -07:00
outline-view-item.jsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
outline-view.jsx fix(lint): Fix new eslint rule introduced with babel-eslint upgrade. 2016-02-01 20:07:36 -08:00
participants-text-field.jsx Expose ParticipantsTextField through component kit (#1994) 2016-04-18 16:39:08 -07:00
popover.cjsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
resizable-region.cjsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
retina-img.jsx 🎨(preferences): Updates preferences to look prettier 2016-04-01 14:01:26 -07:00
scenario-editor-models.coffee feat(mail-rules): Per-account mail rules filter incoming, existing mail 2015-12-23 02:19:32 -05:00
scenario-editor-row.cjsx feat(rules): Add "Starred" as an available mail rule filter (#1074) 2016-02-01 13:18:16 -08:00
scenario-editor.cjsx feat(mail-rules): Per-account mail rules filter incoming, existing mail 2015-12-23 02:19:32 -05:00
scroll-region.cjsx fix(mail-rules): all "on" handlers need to be bound functions 2016-04-05 12:01:53 -07:00
scrollbar-ticks.jsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
spinner.cjsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00
swipe-container.jsx fix(swipe): Cache isEnabled: false, fix scrolling in Trash 2016-04-13 14:22:43 -07:00
switch.jsx 🎨(preferences): Updates preferences to look prettier 2016-04-01 14:01:26 -07:00
tab-group-region.cjsx feat(scheduler): add new date & time picker 2016-04-05 18:42:19 -07:00
time-picker.jsx refactor(scheduler): move all event data into metadata 2016-04-09 21:19:01 -04:00
tokenizing-text-field.cjsx fix(focus): Remove focusedField in favor of imperative focus, break apart ComposerView 2016-04-04 15:22:01 -07:00
unsafe-component.cjsx bump(react): 0.13.2 => 0.14.7 2016-03-29 01:43:12 -07:00