Commit graph

1976 commits

Author SHA1 Message Date
Evan Morikawa 1f63680fd1 refactor(plugins): use plugin name instead of appId 2016-12-02 17:34:42 -05:00
Christine Spang a1a85e04be feat(metadata): Look up local thread IDs via message table when setting metadata
Since message IDs are now static but there's no good way to generate
static thread IDs while syncing an account from newest message first,
we give threads the ID of any message on that thread and, when setting
metadata, look up the local thread ID by first going through the
message table.
2016-12-02 14:13:58 -08:00
Evan Morikawa fcb36abbe8 fix(account): Remove unsupported account types 2016-12-02 16:44:44 -05:00
Evan Morikawa 2b2c998dee feat(sync): let N1 be aware of provider synback requests 2016-12-02 16:15:17 -05:00
Evan Morikawa cee7d05017 debug(delta): add logs 2016-12-02 15:11:48 -05:00
Evan Morikawa cfc605136b refactor(sync): sync workers only use delta syncs now 2016-12-02 14:48:56 -05:00
Ben Gotow fb13abe8f4 fix(deltas): Process all deltas of each class in a single pass
Also changed the DeltaProcessor so it doesn’t query for models before sending out `Actions.didPassivelyReceiveCreateDeltas`, and renames it to be more clear it’s about deltas.
2016-12-02 11:41:49 -08:00
Ben Gotow e3b4fc859e fix(deltas): Remove extra params passed to streaming endpoint 2016-12-01 18:42:13 -08:00
Ben Gotow 6d85a8ef81 lint(*): Fix linter errors within K2, update eslint grunt task 2016-12-01 15:38:16 -08:00
Evan Morikawa 00832b5a83 fix(auth): now authing IMAP through n1-cloud 2016-12-01 16:56:02 -05:00
Evan Morikawa 2ee11006e9 feat(auth): IMAP request to both n1-cloud and local sync 2016-12-01 16:56:02 -05:00
Ben Gotow 6fb08f55c5 fix(accounts): Save both local and cloud tokens per account 2016-12-01 13:35:20 -08:00
Evan Morikawa 77799519e4 fix(spec): fixed specs for nylas-sync-worker 2016-12-01 14:00:20 -05:00
Evan Morikawa 278a4d16d4 fix(spec): progress on spec fixes for sync worker 2016-12-01 13:17:55 -05:00
Juan Tejada d409a5a3f9 fix(delats): Warn when receiving unkown obejct class 2016-12-01 09:14:02 -08:00
Evan Morikawa 380f370e7d fix(sync): Support N1Cloud auth errors. Fix LongConnection cleanup 2016-12-01 12:04:37 -05:00
Evan Morikawa 58874e8ad3 fix(delta): JSON blob persist failed to save properly 2016-12-01 11:04:19 -05:00
Ben Gotow ed74e454d2 fix(deltas): Fix deltaProcessor handling deletes wrong 2016-11-30 17:00:11 -08:00
Ben Gotow daed7146b5 fix(deltas): Delta.id is now a transaction id, need objectId 2016-11-30 16:53:52 -08:00
Ben Gotow 063f38f211 fix(deltas): We’ve been flipping deltas by accident for a while! 2016-11-30 16:51:51 -08:00
Juan Tejada dfee7ea9b6 fix(k2) fix local sync deltas 2016-11-30 16:13:26 -08:00
Evan Morikawa 3a72987f4d fix(delta): default cursor to 0 if no transactions exist yet 2016-11-30 17:56:59 -05:00
Evan Morikawa 3d4035ac64 fix(delta): fix issues with delta sync 2016-11-30 17:55:45 -05:00
Jackie Luo a177146a6f fix(auth): Make N1 Cloud API request correctly 2016-11-30 14:13:46 -08:00
Evan Morikawa 5582782ddd refactor(delta): add a second delta stream, convert to es6, and cleanup
This reverts commit ee5609bdb0.

Updates to nylas sync worker to support multiple cursors

Convert NylasSyncWorker to es6

Convert NylasSyncWorkerPool to es6

Extract into deltaProcessor

Update names to NylasSyncWorker state

Working on spec fixes

More spec fixes

