Commit graph

301 commits

Author SHA1 Message Date
Ben Gotow 80b315d708 deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08: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
Ben Gotow 1c21137600 es6(list): ListDataSource, subclasses => ES2016 2016-10-27 12:08:59 -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
Ben Gotow c20238314d lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -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
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
Ben Gotow 109fb21dc7 fix(thread-list): Use interaction handlers, don’t update selection directly 2016-09-27 16:31:28 -07:00
Ben Gotow 298cb55054 bump(react): 15.3.x, warning removal, thread-sharing tweaks 2016-09-20 17:28:50 -07:00
Ben Gotow 9e3d864962 fix(drag-drop): Restore support for thread dragging 2016-09-20 15:48:15 -07:00
Evan Morikawa cfb47e95bd fix(size): Losslessly compress package images via ImageOptim 2016-09-01 11:32:52 -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
Jackie Luo 96b947b8d9 feat(snooze): Add command for keyboard shortcut
Test Plan: Tested locally.

Reviewers: bengotow, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3008
2016-06-07 10:29:52 -07:00
Juan Tejada a4ee61eadc fix(mail-merge): Refactor mass sending procedure
Summary:
This diff introduces several updates to mail merge to improve the procedure for sending a list of drafts.
Specifically, sending mass email will now:

- Clear mail merge metadata on the drafts that will actually be sent
- Upload attached files only /once/, and reuse those files on the drafts that will actually be sent
- Minimize database writes for new drafts being created
- Will queue a SendManyDraftsTask that will subsequently queue the necessary SendDraftTasks and keep track of them, and notify of any failed tasks

TODO:
- Add state to MailMerge plugin for failed sends and ability to attempt to re send them

Test Plan: - TODO

Reviewers: evan, bengotow, jackie

Reviewed By: bengotow, jackie

Subscribers: jackie

Differential Revision: https://phab.nylas.com/D2973
2016-05-24 17:22:09 -07:00
Ben Gotow c441913f0e fix(drafts): Support additional deletion shortcuts #939 2016-05-09 17:28:52 -07:00
Ben Gotow da07fe21ab feat(not-spam): Unmark items as junk / spam #2112 2016-05-09 17:28:52 -07:00
Ben Gotow 35d5f29b82 fix(thread-list): Add missing displayName, ES6 2016-05-09 13:18:07 -07:00
Ben Gotow 42ef0e98a4 fix(lint): Various linter issues 2016-05-06 16:06:16 -07:00
Evan Morikawa 837627aa39 feat(babel6): 1,774 linter errors 2016-05-06 11:55:46 -07:00
Evan Morikawa 50f301e845 feat(babel6): fix es6 describe function syntax 2016-05-06 11:55:20 -07:00
Evan Morikawa 47c064617d feat(babel6): Fix destructuring default from exports and update linter 2016-05-06 11:55:14 -07:00
Evan Morikawa 7f50074c0d feat(babel6): Convert to use new es6 require syntax 2016-05-06 11:54:55 -07:00
Ben Gotow 040c3bc45a fix(build): linter errors 2016-04-28 16:40:48 -07:00
Ben Gotow c2cf89026e fix(thread-list): Don't rely on zip since it can become off-by-one forever 2016-04-28 15:53:51 -07:00
Ben Gotow 5bda8993f0 fix(thread-list): Remove unnecessary extra trigger 2016-04-27 15:20:25 -07:00
Ben Gotow 43b65ca36c cson(cleanup): Remove imports, only used for config.cson now 2016-04-24 20:33:34 -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 bb71529322 fix(attachments): Don't show the paperclip for inline attachments < 3k (signatures, etc.) 2016-04-20 10:44:32 -07: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 b521cf7f03 fix(star): Change action from Star All => Star #1927 2016-04-14 16:34:46 -04:00
Ben Gotow d1211ab7de bump(electron): 0.36.7 => 0.37.5 2016-04-12 18:42:57 -07:00
Juan Tejada 172ac4fc0a update(search): Add search usage reporting + other fixes
Summary:
- Converts SearchQuerySubscription to ES6 to fix method overriding for
  `removeCallback`
