Commit graph

32 commits

Author SHA1 Message Date
Evan Morikawa a20b979208 feat(analytics): add analytics for change mail tasks
Summary:
Adds the following new events:

- Threads Moved to Folder
  - isArchive
  - source
  - folderType
  - folderDisplayName
  - numThreads
  - numMessages
  - description
  - isUndo

- Threads Changed Labels
  - isArchive
  - source
  - labelTypesToAdd
  - labelTypesToRemove
  - labelDisplayNamesToAdd
  - labelDisplayNamesToRemove
  - numThreads
  - numMessages
  - description
  - isUndo

- Threads Starred
  - source
  - numThreads
  - description
  - isUndo

- Threads Unstarred
  - source
  - numThreads
  - description
  - isUndo

- Threads Marked as Read
  - source
  - numThreads
  - description
  - isUndo

- Threads Marked as Unread
  - source
  - numThreads
  - description
  - isUndo

Each new action has a "source" property that's one of the following:
- Category Picker: New Category
- Category Picker: Existing Category
- Toolbar Button: Message List
- Toolbar Button: Thread List
- Send and Archive
- Context Menu: Thread List
- Thread List Icon
- Quick Actions: Thread List
- Swipe
- Keyboard Shortcut
- Dragged Out of List
- Snooze Move
- Important Icon
- Label Remove Icon
- Thread Selected
- Mail Rules
- Dragged Into List

Test Plan: manual

Reviewers: juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3760
2017-01-24 12:22:33 -05:00
Mark Hahnenberg c7d8f1700d [thread-search] Background on-keypress search queries
Summary:
When the search index got very big the queries we were running during
after keypress would cause jank in the UI which was very noticeable on
subsequent keypresses. This diff backgrounds these queries and adds a
LIMIT to the fts MATCH clauses to avoid having to send too much stuff
across the IPC bridge.

Test Plan: Run locally, make sure that typing is smooth while searching

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D3757
2017-01-23 11:50:27 -08:00
Mark Hahnenberg ee438c7219 [thread-search] Add support for category search (i.e. "in:foo")
Summary: See title

Test Plan: Run locally, search for specific labels

Reviewers: evan, juan

Reviewed By: evan, juan

Differential Revision: https://phab.nylas.com/D3656
2017-01-13 11:53:41 -08:00
Mark Hahnenberg 668c2935c9 [thread-search] Improve local thread search
Summary:
Previously we waited to build the local ThreadSearch index until we were
done with the initial mail sync. This is undesirable because inboxes can
be very large, making local sync useless for a number of hours after a
user adds an account. This diff removes that restriction.

This diff also adds a new rudimentary new grammar (along with accompanying lexer
and parser) for local thread search queries. This grammar is then
translated into the appropriate SQL queries on the ThreadSearch index
table. More advanced features (e.g. in:category, date ranges, etc) can be added
easily in the future by augmenting this simple search query language.

Test Plan: Run locally, new unit tests

Reviewers: juan, evan, khamidou

Reviewed By: khamidou

Differential Revision: https://phab.nylas.com/D3614
2017-01-11 14:26:42 -08:00
Mark Hahnenberg f3caf0b561 [thread-search] Fix archiving from search perspective
Summary:
We weren't removing the inbox category in the search perspective, so
things weren't actually being archived.

Test Plan: Run locally

Reviewers: juan, evan

Reviewed By: evan

Maniphest Tasks: T7389

Differential Revision: https://phab.nylas.com/D3575
2017-01-04 11:15:45 -08:00
Evan Morikawa 9ee8eae633 fix(search): allow custom search result elements 2016-11-17 16:01:55 -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
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
Ben Gotow 80b315d708 deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08: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
Juan Tejada f2e7ea4c4c feat(reminders): Add send reminders functionality
Summary: Add reminders plugin which lets you set reminder if you don't get a reply for a message within a specified time in the future

Test Plan: TODO

Reviewers: halla, bengotow, evan

Reviewed By: halla, bengotow, evan

Differential Revision: https://phab.nylas.com/D3356
2016-10-27 08:49:29 -07:00
Juan Tejada 316933fa58 Revert "Fix issue #2758. Press Escape after a finished search to get back to … (#2939)"
This reverts commit 6377da8291.
This was already fixed in a95c17bce3
2016-10-26 13:20:26 -07:00
Yishu See 6377da8291 Fix issue #2758. Press Escape after a finished search to get back to … (#2939)
* Fix issue #2758. Press Escape after a finished search to get back to Inbox