Delta stream refactor fixes
2016-11-30 13:42:10 -05:00
Jackie Luo 7b7fbb3b1b refactor(nylas-api): Create API requests from tasks 2016-11-29 16:33:44 -08:00
Jackie Luo bab39a5c21 fix(nylas-api): Send API and options as object 2016-11-29 16:33:44 -08:00
Ben Gotow 4baf80ac21 rm(*): Internal packages don’t need engine version locking 2016-11-29 15:12:52 -08:00
Ben Gotow 848feaad60 fix(sync-worker): Missing binding arrow… 2016-11-29 12:44:02 -08:00
Juan Tejada 0b5f2841d5 fix(deltas) Update syncworker signature 2016-11-29 12:39:36 -08:00
Ben Gotow 56fded79c7 fix(sync): Put K2 dashboard into work window 2016-11-28 18:03:27 -08:00
Evan Morikawa ee5609bdb0 Rename DeltaStreamingConnection -> LocalDeltaSyncConnection 2016-11-28 17:13:18 -08:00
Evan Morikawa caba64d39d Update nylas-sync-worker to better fetch metadata 2016-11-28 16:59:04 -08:00
Evan Morikawa 9cbc284ed5 Fetch folders and labels at the same time 2016-11-28 16:11:10 -08:00
Evan Morikawa e1f1c23626 Introduce N1CloudAPI as endpoint 2016-11-28 15:38:53 -08:00
Ben Gotow 864766d463 fix(sync): Throttle instead of debounce for better initial sync 2016-11-28 12:05:41 -08:00
Ben Gotow d3bfe3fa71 fix(auth): Stop sending other crap with key 2016-11-28 11:05:00 -08:00
Ben Gotow ddc442d271 fix(auth): Support gmail auth against K2 2016-11-23 16:26:40 -08:00
Ben Gotow 6ac3637420 fix(auth): Use new endpoints for Gmail auth 2016-11-23 16:26:40 -08:00
Evan Morikawa 144fd7f372 Remove EdgehillAPI from auth and fix NylasRequest and perspective 2016-11-23 12:37:05 -08:00
Evan Morikawa e8ac7c6338 fix(auth): don't send unncessary IMAP params to local-sync/auth 2016-11-23 11:48:58 -08:00
Ben Gotow 9fbde1c3e9 fix(onboarding): Remove support for local sync engine 2016-11-23 09:41:49 -08:00
Ben Gotow 20317358cb Update auth to hit new hosted N1-cloud 2016-11-22 18:04:35 -08:00
Halla Moore f4357ce166 change(API) Prevent N1 from sending "view" parameters in some API requests
- Threads: N1 always asks for the 'expanded' view, so K2 just always returns
the expanded view. N1 no longer needs to specify this.
- Messages: N1 only needed a 'count' view to display the initial sync progress
We've removed this progress bar and the corresponding request.
2016-11-21 15:16:04 -08:00
Juan Tejada a2a897b369 fix(cal): Disable event search for now 2016-11-21 13:50:09 -08:00
Juan Tejada cf321258ed 💄(md) Fix markdown styles 2016-11-18 15:38:26 -08:00
Evan Morikawa 9ee8eae633 fix(search): allow custom search result elements 2016-11-17 16:01:55 -08:00
Juan Tejada 91f74f7482 fix(spellchecker) Fix spellchecker specs 2016-11-17 14:51:24 -08:00
Juan Tejada 5c7518e958 fix(sidebar): Correctly show all accounts in sidebar during initial sync
Ref #1587
2016-11-16 22:48:14 -08:00
Ben Gotow d53edbffea feat(db): background flag to exec queries in a single forked node process
Summary:
This is an initial attempt to fix an issue we’ve had with long-running queries interrupting the N1 user experience. Node-sqlite3 used an async approach that ran sqlite’s synchronous query methods on a worker thread, but doing that involves copying memory more and node-sqlite3 was just generally slow.

However, moving to better-sqlite3 made /everything/ synchronous. Even with the right indexes some of our queries just suck.

This diff adds `DatabaseStore.findAll(…).background().then()` which allows you to mark a query as “unimportant”. These queries are run in a separate process which is forked from the window and can take an extra 10-50ms to complete. That said, they’re totally async and don’t jam up the app.

I’m personally a fan of the flag and less a fan of the implementation. The “agent” process can handle many queries in it’s lifetime if they keep coming and quits after 10 seconds of inactivity. (Both to save memory and to avoid scenarios where it might end up oprhaned and running forever). While running it uses about 40MB of RAM, which is a bit on the crazy side.

Test Plan: No new tests yet

Reviewers: evan, juan

