Commit graph

379 commits

Author SHA1 Message Date
jathpala 525e6c6444 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
Juan Tejada 7b020765e9 fix(mail-merge): Keep column links state properly in sync #2493
Summary:
See https://phab.nylas.com/D3112 for full description
- Update EditorAPI.insertCustomComponent to take a pre-generated
anchorId

Test Plan: Unit tests + manual

Reviewers: bengotow, halla, jackie

Reviewed By: jackie

Differential Revision: https://phab.nylas.com/D3113
2016-07-22 14:25:31 -07:00
Jackie Luo d916e1d8fa fix(lint): Fix linter issues 2016-07-21 22:53:19 -07:00
Jackie Luo ad047755e6 fix(quoted-text): Check that message is reply 2016-07-21 17:45:47 -07:00
Jackie Luo ba32391351 spec(quoted-text): Fix broken tests 😞 2016-07-21 15:47:54 -07:00
Halla Moore 7ca9f7667c Implement a participant cap for multi-send, add multi-send unit tests
Summary:
Prevent hitting SMTP rate limit with multi-send
Some users were hitting the SMTP rate limit when sending messages
with multi-send to too many recipients. There is a backend patch
to help with this, but we decided it would be useful to limit it
on the client side as well.

Test Plan: Added unit tests

Reviewers: jackie, juan

Reviewed By: jackie, juan

Differential Revision: https://phab.nylas.com/D3109
2016-07-21 11:36:45 -07:00
Ben Gotow 893feb2ad8 fix(contacts): Support unicode characters in domains #1920 2016-07-18 14:25:00 -07:00
Annie 39e5a2ee96 refactor(signatures): Removed old signature imgs and made static empty signatures page
Summary:
Refactored signature preferences page to allow more signatures than the previous 1-1 mapping for signatures and accounts. Created a multi select dropdown of the accounts for which a certain signature is set as default for. Added a button into the draft header From field to toggle between saved signatures.

refactor(signatures): Add basic add/remove capabilities to static

refactor(signatures): Hooked up signature actions and signature store for basic functionality

fix(signatures): Cleaned up signature store and started on multiselectdropdown

fix(signatures): Add multi signature toggle select to multiselect dropdown

build(signatures): Built framework for multiselect dropdown

build(signatures): Toggle button functionality for dropdown

build(signatures): Build multi select from components and add debounce

refactor(signatures): Move signature actions and signature store into flux

fix(signatures): Styled composer signatures button/dropdown and fixed preferences checkmarks

build(signatures): Finish main functionality, about to refactor composer signature button into injected component

fix(signatures): Changed position styles

fix(signatures): Fixed background color for dropdown button when blurred

build(signatures): Began to write tests for signatures store, preferences and dropdown

Test Plan: Wrote tests for preferences signatures, signature store, signature composer dropdown and refactored tests for signature composer extension. For signature composer extension I removed applyTransformsToDraft and unapplyTransformsToDraft and tested by sending emails with signatures to different providers to make sure the <signature> tag caused problems.

Reviewers: bengotow, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3073
2016-07-11 12:35:41 -07:00
Halla Moore ce8cdf8cd7 fix(specs): Fix specs on Linux
Summary: Specs were failing on Linux, this diff fixes them.

Test Plan: Unit tests

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3029
2016-06-15 16:30:52 -07:00
Evan Morikawa 0322625380 fix(spec): fix failing draft specs 2016-06-10 11:54:47 -07:00
Juan Tejada b1a8efc50a fix(specs): Fix DraftStore and SendManyDraftsTask specs 2016-06-10 11:32:38 -07:00
Evan Morikawa 903e5834c1 fix(templates): detect empty bodies and fix CSS 2016-06-09 15:00:58 -07:00
Juan Tejada e5521161b7 fix(themes): Properly set theme on the hot window
- First composer window you open after changing the theme will now have
the correct theme
2016-06-09 14:12:44 -07:00
Ben Gotow c1bbec25cd fix(identity): deprecate updaterId, provide safe access to identity.id 2016-06-02 18:56:09 -07:00
Ben Gotow 3615c7ea49 fix(undo): Improve messaging around label changes, modernize undo-redo-store
Summary: Just a small patch to address bad messaging

Test Plan: Run one new test!

Reviewers: jackie, juan

Reviewed By: jackie, juan

Differential Revision: https://phab.nylas.com/D3000
2016-06-01 14:36:57 -07:00
Ben Gotow 856334c088 fix(tasks): Call super.isDependent, wrap model lookup in transaction
Summary:
ChangeFolder/ChangeLabel still need to call super.isDependentOnTask!

Formalize "retrieve latest models" part of the performLocal process, ensure that it's always /inside/ the transaction that is going to write the changes. This ensures that queueing two tasks for the same thread at the same time don't cause a race...

...condition between the two tasks (end result is currently arbitrary!)

Add "move to label" mail rule to go alongside "Add Label"

Test Plan: All broken... willfix.

Reviewers: juan, evan, jackie

Reviewed By: evan, jackie