Use a keydown event when search bar is in focus to capture escape key press

* fix(search): Convert to ES2016
2016-10-26 11:57:57 -07:00
Juan Tejada a95c17bce3 fix(search): Use fts search index for typeahead results
Summary: This improves performance of the search typeahead

Test Plan: Manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D3363
2016-10-24 14:18:29 -07:00
Ben Gotow ccbd717c6e fix(search): Missed a .default 2016-10-20 12:21:15 -07:00
Ben Gotow fe82977574 fix(search): React warns, convert to ES2016 2016-10-20 12:09:53 -07:00
Ben Gotow 51f9001c21 cleanup(*): Remove dead .bowerrc, .gitignore files 2016-10-14 11:39:34 -07:00
Ben Gotow 664943354e bump(electron): Electron 1.4, node-sqlite 3.1.4+fts 2016-09-16 08:59:36 -07:00
Juan Tejada aaeda2e5ac fix(deltas): Consolidate nylas-long-connection code
- Completely remove nylas-long-connection.coffee file and consolidate all logic into
nylas-long-connection.es6 and worker-sync/delta-streaming-connection.es6:
  - Separate it into DeltaStreamingConnection which is specific to the worker-sync
    package for handling deltas
  - NylasLongConnection is a "reusable" persistent connection to our API
    which is also used by the search package
  - This is a basically a fixed revision of https://phab.nylas.com/D2875,
    see difff for more info
- Makes it so delta streaming does not retry so aggressively on 403s, which
  happens whenever a user’s trial has expired
2016-07-27 02:56:55 -07:00
Evan Morikawa 6215fbb200 fix(analytics): update people traits 2016-06-07 13:52:08 -07:00
Evan Morikawa c4753197ee fix(analytics): improved analytics 2016-06-07 13:38:47 -07:00
Evan Morikawa 9355a2635d feat(babel6): fix es6 importing from coffee 2016-05-06 12:00:45 -07:00
Evan Morikawa 87b1d5075b feat(babel6): Fix syntax errors and add regenerator runtime 2016-05-06 11:55:08 -07:00
Evan Morikawa 7f50074c0d feat(babel6): Convert to use new es6 require syntax 2016-05-06 11:54:55 -07:00
Ben Gotow 5d9cf73c3c es6(*): AutoUpdateManager, ProtocolHandler, more. 2016-05-04 19:34:41 -07:00
Ben Gotow 16dd26c29e fix(build): CSON => JSON no longer necessary for /keymaps, /menus 2016-04-24 20:27:29 -05:00
Ben Gotow a48ddd51f8 refactor(menus): Major prune of keymaps/commands, real conditional menus
Summary:
Keymaps & menus CSON => JSON, remove AtomKeymaps, CommandRegistry use of CSS selectors, use Mousetrap instead

Important Notes:

- The `application:` prefix is reserved for commands which are handled in the application process. Don't use it for other things. You will not receive the events in the window.

- Maintaining dynamic menus seems to come with quite an overhead, because Electron updates the entire menu every time. In the future, we'll need https://github.com/electron/electron/issues/528 to really make things nice. I will be tracking this upstream.

- The format for keyboard shortcuts has changed. `cmd-X` is now `command+shift+x`

Test Plan: Run tests

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2917
2016-04-24 12:16:25 -05:00
Ben Gotow 36ab9d593b feat(unread/spam): New items in the sidebar for unread and spam
Summary:
Adds a new unified "Spam" folder and a unified "Unread" view,
which shows all the messages in your inbox which are unread.

Test Plan: Run tests

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2901
2016-04-19 11:32:33 -07:00
Ben Gotow 1b6525910c fix(search-bar): Apparently we were not providing keys 2016-04-13 16:08:24 -07:00
Ben Gotow b64719d09f fix(search): Cannot remove items from search (Sentry 30318) 2016-04-13 14:22:43 -07:00
Juan Tejada 3716706833 feat(thread-search): Add spinner to indicate search in progress
Summary:
- This diff also restructures the search package in a few ways:
  - Rename package to `thread-search` instead of `search-bar`
  - Move SearchQuerySubscription and SearchMailboxPerspective inside
  package. This allows SearchQuerySubscription to have access to
  SearchActions in a clean way and keeps all of the search related code
  in 1 package
  - Remove SearchMailboxPerspetcive from mailbox-perspective.coffee
- Adds temporary spinner while we get a new design for it

Test Plan: - TODO

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2868
2016-04-10 16:20:26 -07:00