Reviewed By: evan, juan

Differential Revision: https://phab.nylas.com/D3420
2016-11-16 17:47:24 -08:00
Evan Morikawa 08d9bfc334 feat(plugin): don't show isHiddenOnPluginsPage 2016-11-16 16:00:56 -08:00
Juan Tejada d59d292d2f fix(spellcheck): Minor perf improvements
- When applyign spellcheck mutations to the dom, toggle display property
on the contenteditable to reduce reflows/repaints while mutating
- Debounce provideTextHint to reduce work on each keystroke
- Minor speedup checking existence of keys in spellchecker internal maps
2016-11-16 15:18:11 -08:00
Evan Morikawa f21c0032b6 feat(autolinker): linkify nylas: commands 2016-11-16 13:35:12 -08:00
Juan Tejada d3dcf89e9f feat(event-search): Add event search to calendar
Summary:
This commit adds the ability to perform event search in the calendar window.
To achieve this, SearchBar has been moved from the thread-search package to be a part
of the nylas-component-kit, and reused by both thread-search and nylas-calendar

When an event is selected from search results, the calendar view is moved to the selected
event. Depends on D3396 to open the event popover.

Test Plan: Manual

Reviewers: halla, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D3424
2016-11-15 17:27:31 -08:00
Ben Gotow b758ffe589 fix(inline-attachments): Handle images with UTF16 names 2016-11-15 17:04:43 -08:00
Ben Gotow 70c040fd3c fix(calendar): Move quick-add button into toolbar 2016-11-15 16:32:49 -08:00
Jackie Luo 41a3e273f1 🎨(calendar): Clean Exchange event titles 2016-11-15 14:04:07 -08:00
Evan Morikawa e43de77708 fix(lint): update files to for new linter version 2016-11-15 10:20:39 -08:00
Evan Morikawa f89b905b10 feat(composer): allow extensions to composer participant searching 2016-11-14 14:01:00 -08:00
Evan Morikawa 313fdc2fd0 fix(search): Don't re-query search results on status change
If that method is fired immediately twice in a row, it's possible for
this._set to not re-instantiate causing the results to be blow away
2016-11-14 14:01:00 -08:00
Evan Morikawa 058a10d836 feat(search): support search extensions 2016-11-14 14:01:00 -08:00
Evan Morikawa ec90dcf646 refactor(search): extract generic ModelSearchIndexer 2016-11-14 14:01:00 -08:00
Evan Morikawa 9cde226598 refactor(registry): move all registries into src/registries 2016-11-14 14:01:00 -08:00
Halla Moore a366f3be9b feat(calendar): Add functionality to create/edit events
Summary:
Add some basic functionality for creating and editing calendar events

