Commit graph

780 commits

Author SHA1 Message Date
Ben Gotow
a0aaadd91f fix(file-uploads): Critical fix to bad method call to session.draft instead of session.draft() 2015-08-30 20:18:05 -07:00
Ben Gotow
873c9379f4 fix(file-uploads): Do not store the draft session and draft during upload 2015-08-30 20:17:16 -07:00
Evan Morikawa
a0307d4d88 fix(uploads): no more from picker & uploads use correct accountId
Test Plan: edgehill --test

Reviewers: dillon, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1955
2015-08-28 20:35:43 -04:00
Evan Morikawa
e639afae1e fix(undo): properly scope composer keymappings for undo/redo
Summary: Properly scopes undo & redo key bindings to the composer

Test Plan: manual

Reviewers: dillon, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3446

Differential Revision: https://phab.nylas.com/D1951
2015-08-28 18:59:00 -04:00
Ben Gotow
d0dcfb8359 fix(keyboard-cursor): Recent optimization broke keyboard cursor advancing fast 2015-08-28 14:34:56 -07:00
Ben Gotow
11dab9095a fix(loading): Add nice text to our new loader 2015-08-28 14:24:17 -07:00
Evan Morikawa
7ad227cd9a fix(spec): Stub correct method 2015-08-28 16:37:09 -04:00
Evan Morikawa
3908ba402d feat(sync): Resume sync worker action from sidebar 2015-08-28 16:24:39 -04:00
Ben Gotow
944d6a8e1e fix(send-draft): Update the draft rather so it's clientId is maintained, even if the ID has changed on send 2015-08-28 13:19:09 -07:00
Ben Gotow
3626beb294 fix(nylas-api): When receiving models, ignore changes that would make non-drafts into drafts 2015-08-28 13:04:40 -07:00
Ben Gotow
9247a41292 fix(specs): Future specs should stub DatabaseStore.run, not find/findBy 2015-08-28 12:41:56 -07:00
Ben Gotow
5e0ef3946c fix(atom): Put displayWindow back - it's used in other places 2015-08-28 12:25:48 -07:00
Ben Gotow
08da848c34 fix(message-list): Use clientIds within the message-list for scrolling, etc. since IDs may change 2015-08-28 12:25:48 -07:00
Ben Gotow
912075a6f9 fix(model-observation): Watch for changes to objects with matching clientIds, since server id may be assigned 2015-08-28 12:25:48 -07:00
Ben Gotow
82f0ffd13c fix(sending): Since we have a unique index on clientId, no need to delete draft after sending 2015-08-28 12:25:48 -07:00
Evan Morikawa
a0e64bf580 refactor(packages): Remove Edgeforce 2015-08-28 15:16:32 -04:00
Evan Morikawa
700ade2936 fix(database): report if database errors on setup 2015-08-28 14:44:40 -04:00
Ben Gotow
3e435fc5a5 fix(draft): Always retrieve draft body when using clientId 2015-08-28 11:43:30 -07:00
Ben Gotow
7190ca69f7 refactor(db): change ID system to have clientIDs and serverIDs
Summary: Major ID refactor

Test Plan: edgehill --test

Reviewers: bengotow, dillon

Differential Revision: https://phab.nylas.com/D1946
2015-08-28 11:24:29 -07:00
Ben Gotow
1a576d92dc feat(work): Create the "Work" window, move TaskQueue, Nylas sync workers
Summary:
Move sync workers and Edgehill token checks to work window

Move the task queue and database setup to the work window

Move ContactStore background refresh to work window

Store the task queue in the database

WIP

The TaskQueue now puts tasks in the database instead of in a file, which also means it can be observed

Move all delta sync and initial sync to a package, make NylasSyncStore which exposes read-only sync state

DraftStore no longer reads task status. Once you set the "sending" bit on a draft, it never gets unset. But that's fine actually.

If your package lists windowTypes, you *only* get loaded in those windowTypes. If you specify no windowTypes, you get loaded in the root window.

This means that onboarding, worker-ui, worker-sync, etc. no longer get loaded into the main window

ActivitySidebar has a special little store that observes the task queue since it's no longer in the window

Move "toggle component regions" / "toggle react remote" to the Developer menu

Move sync worker specs, update draft store specs to not rely on TaskQueue at all

Test Plan: Run existing tests, all pass

Reviewers: dillon, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1936
2015-08-27 16:39:40 -07:00
Ben Gotow
41a3529f16 fix(perf): Apply accountId to more queries, always run query plans in dev mode to flag SCANs 2015-08-26 14:10:28 -07:00
Ben Gotow
f33035cfc3 fix(change-mail-task): Ignore 404s when changing mail so that we don't attempt to roll back and re-create purged objects + spec 2015-08-26 11:54:03 -07:00
Ben Gotow
91774668eb fix(delta-sync): Properly look up model types, add specs for all this logic
Summary: Emergency fix for broken logic consuming delta updates. Also includes specs for untested functionality.

Test Plan: Run new tests

Reviewers: dillon, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1939
2015-08-26 11:43:10 -07:00
Ben Gotow
6670d10ee4 fix(T3427): Trying to deserialize dropped contacts using the registry fails because they were not serialized with the registry
Summary:
Fixes T3427

Use the more generic serialize registered objects instead of the DatabaseObjectRegistry directly.

Fix a bug in the serialize function that was preventing it from inflating the top level object if it had a constructorName.

