Commit graph

181 commits

Author SHA1 Message Date
Evan Morikawa f170d14b8d fix(errors): properly rethrow api error 2016-12-06 17:21:37 -08:00
Evan Morikawa ace9b94053 feat(key): use unified key manager 2016-12-05 17:19:19 -08:00
Ben Gotow ce14e3b12e fix(specs): Fix AccountStore specs 2016-12-01 13:50:31 -08:00
Jackie Luo 8818ad1957 spec(nylas-api): Update tests to use NylasAPIRequest 2016-11-29 16:32:23 -08:00
Juan Tejada 2f116b8181 fix(specs) Fix remaining tests 2016-11-17 15:37:44 -08:00
Evan Morikawa e43de77708 fix(lint): update files to for new linter version 2016-11-15 10:20:39 -08:00
Evan Morikawa 9cde226598 refactor(registry): move all registries into src/registries 2016-11-14 14:01:00 -08:00
Ben Gotow d819479613 fix(mailto): Improve handling of invalid urls 2016-11-07 14:09:47 -08:00
Juan Tejada 189b15e586 feat(attachments): Generate and display thumbnail previews for files (mac only)
Summary: Adds option to view preview thumbnails for attachments. This commit updates the FileDownloadStore to generate file thumbnail previews for attachments via `qlmanage` and displays them in the AttachmentItem component.

Test Plan: Manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D3393
2016-11-02 17:27:53 -07:00
Juan Tejada 5fa379bccf fix(es6): Convert FileDownloadStore to JS 2016-11-01 18:12:24 -07:00
Evan Morikawa 8ab3fba7da fix(es6): fix linter and compile error in es6 conversion 2016-10-28 09:59:41 -04:00
Ben Gotow 8e533a3854 es6(*): Actions, ConfigSchema => ES2016 2016-10-27 18:48:33 -07:00
Ben Gotow 642977126f es6(models): Remaining models => ES2016
# Conflicts:
#	src/flux/models/contact.coffee
2016-10-27 12:08:59 -07:00
Juan Tejada 5d837ffd02 feat(undo-send): Add undo send
Summary:
Add ability to undo send. We decided to make undo send completely client side for a couple of reasons. If we rely on send-later for undo-send, we would be giving /all/ send load to our send-later backend. If this increases the send-later load too much, it might cause delays in the regular send-later functionality and potentially other plugins like snooze that run under the same service. We would also need to rely on the network to be able to cancel a send, which would make it unusable offline or hard to debug if that specific request fails for any given reason.

This commit also refactors the way `ComposerExtension.sendActionConfig` works. The method has been renamed and now must return an array of send actions. Also, all of the business logic to handle different send actions registered by extensions has been pieced apart from the SendActionButton and into a new SendActionStore. This also enables undo send to undo custom send actions registered by extensions.
Along the way, this also fixes a pending TODO to show all registered custom send actions in the preferences for choosing the preferred send action for sending.

Undo send works via a task, so in case N1 closes before send goes through, it will still be persisted to the task queue and restored when opened again. Undoing a send means dequeuing this task.

Test Plan: Manual

Reviewers: jackie, bengotow, halla, evan

Reviewed By: bengotow, halla, evan

Differential Revision: https://phab.nylas.com/D3361
2016-10-26 20:40:10 -07:00
Ben Gotow d6f7984c82 fix(mailto): Support body with \n or \r characters
Related to #2923
2016-10-18 10:37:27 -07:00
Evan Morikawa 854de16e33 Move specs into subfolders 2016-10-16 20:10:19 -07:00
Evan Morikawa 0a23028447 Extract to N1SpecRunner 2016-10-16 20:10:19 -07:00
Ben Gotow ed8b0b222e es6(db): Convert the ORM specs to ES2016 2016-10-14 12:06:07 -07:00
Juan Tejada 3d69ebbabb fix+🎨(notifs): Cleanup, handle nonexistent thread when opening notification
Notifications now check to see the thread they are supposed to open
exists.

Also, clean up FocusedContentStore._onFocus so that it doesn't have the side
effect of dispatching another action and messay logic.
Instead, added Actions.ensureCategoryFocused, to focus any category, and which
should be used separately from focusing content (notifications now use
this action for "opening" the thread)
Also, convert FocusedPerspectiveStore to ES6
2016-10-01 00:08:19 -07:00
Ben Gotow 450afedaec es6(db): Move DatabaseStore to ES6 2016-09-30 15:24:34 -07:00
Juan Tejada 2b34d2137a fix(lint): Fix coffeelint errors 2016-09-28 15:58:16 -07:00
Ben Gotow 381019552f fix(perspectives): More robust validation of saved perspectives, never open to blank screen 2016-09-28 14:46:08 -07:00
Ben Gotow 2739cc822e fix(identity): Always refresh accounts after identity
This fixes an issue where changing your Nylas ID didn’t refresh your accounts, and N1 would still think they were invalid.
2016-09-28 11:29:26 -07:00
Ben Gotow 275786cdfb fix(drafts): Sanitize quoted text to avoid overlaid component issues [!!] 2016-09-27 17:45:51 -07:00
Ben Gotow 91605c7a95 es6(db): DatabaseTransaction & Query moved to ES6 2016-09-26 23:46:46 -07:00
Evan Morikawa d255cfbd5c Revert "fix(task-queue): performLocal now operates serially"
This reverts commit 5274ce3543.
2016-09-26 17:04:23 -07:00
Ben Gotow 039d9bea61 feat(inline-images): Drag & drop or paste inline images
Summary: Initial support for inline images. Tests still forthcoming!

Test Plan: WIP

