Summary:
- WIP: Need to fix tests and some errors!
- Refactors Category class to hold information about its type
- Refactors CategoryStore to rely on observables instead of local caches
- Adds and updates Observables and helpers
- Refactors ContactStore to hold entire cache of contacts instead of per
current account
- Same for ContactRankingStore and other stores
- Refactors method names for AccountStore + some helpers
- Updates MailViewFilter to hold an account
- Adds basic Unified filter
- Replaces AccountStore.current calls with either:
- The account of the currently focused MailViewFilter
- The account associated with a thread, message, file, etc...
- A parameter to be passed in
- Arbitrarily, the first account in the AccountsStore
Test Plan: - Unit tests
Reviewers: evan, bengotow
Differential Revision: https://phab.nylas.com/D2423
Summary:
Until now, we've been hiding transactions beneath the surface. When you call persistModel, you're implicitly creating a transaction.
You could explicitly create them with `atomically`..., but there were several critical problems that are fixed in this diff:
- Calling persistModel / unpersistModel within a transaction could cause the DatabaseStore to trigger. This could result in other parts of the app making queries /during/
the transaction, potentially before the COMMIT occurred and saved the changes. The new, explicit inTransaction syntax holds all changes until after COMMIT and then triggers.
- Calling atomically and then calling persistModel inside that resulted in us having to check whether a transaction was present and was gross.
- Many parts of the code ran extensive logic inside a promise chained within `atomically`:
BAD:
```
DatabaseStore.atomically =>
DatabaseStore.persistModel(draft) =>
GoMakeANetworkRequestThatReturnsAPromise
```
OVERWHELMINGLY BETTER:
```
DatabaseStore.inTransaction (t) =>
t.persistModel(draft)
.then =>
GoMakeANetworkRequestThatReturnsAPromise
```
Having explicit transactions also puts us on equal footing with Sequelize and other ORMs. Note that you /have/ to call DatabaseStore.inTransaction (t) =>. There is no other way to access the methods that let you alter the database. :-)
Other changes:
- This diff removes Message.labels and the Message-Labels table. We weren't using Message-level labels anywhere, and the table could grow very large.
- This diff changes the page size during initial sync from 250 => 200 in an effort to make transactions a bit faster.
Test Plan: Run tests!
Reviewers: juan, evan
Reviewed By: juan, evan
Differential Revision: https://phab.nylas.com/D2353
Electron 0.35.1 includes the tray fixes we contributed last week but also includes API restructuring and improvements. Most importantly, modules from electron are now imported via `require('electron')`
Summary: Also enhancements to the developer toolbar
Test Plan: edgehill --test
Reviewers: dillon, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D1976
Summary:
This diff replaces the Namespace object with the Account object, and changes all references to namespace_id => account_id, etc. The endpoints are now `/threads` instead of `/n/<id>/threads`.
This diff also adds preliminary support for multiple accounts. When you log in, we now log you in to all the attached accounts on edgehill server. From the preferences panel, you can auth with / unlink additional accounts. Shockingly, this all seems to pretty much work.
When replying to a thread, you cannot switch from addresses. However, when creating a new message in a popout composer, you can change the from address and the SaveDraftTask will delete/re-root the draft on the new account.
Search bar doesn't need to do full refresh on clear if it never committed
Allow drafts to be switched to a different account when not in reply to an existing thread
Fix edge case where ChangeMailTask throws exception if no models are modified during performLocal
Show many dots for many accounts in long polling status bar
add/remove accounts from prefs
Spec fixes!
Test Plan: Run tests, none broken!
Reviewers: evan, dillon
Reviewed By: evan, dillon
Differential Revision: https://phab.nylas.com/D1928
Summary:
Things still to come:
- General tab
- Signatures tab (potentially remove and land)
Adding emacs things to gitignore
Adding progress. iterating on html/css is incredibly painful
Added layout for accounts page.
Adding layout for appearance page
layout for shortcuts preferences page
adding layount for notifications menu
Adding signatures layout
WIP
WIP - tab switching, accounts tab
WIP ALL THE THINGS
Keymap template support (Gmail / outlook, etc.)
Test Plan: No tests atm
Reviewers: evan
Differential Revision: https://phab.nylas.com/D1890
- Message reply dropdown uses new images. Fixes T2355
- New hover actions which are darker. Fixes T2358
- New reply icon in the message footer. Fixes T2359
- Toolbar buttons are the correct height. Fixes T2360
- Thread list selection state changes mail label style
- Removed dead assets
Summary:
If an email is to a group, the reply button should have `To` set the original email sender and `Cc` the group Fixes Phab ticket 2142. Previously, the click on the reply button was not captured unless the click occured on the reply or reply all icon. Changed the span to a div with no padding that captures all clicks
Test Plan: tested manually, unit tests
Reviewers: bengotow
Reviewed By: bengotow
Subscribers: evan
Maniphest Tasks: T2142
Differential Revision: https://phab.nylas.com/D1696
Summary:
Initial message list collapsing
messages can be expanded explicitly
styling message items
composer UI and collapsing
expanding and collapsing headers
style new reply area
adding in message controls
Add message actions dropdown
Test Plan: edgehill --test
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D1664