Mailspring/internal_packages/message-list/lib
Ben Gotow ded4da1505 fix(draft-speed): Optimize draft creation and reduce scroll / focus delays
Summary:
This diff attempts to improve the responsiveness of the app when you hit "Reply". This is achieved by being smarter about creating the draft and loading it into the draft store, and also by allowing the compose* actions to take objects instead of just IDs (resulting in a fetch of the object).

Allow Actions.composeReply,etc. to optionally be called with thread and message objects instead of IDs. This prevents a database lookup and the data is "right there."

Create DraftStoreProxy for new drafts optimistically—this allows us to hand it the draft model we just created and it doesn't have to go query for it

When we create a new Draft, immediately bind it to a LocalId. This means that when the MessageStore receives the trigger() event from the Database, it doesn't have to wait while a localId is created

When MessageStore sees a new Message come in which is on the current thread, a draft, and not in the localIds map, assume it's a new draft and shortcut fetchFromCaceh to manually add it to the items array and display. This means the user sees the...

...draft instantly.

Remove delays from focusing draft, scrolling to draft after content is ready. I actually removed these thinking it would break something, and it didn't break anything.... Maybe new Chromium handles better?

Fix specs

Test Plan: Run specs - more in progress right now

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1598
2015-06-05 11:38:30 -07:00
..
email-frame.cjsx fix(fakt): Switch to otf fonts with correct baseline, remove hacky styles 2015-06-03 11:07:59 -07:00
main.cjsx fix(naming): Move atom/inbox/nilas refs to Nylas 2015-05-15 11:07:28 -07:00
message-item.cjsx fix(draft-speed): Optimize draft creation and reduce scroll / focus delays 2015-06-05 11:38:30 -07:00
message-list.cjsx fix(draft-speed): Optimize draft creation and reduce scroll / focus delays 2015-06-05 11:38:30 -07:00
message-participants.cjsx refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
message-subject-item.cjsx refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
message-timestamp.cjsx fix(*): Resolve a variety of small and simple bugs 2015-06-05 11:02:44 -07:00
message-toolbar-items.cjsx feat(*): draft icon, misc fixes, and WorkspaceStore / custom toolbar in secondary windows 2015-06-03 16:02:19 -07:00
sidebar-thread-participants.cjsx refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
thread-archive-button.cjsx refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
thread-tags-button.cjsx refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00