Mailspring/internal_packages
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
..
account-sidebar fix(fakt): Switch to otf fonts with correct baseline, remove hacky styles 2015-06-03 11:07:59 -07:00
attachments fix(naming): Move atom/inbox/nilas refs to Nylas 2015-05-15 11:07:28 -07:00
calendar-bar refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
composer fix(*): Resolve a variety of small and simple bugs 2015-06-05 11:02:44 -07:00
developer-bar fix(asar): Support ASAR, and running of specs in prod builds 2015-05-21 14:41:30 -07:00
file-list feature(package-management): Package management interface, APM integration 2015-06-02 19:04:21 -07:00
inbox-contact-elements refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
message-list fix(draft-speed): Optimize draft creation and reduce scroll / focus delays 2015-06-05 11:38:30 -07:00
message-templates fix(*): Resolve a variety of small and simple bugs 2015-06-05 11:02:44 -07:00
mode-switch refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
notification-mailto refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
notification-update-available fix(notifications): Give notifications tag like HTML5 Notifications so you can de-dupe 2015-05-25 10:27:36 -07:00
notifications feature(package-management): Package management interface, APM integration 2015-06-02 19:04:21 -07:00
onboarding feat(*): draft icon, misc fixes, and WorkspaceStore / custom toolbar in secondary windows 2015-06-03 16:02:19 -07:00
search-bar fix(fakt): Switch to otf fonts with correct baseline, remove hacky styles 2015-06-03 11:07:59 -07:00
settings feature(package-management): Package management interface, APM integration 2015-06-02 19:04:21 -07:00
sidebar-fullcontact update linter to look at all less files 2015-05-21 14:50:40 -07:00
sidebar-inbox-internal update linter to look at all less files 2015-05-21 14:50:40 -07:00
thread-list feat(*): draft icon, misc fixes, and WorkspaceStore / custom toolbar in secondary windows 2015-06-03 16:02:19 -07:00
today fix(fakt): Switch to otf fonts with correct baseline, remove hacky styles 2015-06-03 11:07:59 -07:00
tooltip update linter to look at all less files 2015-05-21 14:50:40 -07:00
ui-dark fix(build): Temporarily disable 'Task' tests Jenkins can't run, and avoid empty ui-variables files 2015-06-03 12:04:43 -07:00
ui-light fix(build): Temporarily disable 'Task' tests Jenkins can't run, and avoid empty ui-variables files 2015-06-03 12:04:43 -07:00
unread-badge fix(*): Resolve a variety of small and simple bugs 2015-06-05 11:02:44 -07:00
unread-notifications feat(*): draft icon, misc fixes, and WorkspaceStore / custom toolbar in secondary windows 2015-06-03 16:02:19 -07:00