Summary:
This commit adds a new option to NylasAPIRequest api to allow users to
specify requests that should only ever be executed once, once they
succeed. This is done via saving a hash of some of the requests
properties to the filesystem.
Specifically regarding send, this ensures that a draft never be sent
twice from N1. We ran into this case once when the final state of the TaskQueue
wasn't saved to the database before the N1 app closed. In this case, a
PerformSendActionTask that was supposed to be dequeued, was restored to
the task queue again when N1 restarted, causing the draft to be sent
twice.
Test Plan: Manual
Reviewers: evan, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D3407
Summary:
Save the final state of the TaskQueue to the database before window
gets unloaded
Test Plan: Manual
Reviewers: evan, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D3408
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
Decaffination replaces someString[index..-1] with
someString.slice(index, -1 + 1), which is bizzare. This commit changes those
instances to someString.slice(index).
This commit fixes a bug in which you couldn't shift select threads from
the bottom to the top (i.e. select a thread, shift-click a thread on top of it
would not select the range of threads).
This bug was introduced by a translation from coffeescript to JS.
Specifically, by converting
```
for idx in [startIdx..endIdx]
```
to
```
for (let idx = startIdx; idx <= endIdx; idx++) { ... }
```
The coffeescript range syntax for `[x..y]` automatically generates the
correct range when x > y or when x < y, generating a descending or
ascending range respectively.
However, our transaltion simply iterated ascendingly from `startIdx`
to `endIdx`, which would be a no-op when the `startIdx` was greater than
the `endIdx`, which was the case when shift-selecting threads from bottom to top.
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
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
Menu items could not be opened on Linux because Linux allows menu items to be
disabled, and the logic for determining if a menu item should be enabled was
accidentally negated during coffescript conversions.
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