Differential Revision: https://phab.nylas.com/D2999
2016-05-31 16:31:24 -07:00
Juan Tejada 48556bef98 fix(build): Fix remaining specs (composer-view, send-draft-task) 2016-05-25 10:25:36 -07:00
Juan Tejada 78d27bc62a fix(specs): Fix merge conflicts and some specs 2016-05-24 19:04:20 -07:00
Juan Tejada 0ec108c906 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
Ben Gotow bf955891d9 fix(undo): Move undo/redo to session, properly undo all changes
Summary:
- Simplify undoManager to just maintain the undo/redo history items
- DraftEditingSession manages snapshotting state of draft, hack allows it to also save selection (still hoping to eventually put selection in body HTML as markers)
- Switch from `debounce` to `throttle` style behavior so typing for along time followed by undo doesn't undo away your entire block.

This resolves two issues:
+ Changes to participant fields are no longer undoable because they go straight to the session.
+ Changes to metadata weren't undoable.

Test Plan: Tests WIP

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2956
2016-05-24 11:48:33 -07:00
Juan Tejada e420a7af1f fix(specs): Fix specs for TaskQueue 2016-05-19 12:33:31 -07:00
Evan Morikawa 99a8b4fb04 fix(spec): remove obsolete account store spec 2016-05-19 11:59:02 -07:00
Evan Morikawa b0e66519fc fix(spec): fix config setting spy 2016-05-19 11:50:19 -07:00
Ben Gotow c6f6c7c3a0 fix(tasks): Check Task is in registry, remove any non-tasks when loading 2016-05-19 11:35:48 -07:00
Evan Morikawa 18c8a4a10f fix(undo): can redo more than one undo item 2016-05-18 16:43:48 -07:00
Juan Tejada 3bfc452f5e fix(build): Fix lint errors 2016-05-16 19:53:26 -07:00
Ben Gotow 3559f5e419 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 eb4aa0e208 fix(retry): When tasks fail, try fewer times: 2s, 4s, 8s, 16s, 30s 2016-05-16 15:44:41 -05:00
Evan Morikawa 61caf7b363 fix(spec): update NylasEnv specs 2016-05-16 13:26:33 -07:00
Evan Morikawa 7d70177720 fix(spec): Convert NylasEnvSpec from coffee to es6 2016-05-16 11:43:48 -07:00
Ben Gotow 8f29e1cfbe 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
Ben Gotow 0441acf94a fix(fastmail): Strip "INBOX." prefix from displayNames
This can't be done on the API side because the API serves other customers.

The API will properly handle renames, crates and prepend `INBOX.`
2016-05-12 16:14:30 -07:00
Juan Tejada 2bcd5032a8 fix(specs): Remove fdescribe 2016-05-12 15:23:06 -07:00
Juan Tejada 150ac1e887 fix(specs): Fix spec for DraftEditingSession 2016-05-12 15:21:28 -07:00
Juan Tejada 3ef9da941f fix(build): Fix linter errors 2016-05-11 16:38:30 -07:00
Juan Tejada eacf54b4eb fix(build): Fix lint issues and specs 2016-05-11 15:33:52 -07:00
Juan Tejada 72e86dde36 specs(table): Add specs for table components
Summary:
- Add some docs to Table components
- Updates Table components to use a TableDataSource instead of accessing arrays, cleans up code a bit
- Add enzyme lib to have a cleaner and simpler api to write tests for React Components
- Updates decorators to extend from the BaseComponent instead of vanilla Component, this way instance methods are still available on composed components

Test Plan: - Unit tests

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2941
2016-05-11 14:36:59 -07:00
Ben Gotow eab8cb9085 fix(draft-factory): ReplyTo takes precedence over "from me" #2175 2016-05-10 10:33:46 -07:00
Evan Morikawa 5c01292e8b fix(spec): fix injected component spec 2016-05-06 16:42:55 -07:00
Ben Gotow 2ff92946b7 fix(lint): Various linter fixes 2016-05-06 16:23:48 -07:00
Ben Gotow 7533dc0ac6 fix(lint): Various linter issues 2016-05-06 16:06:16 -07:00
Ben Gotow 0e2b5501e3 fix(lint): Correct more linter errors 2016-05-06 14:10:28 -07:00
Evan Morikawa d9be81b7f5 feat(babel6): fix es6 importing from coffee 2016-05-06 12:00:45 -07:00
Evan Morikawa 2e2f877ddb feat(babel6): 1,774 linter errors 2016-05-06 11:55:46 -07:00
Evan Morikawa 57a3e140f4 feat(babel6): Fix autlinker spec 2016-05-06 11:55:32 -07:00
Evan Morikawa 92d5369f21 feat(babel6): Fix errors in es6 compilation and extending from coffeescript 2016-05-06 11:55:31 -07:00
Evan Morikawa 92199587b3 feat(babel6): Convert message.coffee to message.es6 2016-05-06 11:55:27 -07:00
Evan Morikawa 409704fe8f feat(babel6): Convert account.coffee to account.es6 2016-05-06 11:55:25 -07:00
Evan Morikawa 390007cac9 feat(babel6): fix es6 describe function syntax 2016-05-06 11:55:20 -07:00
Evan Morikawa 18df77c3c0 feat(babel6): fix participant field spec 2016-05-06 11:55:16 -07:00