Commit graph

15 commits

Author SHA1 Message Date
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
Evan Morikawa
b29d5ac75b tests(calendar): adding calendar and scheduler tests
Summary: Adding tests

Test Plan: Tests

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2892
2016-04-19 11:54:15 -07:00
Ben Gotow
c96a5a4d22 💄(scheduler): Would you like => I'd like 2016-04-13 17:48:27 -07:00
Evan Morikawa
c5f4c7305d feat(scheduler): add an event preview when sending a meeting request
Summary: add event preview

Test Plan: manual

Reviewers: bengotow, juan

Differential Revision: https://phab.nylas.com/D2874
2016-04-11 22:45:36 -04:00
Ben Gotow
793b9efae0 fix(scheduler): Don't cast durations to integers, fix 1.5, 2.5 hour blocks 2016-04-11 18:52:49 -07:00
Ben Gotow
24d9157ee5 fix(scheduler): End should work even if the mouse isn't over a time 2016-04-11 18:42:17 -07:00
Ben Gotow
c3fad8cca7 fix(scheduler): Make popover width even so it's not blurry 2016-04-11 18:33:53 -07:00
Evan Morikawa
d24f653e26 fix(scheduler): minor style tweaks to scheduler popover 2016-04-11 19:33:27 -04:00
Evan Morikawa
ceee33eb10 fix(scheduler): fix jumping calendar and add popover
fix(scheduler): fix jumping calendar and add popover

Summary: feat(scheduler): improved calendar picker

Test Plan: manual

Reviewers: bengotow, juan

Differential Revision: https://phab.nylas.com/D2873
2016-04-11 18:23:06 -04:00
Ben Gotow
586d099c23 fix(schedule): Move z-indexes to prevent dropdown layering issue 2016-04-11 14:58:58 -07:00
Ben Gotow
db90db3131 fix(schedule): Use draft session to udpate metadata, always save in syncback 2016-04-11 14:32:54 -07:00
Evan Morikawa
e2e9a72233 fix(scheduler): use proper start and end time formats for when block 2016-04-10 11:44:24 -04:00
Evan Morikawa
42d7aa47b4 fix(scheduler): properly formatting when objects for post 2016-04-09 21:47:52 -04:00
Evan Morikawa
8960009643 fix(scheduler): properly set proposals 2016-04-09 21:25:01 -04:00
Evan Morikawa
8f7b99ee4f refactor(scheduler): move all event data into metadata
Summary: Moved events into metadata. Removed a lot of code

Test Plan: todo

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2866
2016-04-09 21:19:01 -04:00