Reviewers: mark, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3295
2016-09-26 17:01:19 -07:00
Ben Gotow 18d294c42f feat(transforms): Replace regexp body transforms with DOM approach
Summary:
We originally didn't do this because creating a DOM tree was loading images.
Using range.createContextualFragment seems to do it without the tree ever
being attached.

Accompanying changes to src/pro are here:
https://phab.nylas.com/D3300
https://github.com/nylas/edgehill/compare/bengotow/draft-dom-transformations?expand=1

Also rename applyTransformsToDraft => applyTransformsForSending. Needed
a new name because the function signature has changed. AFAIK there are no
open source plugins using the old functions.

Test Plan: All specs updated

Reviewers: evan, juan

Reviewed By: evan, juan

Differential Revision: https://phab.nylas.com/D3299
2016-09-23 16:36:08 -07:00
Ben Gotow fbe42a8f8a es6(db): Query builder converted to ES6 2016-09-23 08:28:41 -07:00
Evan Morikawa 5274ce3543 fix(task-queue): performLocal now operates serially 2016-09-21 16:50:41 -04:00
Ben Gotow ec5092c2f5 fix(specs): attribute conversion fixed bugs, broke specs 2016-09-21 11:56:54 -07:00
Ben Gotow c6d8bde6fd fix(accounts): Restore account re-ordering 2016-09-21 11:23:38 -07:00
Ben Gotow ef306fa52f es6(db): Didn’t wait for NylasLint… 2016-09-21 09:45:11 -07:00
Ben Gotow 8bf4b325d3 fix(specs): Wait longer in DraftStore specs for window close 2016-07-28 11:20:02 -07:00
Annie bff998e1f5 fix(downloads): Add a check to see if last download directory is different, only show item in folder if true
Summary:
Each file downloaded would open finder and show the path to the file. Users were reporting that this felt excessive when downloading multiple files all to the same location #1044. I added a check to see if the path was the same as the previous file path, and only showed the item in the folder if these differed.

Also added tests for this in file download store.

test(downloads): Add tests for showing item in folder only if lastDownloadDirectory differs

Test Plan: Added tests to file-download-store-spec

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D3121
2016-07-26 15:02:09 -07:00
jathpala d9ece35ac6 Re-enable all tests by unfocusing the test suite (#2667)
A previous commit (ad04775) added an fdescribe() to one of the tests in
draft-helpers-spec. This changes that to a regular describe() so that
all tests will be run when running ./N1 --test.
2016-07-23 06:32:12 -07:00
Jackie Luo 5c7dd2cc59 fix(lint): Fix linter issues 2016-07-21 22:53:19 -07:00
Jackie Luo 25f77f0269 fix(quoted-text): Check that message is reply 2016-07-21 17:45:47 -07:00
Jackie Luo 9bda66c081 spec(quoted-text): Fix broken tests 😞 2016-07-21 15:47:54 -07:00
Evan Morikawa b5212d1d1b fix(spec): fix failing draft specs 2016-06-10 11:54:47 -07:00
Juan Tejada 1fffd843a0 fix(specs): Fix DraftStore and SendManyDraftsTask specs 2016-06-10 11:32:38 -07:00
Juan Tejada 39611f8962 fix(specs): Fix merge conflicts and some specs 2016-05-24 19:04:20 -07:00
Juan Tejada a4ee61eadc fix(mail-merge): Refactor mass sending procedure
Summary:
This diff introduces several updates to mail merge to improve the procedure for sending a list of drafts.
Specifically, sending mass email will now:

- Clear mail merge metadata on the drafts that will actually be sent
- Upload attached files only /once/, and reuse those files on the drafts that will actually be sent
- Minimize database writes for new drafts being created
- Will queue a SendManyDraftsTask that will subsequently queue the necessary SendDraftTasks and keep track of them, and notify of any failed tasks

TODO:
- Add state to MailMerge plugin for failed sends and ability to attempt to re send them

Test Plan: - TODO

Reviewers: evan, bengotow, jackie

Reviewed By: bengotow, jackie

Subscribers: jackie

Differential Revision: https://phab.nylas.com/D2973
2016-05-24 17:22:09 -07:00
Juan Tejada 9ac83df24d fix(specs): Fix specs for TaskQueue 2016-05-19 12:33:31 -07:00
Evan Morikawa b8adb922e3 fix(spec): remove obsolete account store spec 2016-05-19 11:59:02 -07:00
Ben Gotow 3118f19c11 fix(tasks): Check Task is in registry, remove any non-tasks when loading 2016-05-19 11:35:48 -07:00
Evan Morikawa 7091bc0784 fix(undo): can redo more than one undo item 2016-05-18 16:43:48 -07:00
Ben Gotow bb40df97fe fix(config): Move all reads / writes to the main process
Summary:
Moves all reading / writing of config file to the main process,
to avoid needing to write code to lock across processes. This should also
be more efficient than re-loading the file in all processes when it's
saved.

Test Plan: Run tests

Reviewers: evan, jackie

Reviewed By: evan, jackie

Differential Revision: https://phab.nylas.com/D2963
2016-05-16 16:38:46 -05:00
Ben Gotow 17b474c14f fix(retry): When tasks fail, try fewer times: 2s, 4s, 8s, 16s, 30s 2016-05-16 15:44:41 -05:00
Ben Gotow 17ed847240 fix(401/403): Unify error bars, query /account, improve reconnect flow
Summary: See https://paper.dropbox.com/doc/Sync-disabling-for-N1-URZmjVpSSxWFvjC62TiFI

Test Plan: Tests incoming

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2959
2016-05-13 14:16:54 -07:00