- Reports different usage metrics for search
- Removes unecessary data source listener iniside ThreadListStore:
  - This listener focused the first thread on the list, which is
  actually unwanted (#1461)
  - It prevented QuerySubscriptions from being disposed promptly because
  of the remaining listener. They qould only be disposed until the
  subscription triggered once, which is not actually desired behavior
  (e.g. for SearchQuerySubscription)

Test Plan: - Manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2864
2016-04-08 14:11:32 -07:00
Ben Gotow 965884fa95 fix(*): Minor CSS fixes, open tracking fix when only message is draft 2016-04-06 12:35:30 -07:00
Juan Tejada 4e326edfce fix(warning): Add key to react component 2016-04-05 12:16:32 -07:00
Ben Gotow b4434f6617 fix(focus): Remove focusedField in favor of imperative focus, break apart ComposerView
Summary:
- Removes controlled focus in the composer!
  - No React components ever perfom focus in lifecycle methods. Never again.
  - A new `Utils.schedule({action, after, timeout})` helper makes it easy to say "setState or load draft, etc. and then focus"
  - The DraftStore issues a focusDraft action after creating a draft, which causes the MessageList to focus and scroll to the desired composer, which itself decides which field to focus.
  - The MessageList never focuses anything automatically.
- Refactors ComposerView apart — ComposerHeader handles all top fields, DraftSessionContainer handles draft session initialization and exposes props to ComposerView
  - ComposerHeader now uses a KeyCommandRegion (with focusIn and focusOut) to do the expanding and collapsing of the participants fields. May rename that container very soon.
- Removes all CommandRegistry handling of tab and shift-tab. Unless you preventDefault, the browser does it's thing.
- Removes all tabIndexes greater than 1. This is an anti-pattern—assigning everything a tabIndex of 0 tells the browser to move between them based on their order in the DOM, and is almost always what you want.
- Adds "TabGroupRegion" which allows you to create a tab/shift-tabbing group, (so tabbing does not leave the active composer). Can't believe this isn't a browser feature.

Todos:
- Occasionally, clicking out of the composer contenteditable requires two clicks. This is because atomicEdit is restoring selection within the contenteditable and breaking blur.
- Because the ComposerView does not render until it has a draft, we're back to it being white in popout composers for a brief moment. We will fix this another way - all the "return unless draft" statements were untenable.
- Clicking a row in the thread list no longer shifts focus to the message list and focuses the last draft. This will be restored soon.

Test Plan: Broken

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D2814
2016-04-04 15:22:01 -07:00
Ben Gotow 209debf797 fix(thread-list): Constrain details width to ensure attachment icon visible. #1858 2016-04-01 14:49:15 -07:00
Ben Gotow 39768fd9d4 bump(react): 0.13.2 => 0.14.7
Great breakdown of React changes here:
https://github.com/facebook/react/blob/master/CHANGELOG.md#0140-october-7-2015

Due to deprecation warnings, I don't think this will break third-party extensions unless they were doing really bad things.
2016-03-29 01:43:12 -07:00
Jackie Luo 9a923c7c88 fix(thread-list): Show emoji in bolded subject lines 2016-03-27 15:51:27 -07:00
Juan Tejada 5d90cb40b0 🎨(selected-stack): Update text color for clear selection btn 2016-03-24 15:47:49 -07:00
Ben Gotow cbce8fb79b fix(search): Display search API errors in transient notiication bar 2016-03-24 15:42:05 -07:00
Juan Tejada 4bfb4fe916 patch(thread-list): Limit number of injected icons in narrow mode to 1
- Update InjectedComponentSet to take a limit for the amount of matching
  components to render
2016-03-24 12:32:01 -07:00
Juan Tejada d3ca6e592d feat(list): Add ThreadIcon injected region to narrow thread-list 2016-03-24 12:00:49 -07:00
Ben Gotow 1d97b6811a fix(selection): Make the clear selection button a button 2016-03-24 10:57:12 -07:00
Ben Gotow 92bff6ca5a fix(drafts): Formalize draft factory, add reply "behaviors" #1722
Summary:
This diff implements a behavior change described in https://github.com/nylas/N1/issues/1722.

Reply buttons should prefer to focus an existing draft in reply to the same message, if one is pristine, altering it as necessary to switch between reply / reply-all. If no pristine reply is already there, it creates one.

Reply keyboard shortcuts should do the same, but more strictly - the shortcuts should switch between reply / reply-all for an existing draft regardless of whether it's pristine.

This diff also cleans up the DraftStore and moves all the draft creation itself to a new DraftFactory object. This makes it much easier to see what's going on in the DraftStore, and I also refactored away the "newMessageWithContext" method, which was breaking the logic for Reply vs Forward between a bunch of different helper methods and was hard to follow.

Test Plan: They're all wrecked. Will fix after concept is greenlighted

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2776
2016-03-22 15:47:51 -07:00
Juan Tejada dfd051339d fix(message-list-toolbar): Fix observable for selection & focused thread 2016-03-22 11:28:55 -07:00
Juan Tejada e83bf2bbec feat(selection): Add new display for selection count + update toolbar
Summary:
- New behavior is that the in split mode, you will perform actions on
  the selection via the MessageListToolbar (the toolbar positioned above
  the message list)
- Refactored and moved around a bunch of code to achieve this:
  - Mostly renaming stuff and moving stuff around and removing some
    duplication
  - Update naming of toolbar role to a single role, and update relevant code
  - Converted and refactored a bunch of code into ES6, specifically to reuse the code for the ThreadActionsToolbar at the 2 locations
  - Deprecated MultiselectActionBar in favor of MultiselectToolbar
  - Deprecated old roles
- Punted the animation for the stackable cards in the selection display for now.
- #370

Test Plan: - Manual and unit tests

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2756
2016-03-21 12:20:11 -07:00
Ben Gotow 466bca813b fix(syncback): Bidirectional transforms, ready-to-send saved state
Summary:
This diff replaces "finalizeSessionBeforeSending" with a
plugin hook that is bidirectional and allows us to put the draft in
the "ready to send" state every time we save it, and restore it to
the "ready to edit" state every time a draft session is created to
edit it.

This diff also significantly restructures the draft tasks:

1. SyncbackDraftUploadsTask:
   - ensures that `uploads` are converted to `files` and that any
     existing files on the draft are part of the correct account.

1. SyncbackDraftTask:
   - saves the draft, nothing else.

3. SendDraftTask
   - sends the draft, nothing else.
   - deletes the entire uploads directory for the draft

Test Plan: WIP

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2753
2016-03-16 19:27:12 -07:00
Ben Gotow 310b8de2b0 fix(next/prev): Move buttons to correct column #1721 2016-03-15 09:16:28 -07:00
Jackie Luo 6e9384792a 🎨(themes): Fixes Windows button UI issues in #1649 2016-03-12 11:43:49 -08:00
Ben Gotow 7c2fd2a91b fix(labels): Do not re-use mail labels if they're removable 2016-03-10 17:08:42 -08:00