Commit graph

411 commits

Author SHA1 Message Date
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 1e7dfea7d7 fix(db): Messages with empty bodies always showing loading spinner due to ‘’ == null 2016-09-28 11:42:18 -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 109fb21dc7 fix(thread-list): Use interaction handlers, don’t update selection directly 2016-09-27 16:31:28 -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
Ben Gotow 00787c06c7 es6(db): Query-related classes moved to ES2016 2016-09-22 00:07:23 -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 e533d063d0 fix(specs): Fix tests that were console.logging, bump coffee-react 2016-09-20 15:17:48 -07:00
Evan Morikawa 7a0e8691ea Revert "fix(promise): Don't use deprecated Promise.longStackTraces()"
This reverts commit ac7602155c.
2016-09-20 17:23:53 -04:00
Evan Morikawa ac7602155c fix(promise): Don't use deprecated Promise.longStackTraces() 2016-09-20 17:16:59 -04:00
Ben Gotow 89252a7c9d fix(specs): Display which tests are console.logging 2016-09-20 11:31:33 -07:00
Evan Morikawa aca3363e3c fix(util): Utils.deepClone properly clones dates 2016-09-19 20:14:41 -04:00
Jackie Luo 00e2ad41f1 fix(autoupdater): Change feed URL when Nylas ID or accounts changes
Test Plan: Tested locally.

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D3178
2016-08-18 13:22:56 -07:00
Juan Tejada e699b28a36 fix(send): Don't retry send
Summary:
- There are some cases in which constantly retrying send can cause unexpected bugs like sending multiple times, so don't retry send at all
- Make 429 a permanent error code

Test Plan: Manual

Reviewers: jackie, evan

Reviewed By: jackie, evan

Differential Revision: https://phab.nylas.com/D3177
2016-08-18 10:39:13 -07:00
Juan Tejada 43d02da5d9 fix(build): Fix specs and lint errors
Summary: Fix specs and lint errors

Test Plan: Unit

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3168
2016-08-16 17:37:02 -07:00
jathpala b1e5066110 Better support 24-hour time (#2622)
* Added support for 24-hour time to the thread list view (Issue #682)

* Add 24-hour time support to the thread list scroll tooltip (Issue #682)

* Fix for 24-hour time in the thread list scroll tooltip (#682)

Correctly imports the DateUtils module

* Add support for 24-hour time to the draft threads list (Issue #682)

* Add 24-hour time to the message sidebar

* Fix for 24-hour time in the message view so the rollover tooltip is 24hour also (#682)

* Removed unused date functions from utils

fullTimeString and shortTimeString from src/flux/models/utils.coffee were not
compatible with 24-hour time. These functions were modified and moved to
DateUtils in src/date-utils.

* Fix for display of 24-hour time in the message view (Issue #682)

* Removed unused import of Utils in a couple of files

Prompted by Travis build errors.

* Updates to handling of date/time display

Incorporates changes suggested by @bengotow.
Re-enables support for the isDetailed property in message-timestamp (if this is set
to true, a medium length date/time string will be used for display).
Re-enables additional display varieties based on when the email was received. Note
that this is implemented slightly different to the orinal version - time is now given
as an absolute time rather than "... days ago" format.
TZ guessing moved to the global scope of date-utils for performance reasons.

* Minor de-linting

* Re-enable all tests by unfocusing the test suite

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.

* Added tests for the new DateUtils functions

Added tests for getTimeFormat, mediumTimeString and fullTimeString.
Removed no longer relevant tests from message-timestamp-spec as _formattedDate
has been removed in favour of the functions in date-utils.

To test shortTimeString, we need to be able to set a fake current time which is
possible in jasmine 2.0+ but not in 1.3 which is currently in use.

As a possible bug, when running more than 10 tests the following warning is raised:
"(node:25025) Warning: Possible EventEmitter memory leak detected.
11 on-config-reloaded listeners added. Use emitter.setMaxListeners() to increase limit",
source: internal/process/warning.js (24)

* Minor de-linting
2016-07-28 17:42:14 -07:00
Juan Tejada 432fc99f3c fix(mail-merge): Skip row in table data if its empty
- Don't show annoying error if entire row is empty
- Just show error if just the email cell is empty
2016-07-28 14:05:51 -07:00
Ben Gotow 2f67f30a4c fix(quoted-text): Don’t add <body>, <head> accidentally to text when transforming 2016-07-28 13:33:59 -07:00
Annie c251884eaa fix(mail-merge): Fix column deletion and added a spec for uneven data
Summary: After importing an uneven csv (not all rows have the same number of columns e.g. rows: [[1,2][3,4,5]]), deleting the last column would improperly delete data in rows with fewer columns. This is because we were slicing each row based on row.length - 1 which is not the same for all rows. Fixed this by creating a new variable newNumColumns which is columns.length - 1.

Test Plan: Added new test data with uneven data and added a test in table-data-source-spec for removeLastColumn on this uneven set.

Reviewers: juan

Reviewed By: juan

Subscribers: juan

Differential Revision: https://phab.nylas.com/D3133
2016-07-28 12:12:10 -07:00
Annie 7e3aab2256 refactor(folders): Make folders disappear when deleted rather than graying out until confirmed
Summary:
When testing we thought that Deleting a folder turns it grey but keeps it in the folder list; trying again throws this error.
It turns out, that the folder was actually going to be deleted if left alone long enough, however, since it sat there grey for a while
we would attempt to delete it again which would throw an error. To get around this, we removed the isDeleted grey state and
unpersisted the folder right when delete is clicked then persisted the folder if there was an API error.

fix(folders): Add new and extend destroy category task specs

Test Plan: I tested locally, tweaked destroy category task specs and added minor new specs

Reviewers: bengotow, juan

Reviewed By: juan

Subscribers: bengotow, juan

Differential Revision: https://phab.nylas.com/D3131
2016-07-28 12:10:54 -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
Juan Tejada f77cbc02f5 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 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
Halla Moore 5ff0dcc94c 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 1e59ee6900 fix(contacts): Support unicode characters in domains #1920 2016-07-18 14:25:00 -07:00
Annie bd361c8abb 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 93455db929 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 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
Evan Morikawa d1d2749209 fix(templates): detect empty bodies and fix CSS 2016-06-09 15:00:58 -07:00
Juan Tejada ecb1464648 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 c0c543c9c8 fix(identity): deprecate updaterId, provide safe access to identity.id 2016-06-02 18:56:09 -07:00
Ben Gotow dd432e338b 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 a620f86776 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 6e57cbaee4 fix(build): Fix remaining specs (composer-view, send-draft-task) 2016-05-25 10:25:36 -07:00
Juan Tejada 39611f8962 fix(specs): Fix merge conflicts and some specs 2016-05-24 19:04:20 -07:00