Commit graph

434 commits

Author SHA1 Message Date
Evan Morikawa 4209255ca6 Move spec runner & deps into n1-spec-runner folder 2016-10-16 20:10:19 -07:00
Evan Morikawa 13b790b6ca Move waitsForPromise to jasmine-extensions 2016-10-16 20:10:19 -07:00
Evan Morikawa 4e1dc228a8 Remove unused methods from spec-helper 2016-10-16 20:10:19 -07:00
Evan Morikawa 27ccc3cd78 Convert spec-helper to es6 2016-10-16 20:10:19 -07:00
Evan Morikawa f1f7952f64 Convert spec-suite to n1-spec-loader 2016-10-16 20:10:19 -07:00
Evan Morikawa 448b9aeadc Fold jasmine-helper into spec runner 2016-10-16 20:10:19 -07:00
Evan Morikawa 0a23028447 Extract to N1SpecRunner 2016-10-16 20:10:19 -07:00
Evan Morikawa a25c43c7e5 Move global imports back to jasmine-helper 2016-10-16 20:10:19 -07:00
Evan Morikawa 8e786956df Extract out jasmine reporters 2016-10-16 20:10:19 -07:00
Evan Morikawa 52e38d8dd0 Convert spec-suite to es6 2016-10-16 20:10:19 -07:00
Evan Morikawa bda18f5afe Clean up spec-bootstrap and jasmine-helper 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
Evan Morikawa cb7b3764f5 fix(contact): add hasSameDomainAsMe method to Contact 2016-10-13 16:31:40 -04:00
Evan Morikawa 0971f67e7f fix(linter) 2016-10-13 12:41:09 -04:00
Evan Morikawa de0f2374fe feat(calendar): can pick which calendars you want displayed
Summary:
Adds a resizable column next to the calendar that lets you pick which
calendars you want to turn on and off.

The picker sidebar styling mimics that of the main account sidebar.

Calendars are grouped by account.

We store the disabled calendars in in your config.

I added a `notIn` SQL method so it'll perform `WHERE calendarId NOT IN
['a', 'b', ...]` instead of `NOT (WHERE calendarId IN ['a', 'b', 'c'])`

I wanted it to be an exclusion (instead of inclusion) list so the default
was "all on" and we didn't need to always fetch the full list of
calendarIds from the database to compare against.

This also fixed a test that was failing constantly: The Query Subscription
Pool Spec was not being properly reset on each test. As a result, the test
would fail with an instance of a query subscription that Jasmine would
attempt to pretty print. Jasmine would fail to pretty print it because of
a jasmine bug that fails to properly display Objects with null prototypes.
The DatabaseStore's EventEmitter has a property with a null prototyp
causing the error

Test Plan: manual

Reviewers: bengotow, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3336
2016-10-13 11:37:19 -04:00
Halla Moore b26e9926e0 fix(spellchecker): Use cross-platform misspellings, fix lint error 2016-10-12 17:07:22 -07:00
Ben Gotow 8df4f6d744 feat(win32): Allow N1 to become the system-wide mailto: handler
Summary: This will address the longstanding concern in #417

Test Plan: No new tests

Reviewers: juan, evan

Reviewed By: juan, evan

Maniphest Tasks: T7065

Differential Revision: https://phab.nylas.com/D3322
2016-10-12 16:05:36 -07:00
Jonathan Boiser d09839f1db fix(specs) convert nylas-protocol-handler-spec to ES6 (#2886) 2016-10-12 11:38:30 -07:00
Evan Morikawa 7d76e95616 fix(spec): remove unused spec helpers 2016-10-12 11:04:38 -04:00
Halla Moore 873c4be2da Switch spellcheck libaries
Summary:
Switch to electron-spellchecker, which will allow N1 to
spellcheck more intelligently across languages. It auto-
detects languages and downloads dictionaries on the fly.

Test Plan: Specs, manual testing

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3319
2016-10-11 14:00:50 -07:00
Halla Moore 9e3c3c14cd feat(sidebar-notifs) Create sidebar notifications to replace old bars
Summary:
Move the old bar notifications to the sidebar, and only display one notification
at a time using a priority-rating system. Remove all of the old notification
infrastructure.

Test Plan: Added specs, also reproduced notifications locally

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: juan

Differential Revision: https://phab.nylas.com/D3310
2016-10-04 08:08:23 -07:00
Evan Morikawa b540bbb601 fix(composer): tokenizing text field trigger logic moved to composer 2016-10-02 12:05:31 -04: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 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