Remove contact checks because tokenizing-test-field is generic. Participant text field checks type.

Hot new drag and drop integration test

Test Plan: Run new test (<3 react)

Reviewers: dillon, evan

Reviewed By: dillon, evan

Maniphest Tasks: T3427

Differential Revision: https://phab.nylas.com/D1933
2015-08-26 10:07:23 -07:00
Ben Gotow
9146df086e fix(before-unload): When drafts are present, we do not resume quit properly after committing changes
Summary:
We designed the onBeforeUnload handler to resume a "close window" event, but it actually needs to resume a quit as well. This has become an issue recently and may be due to the DraftStore sessions not being removed from the DraftStore.

To test: Create a popout draft, close it, and then try to quit the app.

Test Plan: Run updated tests

Reviewers: dillon, evan

Reviewed By: dillon, evan

Differential Revision: https://phab.nylas.com/D1932
2015-08-26 10:00:20 -07:00
Ben Gotow
1b67728033 fix(draft-list): Only parse the first 400 characters of HTML to create plaintext snippet
It's possible that 400 characters isn't enough to get any plaintext (if the body begins with a style tag, for example.) Until we get a better solution in place, we need to do this to avoid parsing the king james bible in my draft.
2015-08-25 16:08:16 -07:00
Ben Gotow
6c407f2f1c fix(config): Apply config change from Atom, process locking
Summary:
d1c44dcb54

Also lock config across processes to prevent the user from being logged out when the main process reads config before it's finished writing. This is what is causing the login window to appear.

Test Plan: Rapidly tap between the two display modes. Note that it no longer reverts to the wrong one intermittently.

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1931
2015-08-25 16:00:09 -07:00
Ben Gotow
e65c078cf3 fix(composer): Show From: when replyToMessageId is null 2015-08-25 12:23:48 -07:00
Ben Gotow
0330dbbc22 fix(draft-account-switching): Need to totally delete draft threadId and replyToMessageId 2015-08-25 12:23:27 -07:00
Ben Gotow
2c6e3c4db5 fix(sentry-2518): Better debugging information for when token is not found 2015-08-25 11:49:51 -07:00
Ben Gotow
27181d177e fix(sentry-2523): Console.warning is not a method 2015-08-25 11:45:07 -07:00
Ben Gotow
9dd04223d9 fix(less): Put pointer back on composer toolbar 2015-08-25 11:35:37 -07:00
Ben Gotow
c1cf4445df fix(mixpanel): Correctly associate events with distinct_ids 2015-08-25 11:33:36 -07:00
Evan Morikawa
ff1b41a154 bump(version): 0.3.1 2015-08-25 14:03:27 -04:00
Evan Morikawa
462e7e1dae fix(composer): display tooltip controls 2015-08-25 14:01:24 -04:00
Ben Gotow
7aedb9d22a downgrade(electron): Also fix less issue on Linux 2015-08-24 18:55:40 -07:00
Ben Gotow
a5d67e4984 bump(version): 0.3.0
- Multiple account support!
   + Known issue: Unread badge shows only currnetly selected account
   + Known issue: Canceling add account flow quits the app

- You can now create bullets and lists in the composer

- Fix for mail sent yesterday appearing to be sent "now"

- Third-party plugins can now define tasks and database models
2015-08-24 18:14:00 -07:00
Ben Gotow
7c09e77305 temp(composer): Do not allow user to switch accounts if files have been attached to draft 2015-08-24 17:39:41 -07:00
Ben Gotow
78a02ad52c fix(button-dropdown): Broken styles on reply/reply-all button dropdown 2015-08-24 17:31:03 -07:00
Ben Gotow
2e1e485051 fix(database): Allow findVersions to be called with more than 250 items 2015-08-24 14:01:31 -07:00
Ben Gotow
fd7722bc1a fix(build-flow): Add missing resolve statement 2015-08-24 11:06:54 -07:00
Ben Gotow
e4b8db16f4 fix(task-queue): Rename the task queue file to avoid upgrade issues 2015-08-24 10:51:50 -07:00
Ben Gotow
2d256fa00a fix(build-flow): More minor tweaks to applescript runner 2015-08-24 10:47:43 -07:00
Ben Gotow
d5b07511db fix(add-account): Don't check for tokens from secondary windows 2015-08-21 18:23:24 -07:00
Ben Gotow
fdcbeb638f fix(build-flow): Undefined call to getVersion 2015-08-21 16:51:59 -07:00
Ben Gotow
0c57108ff2 fix(object-serialization): Constrain use of __constructorName, fix infinite recursion, remove hackiness 2015-08-21 16:08:24 -07:00
Ben Gotow
81d2edcaf9 feat(accounts): Kill namespaces, long live accounts
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
2015-08-21 15:29:58 -07:00
dillon
698e8a2367 fix(message-sidebar): remove faulty component. fixes T2391.
Summary: I'm proposing this patch as a temp fix for this issue. Desired functionality should probably be defined before adding more code.

Test Plan: Attempting to test manually... can't get my runtime edgehill to propagate these changes tho :(

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2391

Differential Revision: https://phab.nylas.com/D1911
2015-08-21 10:45:07 -07:00
Evan Morikawa
23c8466fe0 fix(message): update MessageBodyProcess to key on message version 2015-08-20 16:44:13 -07:00
Evan Morikawa
e2af724fa2 fix(thread): fix bug whereby thread list blows up if no "from" 2015-08-20 16:21:47 -07:00