Commit graph

9 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
Ben Gotow 80b315d708 deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -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
Juan Tejada 5d837ffd02 feat(undo-send): Add undo send
Summary:
Add ability to undo send. We decided to make undo send completely client side for a couple of reasons. If we rely on send-later for undo-send, we would be giving /all/ send load to our send-later backend. If this increases the send-later load too much, it might cause delays in the regular send-later functionality and potentially other plugins like snooze that run under the same service. We would also need to rely on the network to be able to cancel a send, which would make it unusable offline or hard to debug if that specific request fails for any given reason.

This commit also refactors the way `ComposerExtension.sendActionConfig` works. The method has been renamed and now must return an array of send actions. Also, all of the business logic to handle different send actions registered by extensions has been pieced apart from the SendActionButton and into a new SendActionStore. This also enables undo send to undo custom send actions registered by extensions.
Along the way, this also fixes a pending TODO to show all registered custom send actions in the preferences for choosing the preferred send action for sending.

Undo send works via a task, so in case N1 closes before send goes through, it will still be persisted to the task queue and restored when opened again. Undoing a send means dequeuing this task.

Test Plan: Manual

Reviewers: jackie, bengotow, halla, evan

Reviewed By: bengotow, halla, evan

Differential Revision: https://phab.nylas.com/D3361
2016-10-26 20:40:10 -07:00
Halla Moore 1c675935a7 feat(popout-threads) Add functionality to open threads in popout windows
Summary:
Threads can now be opened in separate windows. This can be done via the popout
icon next to the print icon, or by double-clicking the thread when in double-
pane mode. Note that the single-click action is still fired, which is why
double-clicking does not work in single-pane mode. The popout icon changes to a
pop-in icon while in the popout window, to allow users to collapse it back into
the main window.

Test Plan: Tested locally

Reviewers: evan, juan

Reviewed By: juan

Subscribers: sdw

Differential Revision: https://phab.nylas.com/D3332
2016-10-12 13:55:11 -07:00
Juan Tejada f12896d54f fix(gmail-labels): Constraint so threads always belong to all,spam or trash
Summary:
- In Gmail all threads /must/ belong to either All Mail, Trash and Spam, and
  they are mutually exclusive, so we need to make sure that any add/remove
  label operation still guarantees that constraint
- Update ChangeLabelsTask to modify the set of labels to add and remove
  based on this rule
- Update tasksFor archiving, moving to trash and moving to spam so they
  don't affect any other labels in the thread, as gmail does.
- Removing from view /will/ remove any current labels, but will also
  move between all mail and trash as needed
- Remove Inbox, Trash and Spam from the CategoryPicker, as Gmail does

Test Plan: - Unit tests

Reviewers: drew, evan, bengotow

Reviewed By: drew, evan, bengotow

Differential Revision: https://phab.nylas.com/D2715
2016-03-10 14:13:31 -08:00
Ben Gotow fecd8c9541 fix(send-and-archive): Was disabling signatures due to name collision 2016-02-01 17:33:18 -08:00
Ben Gotow 685fa625a5 fix(send+archive): Update to use focused perspective 2016-01-29 19:01:47 -08:00
Evan Morikawa ecbadaf01e feat(send): Send and Archive
Summary: Send and Archive plus a new setting.

Test Plan: new tests

Reviewers: bengotow, juan

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2446
2016-01-25 14:14:09 -08:00