Commit graph

1261 commits

Author SHA1 Message Date
Ben Gotow
cb4d3f2e39 fix(drafts): Reveal or focus windows for drafts when already open
Fixes T3883
2015-10-22 16:02:25 -07:00
Ben Gotow
a3dbab332e fix(win): When windows are removed, keep ivars in sync 2015-10-22 15:57:34 -07:00
Ben Gotow
e0ddfb736d fix(*): Packages => Plugins in a few more places
Resolves T4289
2015-10-22 14:55:30 -07:00
Ben Gotow
299a578549 bump(version): 0.3.18 2015-10-22 14:24:13 -07:00
Evan Morikawa
ef8e7aaf51 fix(databse): fix memory leak on DatabaseStore.atomically
Summary:
The Promise chain we were creating was never cleared and created a memory
leak. We instead use a `PromiseQueue` to cleanup finished promises.

Also added several more tests and verified that the memory leak is gone
with the Chrome profiler

Test Plan: new tests

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2184
2015-10-22 14:19:39 -07:00
Evan Morikawa
cfb4142471 fix(event): remove EventStore
Summary:
The EventStore was really doing nothing, except caching hundreds of MB of
event data unnecessarily in each and every window :(

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2187
2015-10-22 14:14:58 -07:00
Evan Morikawa
c5b9f6a634 fix(spec): fix contact store spec
Since it's not Promise-based anymore. It was just the spec that relied on
this.
2015-10-22 14:13:51 -07:00
Evan Morikawa
4b217ea736 fix(memory): don't return Promise to debounce in ContactStore
Prevents a memory leak where it holds onto a stale references of the
contactCache
2015-10-22 14:10:49 -07:00
Ben Gotow
334830d6e1 fix(feedback): Links should open in the user's default browser 2015-10-22 11:34:51 -07:00
Ben Gotow
e69da22e5e feat(sidebar): Hierarchical folders/labels in the sidebar, rendering perf
Summary:
Fix label sorting... apparently we just synced them in creation date order

Allow labels / folders to be nested using separators `.`, `/`, and `\`

Allow collapsing of nested labels in sidebar

Add overflow hidden to some core flexboxes, which dramatically reduces repaints because it knows columns will not overflow into other columns

Prevent scroll region contents from re-rendering all the time, not sure why this works

Add test for account sidebar store

Test Plan: Run new test of AccountSidebarStore

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2181
2015-10-22 10:53:57 -07:00
Ben Gotow
f3c4c04d00 fix(onboarding): Correct error where token pane is too small 2015-10-22 10:32:20 -07:00
Madhu GB
fc01b1bc56 A pixel cut in floating-toolbar 2015-10-22 11:18:55 +05:30
Evan Morikawa
54837b3ab8 fix(lint): fix indentation linter error 2015-10-21 20:39:05 -07:00
Evan Morikawa
b76fd0e578 feat(windows): improve UI for Windows
Remove rounded corners and gradients
2015-10-21 20:32:33 -07:00
Evan Morikawa
1516e3fb8c feat(windows): upgarade preferences UI on Windows 2015-10-21 17:28:52 -07:00
Ben Gotow
a1995fc505 fix(empty-state): Subpixel animation via translate3d 2015-10-21 14:52:50 -07:00
Ben Gotow
1de7f36361 Merge pull request #109 from NSHenry/master
feat(onboarding): Optional eas_server_host field for Exchange auth
2015-10-21 14:38:17 -07:00
Ben Gotow
6f587d6d98 rm(metadata): MetadataStore is not in use, should be rebuilt
Resolves a request that happens whenver the user starts the app, reported in #108
2015-10-21 14:30:33 -07:00
Ben Gotow
edaa07dfee fix(account-switcher): Chevron icon was upside-down 2015-10-21 14:12:27 -07:00
Ben Gotow
98dca29b49 fix(atom-window): Main window should exit fullscreen when "closed"
Fixes issue #69
2015-10-21 14:07:44 -07:00
Ben Gotow
deb8f03864 Merge pull request #113 from agudulin/master
style(*): Add styles for <select> elements, override system defaults
2015-10-21 13:56:16 -07:00
Ben Gotow
c5cdbc1993 fix(uploads): Display error when uploading >25MB files
Fixes GitHub issue #102
2015-10-21 12:29:07 -07:00
Evan Morikawa
7969ed14c8 feat(win32): improve button styles for Win 8.1 spec 2015-10-21 12:17:34 -07:00
Ben Gotow
eba7c62787 fix(category): Consolidate logic around "archive" vs" all" 2015-10-21 11:58:06 -07:00
Ben Gotow
3452129738 fix(art): Correct "Trash" icon, naming consistency 2015-10-21 11:58:05 -07:00
Alexander Gudulin
0503be59a5 Revert back container width, fix controls align 2015-10-21 21:52:04 +03:00
Evan Morikawa
6c0370d7a8 feat(tooltip): use native tooltip style 2015-10-21 11:27:57 -07:00
Alexander Gudulin
1de28f670b Setup styles for dropdown (select) control 2015-10-21 21:27:53 +03:00
Ben Gotow
2878133a09 fix(tasks): SyncbackCategory does not need organizationUnit 2015-10-21 11:07:08 -07:00
Ben Gotow
81008e70bb fix(specs): Unbreak tests for CategoryPicker 2015-10-21 10:57:42 -07:00
Ben Gotow
e09d3e3e75 feat(trash): Trash for Gmail, and architectural changes for common tasks
Summary:
This diff centralizes logic for creating common tasks for things like moving to trash, archive, etc. TaskFactory exposes a set of convenience methods and hides the whole "and also remove the current label" business from the user.

This diff also formally separates the concept of "moving to trash" and "archiving" so that "remove" isn't used in an unclear way.

I also refactored where selection is managed. Previously you'd fire some action like archiveSelection and it'd clear the selection, but if you selected some items and used another method to archive a few, they were still selected. The selection is now bound to the ModelView as intended, so if items are removed from the modelView, they are removed from it's attached selection. This means that it shouldn't /technically/ be possible to have selected items which are not in view.

I haven't refactored the tests yet. They are likely broken...

Fix next/prev logic

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2157
2015-10-21 10:38:00 -07:00
Ben Gotow
fc252673ab fix(toolbars): Cross disolve toolbar items on a one-off basis
Summary:
This diff removes the timeout transition group from the sheet-toolbar, which was causing toolbar items to fade when columns were opened / closed and they were moved from column to column.

Instead, I'm just animating the message toolbar items, which are one of the few sets of toolbar items that really should fade, and do so as an entire set.

I've also renamed the "sheet-toolbar" animation to "opacity-125ms". I think it'd be cool to create a standard set of these animations, but I didn't see any others it would make sense to create generic names for yet. (The others have weird timings or are bound up inside packages).

Resolves Github #90

Test Plan: No new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2159
2015-10-21 10:34:14 -07:00
Evan Morikawa
092c28d2c0 fix(tasks): don't continue if dependent task fails
Summary:
Fixes T4291

If I made a final edit to a pre-existing draft and sent, we'd queue a
`SyncbackDraftTask` before a `SendDraftTask`. This is important because
since we have a valid draft `server_id`, the `SendDraftTask` will send by
server_id, not by POSTing the whole body.

If the `SyncbackDraftTask` fails, then we had a very serious issue whereby
the `SendDraftTask` would keep on sending. Unfortunately the server never
got the latest changes and sent the wrong version of the draft. This
incorrect version would show up later when the `/send` endpoint returned
the message that got actually sent.

The solution was to make any queued `SendDraftTask` fail if a dependent
`SyncbackDraftTask` failed.

This meant we needed to make the requirements for `shouldWaitForTask`
stricter, and block if tasks failed.

Unfortunatley there was no infrastructure in place to do this.

The first change was to change `shouldWaitForTask` to `isDependentTask`.
If we're going to fail when a dependent task fails, I wanted the method
name to reflect this.

Now, if a dependent task fails, we recursively check the dependency tree
(and check for cycles) and `dequeue` anything that needed that to succeed.

I chose `dequeue` as the default action because it seemed as though all
current uses of `shouldWaitForTask` really should bail if their
dependencies fail. It's possible you don't want your task dequeued in this
dependency case. You can return the special `Task.DO_NOT_DEQUEUE_ME`
constant from the `onDependentTaskError` method.

When a task gets dequeued because of the reason above, the
`onDependentTaskError` callback gets fired. This gives tasks like the
`SendDraftTask` a chance to notify the user that it bailed. Not all tasks
need to notify.

The next big issue was a better way to determine if a task truely errored
to the point that we need to dequeue dependencies. In the Developer Status
area we were showing tasks that had errored as "Green" because we caught
the error and resolved with `Task.Status.Finished`. This used to be fine
since nothing life-or-death cared if a task errored or not. Now that it
might cause abortions down the line, we needed a more robust method then
this.

For one I changed `Task.Status.Finished` to a variety of finish types
including `Task.Status.Success`. The way you "error" out is to `throw` or
`Promise.reject` an `Error` object from the `performRemote` method. This
allows us to propagate API errors up, and acts as a safety net that can
catch any malformed code or unexpected responses.

The developer bar now shows a much richer set of statuses instead of a
binary one, which was REALLY helpful in debugging this. We also record
when a Task got dequeued because of the conditions introduced here.

Once all this was working we still had an issue of sending old drafts.

If after a `SyncbackDraftTask` failed, now we'd block the send and notify
the users as such. However, if we tried to send again, there was a
separate issue whereby we wouldn't queue another `SyncbackDraftTask` to
update the server with the latest information. Since our changes were
persisted to the DB, we thought we had no changes, and therefore didn't
need to queue a `SyncbackDraftTask`.

The fix to this is to always force the creation of a `SyncbackDraftTask`
before send regardless of the state of the `DraftStoreProxy`.

Test Plan: new tests. Lots of manual testing

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg

Maniphest Tasks: T4291

Differential Revision: https://phab.nylas.com/D2156
2015-10-21 10:33:43 -07:00
Ben Gotow
87f867c9d4 Merge pull request #112 from ryanpcmcquen/patch-1
fix(validation): Allow for TLDs that are more than 4 characters
2015-10-21 10:25:31 -07:00
Ryan P.C. McQuen
895b77a515 fix email validation
fixes https://github.com/nylas/N1/issues/111
2015-10-21 10:04:22 -07:00
Nate Henry
57b608e464 Added eas_server_host field
eas_server_host field added to allow for specifying the Exchange server
if necessary.
2015-10-21 11:33:11 -04:00
Ben Gotow
68323f05f7 ci(mac): Rename the app Nylas N1 on the Mac 2015-10-20 18:36:39 -07:00
Ben Gotow
e12ab4f753 ci(win): N1.exe => N1Setup.exe (it's an installer) 2015-10-20 17:34:35 -07:00
Ben Gotow
86bae4f239 bump(version): 0.3.17 2015-10-20 15:06:36 -07:00
Ben Gotow
2a9b5b7ea1 ci(mac): Fix zip creation and upload for updater 2015-10-20 14:24:51 -07:00
Ben Gotow
f76408fc24 ci(*): mkrpm only works on Fedora build machines, need to configure one 2015-10-20 13:43:12 -07:00
Ben Gotow
4fe56077bd ci(*): Use publish-nylas-build on Linux 2015-10-20 13:31:09 -07:00
Ben Gotow
50469e487d ci(*): Put builds in /version/platform/arch 2015-10-19 18:44:58 -07:00
Ben Gotow
1399685415 ci(*): Put builds in subdirectories, better for Squirrel.Win 2015-10-16 17:06:09 -07:00
Ben Gotow
31e0c570cf ci(*): Prevent external folks from posting to slack 2015-10-16 15:46:09 -07:00
Ben Gotow
84a8b4f98f ci(*): Fix Mac build filenames, zip uploads 2015-10-16 15:26:23 -07:00
Ben Gotow
584da13788 ci(*): Put the commit hashes back in release filenames 2015-10-16 14:01:29 -07:00
Ben Gotow
9cae62dc63 ci(win): Fix build tasks to enable windows CI builds 2015-10-15 17:54:09 -07:00
Ben Gotow
0084306a69 fix(thread-list): stop thread-icons from shrinking, justify participants explicitly 2015-10-14 18:05:29 -07:00
Ben Gotow
31991d370e fix(config): new mail sounds on by default, change config keypath
unread-notifications.sounds => core.notifications.sounds
2015-10-14 17:11:36 -07:00