This is a weird work-around diff. Original review is at
https://phab.nylas.com/D3396

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D3426
2016-11-14 12:21:29 -08:00
Joris Pelgröm 55fc10b513 Rename Google Apps to G Suite in onboarding (#3047)
Google renamed Google Apps (both 'normal' and education editions) to G
Suite on 2016-09-29. See
https://blog.google/products/g-suite/all-together-now-introducing-g-suite/
for the announcement. Updated text for account selection to match Google's
branding.
2016-11-14 10:53:47 -08:00
Ben Gotow 80b315d708 deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08:00
Ben Gotow 1157fdc450 build(*): electron-compile, electron-packager instead of custom tooling
Summary:
This diff removes significant cruft from N1's compilation and build tooling:

- Electron-Packager replaces most of the code in build/tasks/* used to copy things,
  bundle things, download electron, etc.

- script/bootstrap has been replaced with a much simpler script that does not use
  APM, does not download Electron (we just use electron as an NPM dep) and does
  not manully compile sqlite. It requires NPMv3, but I think that's safe.

- babel and eslint are now devDependencies of the main project. The main project
  also supports optionalDependencies now.

- npm test and npm start replace ./N1.sh

- APM is still around, and is only put into N1 so it can install plugins at runtime.
  It should be removed as soon as we notify package maintainers and have them provide zips.

- N1 no longer has it's own compile-cache or babel/typescript/coffeescript compilers.
  It delegates to electron-compile and electron-compilers. Both of these packages had
  to be forked and modified slightly, but I'm hopeful the modifications will make it back
  in to the projects and you can still consult their documentation for more info.

  + In the near future, I think we should stop shipping electron-compilers with N1. This
    would mean that all plugins would need to be compiled on pre-publish, just like NPM
    packages, and would complicate the local development story a bit, but would make the
    app smaller. electron-compile is not supposed to compile at runtime in the prod app,
    just pull from the compile cache.

- I've re-organized Grunt according to Grunt best practices, where each tasks/* file
  specifies it's own config and imports grunt tasks.

- Unfortunately, I was not able to use any open source projects for the deb and rpm builds,
  because we have things like postinst hooks and start menu items which are not supported
  by the electron installer-generators.

WIP

Turn off all LESS compilation, because themes. Doh.

Use Grunt for new build process too, just remove tasks

More changes

Add babel-eslint

Remove unused react-devtools

WIP

Add name

Ignore nonexistent

Switch to more modern approach to config for grunt

Move zipping to mac installer task

Restructure publish task so it aggregates first, can log useful info if publishing is disabled

Fix build dirs

Fix win installer

Fix linux installer

Fix linux installer

Try making linux

A few more

Updates

Upadtes

fixes

fixes

Get rid of non-meaningful variables

Resolve assets path

Insert nylas.sh

Clean up args more

Actually use description

Fix display name ugh

More tweaks

Expliclty write /usr/bin/nylas

Improve vars

Use old nylas.sh

Reinstate APM to better scope this diff

Test Plan: Test on Mac, Windows, Linux

Reviewers: evan, jackie, juan

Reviewed By: jackie, juan

Differential Revision: https://phab.nylas.com/D3411
2016-11-09 13:52:10 -08:00
Ben Gotow f558f05d69 fix(image-editing): Fix selector for finding <img> 2016-11-08 11:54:19 -08:00
Juan Tejada 35343ac963 fix(send-and-archive) Make sure package is registered in work window so PerformSendActionTask can find it (#3023) 2016-11-07 14:35:38 -08:00
Ben Gotow 34b02018ff fix(local-sync): Display relevant error so users can debug 2016-11-07 14:12:53 -08:00
Jamie Wilson d366957829 (darkside) fixing composer fields spacing (#3020)
* fixing composer fields spacing

* updating attachement selector names
2016-11-07 09:49:25 -08:00
Evan Morikawa b102b39037 fix(spec): fix DST related spec failure & linter error 2016-11-05 11:56:23 -07:00
Jackie Luo 3dbd9b7278 feat(notifications): Allow notifications to be dismissable 2016-11-04 16:30:28 -07:00
Ben Gotow 4cd60e1042 fix(darkside): remove notifications shadow 2016-11-04 11:32:14 -07:00
Ben Gotow d214a52192 fix(prefs): Only scroll to top when switching tabs 2016-11-04 11:32:14 -07:00
Halla Moore a269a103e1 Revert "💄(messages): Remove max-width styles"
This reverts commit 45dc4a08be.
2016-11-04 11:03:22 -07:00
Ben Gotow 403d2096b8 fix(gh-sidebar): Don’t customize <h2> styling 2016-11-04 10:58:34 -07:00
Halla Moore 45dc4a08be 💄(messages): Remove max-width styles
Although some word-wrapping may look better at 800px, it looks much worse
when we can't properly display html emails that are meant for a wider area.
It also just seems a little weird to limit our users in this way.
2016-11-04 10:52:51 -07:00
Juan Tejada ff61527d75 fix(search): Prevent duplicate results from search query
This is a temporary fix which adds defensive code to prevent duplicate results
from being returned from the thread search query which causes N1 to enter a loop
and freeze (#3001).

Duplicate results from the search query likely indicate that a thread
was indexed twice, which was not the case before. The cause for this is
still at large.
2016-11-04 10:50:10 -07:00
Ben Gotow 919697c070 fix(theme-picker): Regression in design of theme picker 2016-11-04 10:29:59 -07:00
Juan Tejada 3fc9ee7927 💄(attachments): Fix file attachment styles 2016-11-03 23:02:15 -07:00
Juan Tejada 2c63ae944b fix(attachments) Add default value for filePreviewPaths in case they are not provided 2016-11-03 18:26:11 -07:00
Ben Gotow be3d2f0b44 fix(auth): Add partition back to webview 2016-11-03 17:42:20 -07: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
Jackie Luo 4efcbb4fc3 fix(email-frame): Refactor if/else for frame height 2016-11-02 15:56:27 -07:00
Jackie Luo 57c25b7fa9 fix(email-frame): Revert to body scrollHeight if documentElement's is zero 2016-11-02 15:35:58 -07:00
Jackie Luo bf95181ea8 fix(logging): Remove console.log() 2016-11-02 15:35:58 -07:00
Jackie Luo e1a5e6e1ea fix(email-frame): Prioritize documentElement for scroll height 2016-11-02 15:35:58 -07:00
Ben Gotow c59fc486d7 fix(search): Rename package, fix column naming issue 2016-11-02 13:13:16 -07:00
Ben Gotow 432012a6bc feat(search): Fix slow queries with FTS5 on Contacts 2016-11-02 13:03:28 -07:00
Halla Moore d996273b7b fix(email-frame) Only use documentElement scrollHeight if it is taller than body
There are cases where the documentElement has a scrollHeight of 0, even if
the body has a larger scrollHeight. Before, we were always using the
documentElement if it was present. Now, we use the maximum scrollHeight.
2016-11-02 11:38:26 -07:00
Juan Tejada 20b6a6e070 feat(attachments): Add ability to preview with quicklook (mac only)
On mac, you can now preview an attachment by clicking on the new preview
icon, or by pressing space bar when an attachment is focused.

This commit also updates the styling for attachment items and adds the
ability to focus attachment items. We don't keep any focused state, just
the browser's, which means you can focus attachments by clicking, or
tabbing/shift-tabbing
2016-11-01 16:13:42 -07:00
Halla Moore afbcfb6853 fix(sidebar-notifs): Set containersRequired on the notifs-wrapper
Switch from manually setting containerRequired to false on each individual
notification to setting it on the InjectedComponentSet within the
notifs-wrapper. This way, people adding new notifications don't need to
remember to manually set it themselves.
2016-11-01 11:46:47 -07:00
Juan Tejada 44a7fa7117 fix(reminders): Add missing assets, ui cleanup, restore dead code
Summary:
This commit adds a couple of missing assets, including the icon for the
plugin list and other misc icons. It also switches to the new UI where
we use the thread timestamps to display the reminder date in the
Reminders perspective instead of using mail labels. It also adds a
header to the threads inside the reminders perspective to indicate that
a reminder will be triggered if no one replies to their email.

It also adds a header to indicate when a message has been brought back
to the inbox due to a reminder based on sdw's designs.

Finally it restores some code that magically disappeared when landing
reminders + other misc cleanup

Test Plan: Manual

Reviewers: bengotow, halla

Reviewed By: bengotow, halla

Differential Revision: https://phab.nylas.com/D3388
2016-11-01 11:39:50 -07:00
Juan Tejada b8ed562d19 🎨(attachments): DRY and cleanup attachment components code
Summary:
The attachment components were the only React Components which used
inheritance between components, which is an anti-pattern in react. I
deleted these components in favor of new purely functional/dumb
components exposed via the component-kit: Attachment Item and
ImageAttachmentItem. These are defined in the same file to reuse some
smaller components between them, like the progress-bar, etc.

The attachments pacakage still remains, and only registers a single component to
a new are called MessageAttachments. This InjectedComponent role is
shared by the Composer and MessageItem, and is the only reason this
exists as an injected component in a separate package.
MessageAttachments renders all image and non image attachments for a
message or draft, and binds the appropriate actions for removal, downloading, etc.

The composer still used FileUpload and ImageUpload components for rendering
uploads in the Composer (i.e. when you add an attachment (these are
different from files because they aren't saved until the draft is
sent)). These 2 components were pretty much copied and pasted from the
ones in the attachments package, with subtle differences-- I got rid of
these as well in favor of the new AttachmentItem and ImageAttachmentItem

Also convert more coffee to ES6!

Test Plan: Unit tests

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3381
2016-10-31 17:26:20 -07:00
Evan Morikawa 2c1dbeb31f fix(channel): only show stable or beta
Or the salesforce channel if you've ever used it before
2016-10-28 16:49:10 -04:00
Ben Gotow 020cc06b36 lint(send-action-button): Whoa nylaslint just chill 😂 2016-10-27 15:06:51 -07:00
Ben Gotow 1c21137600 es6(list): ListDataSource, subclasses => ES2016 2016-10-27 12:08:59 -07:00
Juan Tejada 990719685a fix(warnings):Fix react warning caused by decorator 2016-10-27 12:05:02 -07:00
Juan Tejada da48d8433e fix(specs): Fix date input specs 2016-10-27 11:35:37 -07:00