Commit graph

1883 commits

Author SHA1 Message Date
Ben Gotow 56285ad6c4 feat(bios): Linkify twitter hashtags and mentions in bios 2016-09-29 11:25:08 -07:00
Juan Tejada b23c55d5b4 fix(dev): Pretty print deltas 2016-09-28 16:51:50 -07:00
Juan Tejada b14d52b482 fix(draft-list): Don't render html string in draft subject 2016-09-28 16:02:47 -07:00
Ben Gotow 2739cc822e fix(identity): Always refresh accounts after identity
This fixes an issue where changing your Nylas ID didn’t refresh your accounts, and N1 would still think they were invalid.
2016-09-28 11:29:26 -07:00
Ben Gotow 60d0d94b1b fix(react): React refuses to add partition attr to webview 2016-09-28 11:29:26 -07:00
Juan Tejada 4f8ad70d60 fix(search): Update local search syntax to include more results
Add prefix search. Previously, if searching for a thread with a specific
subject, you had to type the entire subject. Searching for just a prefix
wouldn't return the result.
This should not affect any of the current search results, only add more results
2016-09-28 11:06:10 -07:00
Jackie Luo e10a0668ed fix(lint): Change variable to const 2016-09-27 23:39:10 -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 3cfd16fc1b fix(composer): No need for overlaid z-index: 10, appearing over menus 2016-09-27 14:40:58 -07:00
Ben Gotow a0ab700ca6 💄(mail-merge): Fix alignment and height of tokens 2016-09-27 14:36:58 -07:00
Ben Gotow 8fada3b9da fix(sidebar): Command-click + href to open in background
Global window event handler should work when clicking elements /inside/ of an a tag with an href.
2016-09-27 14:36:58 -07:00
Ben Gotow 53fcbfc00e 💄(sidebar): Github repos should not wrap 2016-09-27 14:36:58 -07:00
Jackie Luo 42274b656c fix(install-location): Update language and remove buggy regex 2016-09-27 10:35:50 -07:00
Juan Tejada fc87ae5ef1 fix(lint) 2016-09-26 17:22:08 -07:00
Ben Gotow 039d9bea61 feat(inline-images): Drag & drop or paste inline images
Summary: Initial support for inline images. Tests still forthcoming!

Test Plan: WIP

Reviewers: mark, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3295
2016-09-26 17:01:19 -07:00
Mark Hahnenberg dde4738363 Fix broken test
Summary:
Fixes a test that was broken due to my unfamiliarity with
CoffeeScript :-/

Test Plan: Tests

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: juan

Differential Revision: https://phab.nylas.com/D3302
2016-09-26 16:49:22 -07:00
Juan Tejada 6051512276 fix(contact-sidebar): Correctly update selected contact
Sometimes, when selecting a contact (with name, email) inside a thread,
the dropdown (`<select>`) did not correctly reflect the selected
contact.

This was because when focusing a contact, the FocusedContactStore
queried that contact from the database just by email, and the contact
retured from the database became the focused one. However, sometimes the
returned contact might have the same email but different email, and
given that the `<select>` component is keyed by both name,email, it
couldn't find the appropriate <option> to render, so it could not update
to reflect the newly selected contact

Now, the FocusedContactStore queries by email and name to prevent this
2016-09-26 16:34:29 -07:00
Mark Hahnenberg 0319528988 Add jitter to BackoffTimer
Summary:
This should help us avoid the thundering herd problem if we have some
kind of API outage affecting a wide number of clients.

Test Plan: Tests

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: juan

Differential Revision: https://phab.nylas.com/D3297
2016-09-26 13:36:49 -07:00
Juan Tejada 6e7495fe91 fix(mail-merge): Add test coverage 2016-09-26 11:20:10 -07:00
Ben Gotow 18d294c42f feat(transforms): Replace regexp body transforms with DOM approach
Summary:
We originally didn't do this because creating a DOM tree was loading images.
Using range.createContextualFragment seems to do it without the tree ever
being attached.

Accompanying changes to src/pro are here:
https://phab.nylas.com/D3300
https://github.com/nylas/edgehill/compare/bengotow/draft-dom-transformations?expand=1

Also rename applyTransformsToDraft => applyTransformsForSending. Needed
a new name because the function signature has changed. AFAIK there are no
open source plugins using the old functions.

Test Plan: All specs updated

Reviewers: evan, juan

Reviewed By: evan, juan

Differential Revision: https://phab.nylas.com/D3299
2016-09-23 16:36:08 -07:00
Juan Tejada 3dccb374b3 fix(search/long-conn): Process results buffer before ending connection (#750)
NylasLongConnection ends the connection when the 'end' event is emitted
by the `request` object. When this happens, the global connection buffer is cleared.
Also, the global buffer holds the data we've received from the connection, and
whenever we receive new data, we accumulate it in the buffer and call a processBuffer function
which is throttled to 400ms.

Given that the buffer is global state, and processing occurs
asynchronously with a delay of up to 400ms, if the 'end' event on the connection is
fired before we actually get to process the buffer, we would clear it and show no results.

This scenario currently only affected search because if we accidentally
threw away some data when streaming deltas, we will get that data again
when we reopen the delta streaming connection.
2016-09-22 12:08:59 -07:00
Ben Gotow ec5092c2f5 fix(specs): attribute conversion fixed bugs, broke specs 2016-09-21 11:56:54 -07:00
Ben Gotow c6d8bde6fd fix(accounts): Restore account re-ordering 2016-09-21 11:23:38 -07:00
Ben Gotow 7d7edb65bb hack(channel-picker): Hide Salesforce for now 2016-09-21 10:45:04 -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 cfc23b729e lint(*): Fix issue breaking the build 2016-09-20 16:34:30 -07:00
Ben Gotow dc2590a834 fix(tooltips): Position relative to custom container for composer 2016-09-20 16:21:31 -07:00
Ben Gotow 3a975a0e73 fix(auth): Update autofill for Fastmail.fm 2016-09-20 15:52:36 -07:00
Ben Gotow 9e3d864962 fix(drag-drop): Restore support for thread dragging 2016-09-20 15:48:15 -07:00
Ben Gotow e533d063d0 fix(specs): Fix tests that were console.logging, bump coffee-react 2016-09-20 15:17:48 -07:00
Ben Gotow dfbde8b0cc fix(darkside): script/grunt lint requires explicit LESS includes 2016-09-20 10:26:44 -07:00
Jamie Wilson f14cb2e853 design tweaks, breaking css up into files, update readme (#2858) 2016-09-20 10:20:15 -07:00
Juan Tejada 5fc1b7de40 feat(msg-list): Don't make participants mailto links, add context menu 2016-09-19 19:33:52 -07:00
Evan Morikawa a7da53e51e fix(lint): import ui-variables for linter 2016-09-19 21:07:43 -04:00
Ben Gotow 8bc3f04b70 fix(trial): Move”days left” bar to the sidebar, new design 2016-09-19 17:21:55 -07:00
Ben Gotow 190e2713ce feat(channels): Choose an update channel! Limited time only!
Summary: Just a small select input.

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3282
2016-09-19 12:41:16 -07:00
Ben Gotow 664943354e bump(electron): Electron 1.4, node-sqlite 3.1.4+fts 2016-09-16 08:59:36 -07:00
Jackie Luo b6b3512639 fix(subscription): Remove hardcoded trial length 2016-09-14 11:21:48 -07:00
Ben Gotow 4ecbcdd074 fix(copy): Updating language for onboarding tour 2016-09-14 14:16:19 -04:00
Juan Tejada d383d3e637 fix(build): Fix lint errors 2016-09-14 10:14:50 -07:00
Juan Tejada ca54227f06 Add thread-sharing plugin
Summary:
Add thread-sharing plugin:

- Add popover to enable sharing
- Register custom nylas:// protocol to open a thread via protocol is thread exists

Test Plan: Manual

Reviewers: jackie, bengotow

Reviewed By: jackie, bengotow

Subscribers: jackie, halla

Differential Revision: https://phab.nylas.com/D3265
2016-09-14 00:04:20 -07:00
Ben Gotow 7533c7ae81 feat(tutorial): Overlay bubbles that guide you through initial features
Summary:
Add header to show how many trial days remain

More rendering out of Store, consolidate registry and store and expose via new serviceRegistry

WIP

Merge branch 'master' into hallamoore/feature-walkthrough-tutorial

Switch to using observable instead of AbortablePromise

Update submodule

WIP

WIP

Remove annotations

Remove changes

WIP

Test Plan: No tests

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3260
2016-09-13 02:29:38 -04:00
Ben Gotow 59ac291ec0 Remove bad .jsx extension 2016-09-02 11:15:25 -07:00
Juan Tejada 7ed3e472dd fix(markdown): Update editor height 2016-09-01 20:21:13 -07:00
Juan Tejada 477e5f8c2c fix(markdown): Fix textarea bug (use our fork of simplemde)
- Textarea bug prevented us from typing in the markdown editor, almost
consistently. Seems to be a chrome bug
- Stop using textarea and use contenteditable instead via codemirror's
inputStyle option. Had to use our fork of simplemde to be able to pass that option
- Disable spellchecker also
2016-09-01 19:43:10 -07:00
Juan Tejada ae506d88f9 fix(markdown): Add setSelection method 2016-09-01 18:27:39 -07:00
Ben Gotow 263eb1349e Markdown support for quoted text / signatures 2016-09-01 17:31:59 -07:00
Juan Tejada 96e5c696a7 fix(markdown): Fix focusAbsoluteEnd 2016-09-01 16:52:55 -07:00
Juan Tejada 6b1b38a88c fix(markdown): Fix tabbing into composer 2016-09-01 16:44:53 -07:00
Evan Morikawa 2e86fe81ac fix(size): remove unused docs & screenshots 2016-09-01 11:32:52 -07:00
Evan Morikawa cfb47e95bd fix(size): Losslessly compress package images via ImageOptim 2016-09-01 11:32:52 -07:00
Ben Gotow 08c9bc19ea fix(onboarding): Fix React warnings, no back button to auth 2016-09-01 11:11:25 -07:00
Juan Tejada e4d808d19a plugins(*): Add identifying css classes to composer plugin buttons 2016-08-31 09:56:23 -07:00
Jackie Luo cbf40f50c0 feat(markdown): Add Markdown composer 2016-08-30 19:23:01 -07:00
Jackie Luo 5eeaddbb70 fix(onboarding): Receive user info correctly 2016-08-30 19:20:51 -07:00
Evan Morikawa c3826fa972 fix(onboarding): no longer show welcome page 2016-08-30 14:52:19 -07:00
Evan Morikawa ef8108efd1 fix(onboarding): fix injected js error and pass N1 version 2016-08-30 10:41:31 -07:00
Evan Morikawa 05cba2b6d1 feat(webview): can add .open-external class in webview 2016-08-29 19:07:44 -07:00
Jackie Luo 5a3456c5f8 fix(lint): Remove unused variable 2016-08-25 14:18:06 -07:00
Jackie Luo 379d11b31a feat(oauth): Add new component for OAuth sign-in
Summary: Future services that require OAuth get a cute new component that lets them connect more easily.

Test Plan: Tested manually.

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3186
2016-08-25 10:44:32 -07:00
Evan Morikawa 5668444839 fix(dev): don't show tokens in developer api bar
Fixes #2756
2016-08-23 17:45:46 -04:00
Jackie Luo cb229485c3 feat(onboarding): Allow HTTPS in self-hosted sync engine onboarding 2016-08-23 10:46:44 -07:00
Juan Tejada 6c00098861 fix(msg-timestamp): Fix incorrect date var / convert to es6
- Typo in cjsx code broke the message timestamp
- Converted to es6 so this doesn't happen again!
2016-08-18 18:11:52 -07:00
Evan Morikawa b33ca08585 feat(app): dialog box prompting to move to Applications folder 2016-08-18 09:58:13 -07:00
Juan Tejada 43d02da5d9 fix(build): Fix specs and lint errors
Summary: Fix specs and lint errors

Test Plan: Unit

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3168
2016-08-16 17:37:02 -07:00
Jackie Luo 4aa4a0eed9 fix(submodule): Remove submodule commit 2016-08-16 17:30:09 -07:00
Jackie Luo daaf4336d2 fix(tracking): Check for specific plugin before transforming body 2016-08-16 17:22:30 -07:00
Evan Morikawa e14812956c feat(install): add a checker for the install location
Summary:
Adds a new notification bar for mac users only that warns you if N1 is not
in your /Applications folder. Gives you the option to move it to your
/Applications folder.

Test Plan: manual

Reviewers: juan, jackie

Reviewed By: juan, jackie

Differential Revision: https://phab.nylas.com/D3166
2016-08-16 16:58:13 -07:00
Juan Tejada 05bb03bae1 fix(mail-merge/preview): Don't unmount components when toggling preview
Summary:
See edgehill revision: https://phab.nylas.com/D3160

- CustomContenteditableComponents.get now takes a single component to register as an overlaid component, and this component will be passed a prop `{isPreview: true}` when it is meant to be rendered as a preview. Update scheduler and mail-merge to use this new api.

- This prevents the mail merge state from being incorrectly updated when we toggled preview mode -- previously, it believed that the tokens had been unmounted when toggling preview, so they were incorrectly removed from the mail merge state.

- Additionally, makes sure that tokens are correctly added to the mail merge state whenever a token is rendered via componentDidMount -- previously, we only added the token to state when a token was dropped on the contenteditable, however, a token might be pasted or an anchor node might be added by any other means, in which case we want the mail merge state to reflect that. (Adds docs about this)

Test Plan: Manual

Reviewers: jackie, evan

Reviewed By: jackie, evan

Differential Revision: https://phab.nylas.com/D3161
2016-08-16 13:21:41 -07:00
Annie d57cca64d0 add(composer): Turn emails into mailto for debugging purposes
Summary:
fix(subject-field): Fix subject text field focus
Before, if you clicked a mailto link, once the composer loaded, the subject field (which was focused in composer-preload) blurred. This was not ideal as users would want to type once the popout loaded and instead they would have to click first. We identified that this was coming from the composer header _renderSubject injected component. We fixed the focus within mail merge subject text field and additionally added the onComponentDidChange method to injected component. This allowed us to only update the component when the header field changed.

Test Plan: tested on my machine for mailto links

Reviewers: juan

Reviewed By: juan

Subscribers: juan

Differential Revision: https://phab.nylas.com/D3150
2016-08-12 16:06:22 -07:00
Annie 1e6ea1dd07 fix(cursor): Make cursor focus at the top of email
Summary: When you would click outside the contenteditable in the composer, it would focus to the absolute end. Not ideal. I added a check if the click is above the top of the content editable -- if you click the top padding of it -- then focus at the beginning.

Test Plan: is this something i should test?

Reviewers: juan

Reviewed By: juan

Subscribers: juan

Differential Revision: https://phab.nylas.com/D3139
2016-08-12 14:27:31 -07:00
Evan Morikawa 5ed3b9b4a3 fix(env): add remove unload callback for stores
Also add eslint_d to linter setup.
Developer bar store supports bearer token auth
2016-08-05 12:15:39 -07:00
Evan Morikawa 91686627b2 Auth keybase and clearbit
Summary:
Fix to pass N1 ID auth through to edgehill-server for remaining services
(clearbit and keybase) that request authing against the Nylas API. We need
to pass along the N1 ID.

This also requires an Edgehill Server patch here:
https://phab.nylas.com/D3149

Test Plan: Manual.

Reviewers: bengotow, juan

Differential Revision: https://phab.nylas.com/D3151
2016-08-02 16:17:34 -07:00
Annie 0945bdbeab 🎨(signature): Fix signature dropdown styling on different themes
Summary: Ran into issues with the selected tag having different styles associated with it in taiga and in darkside. Fixed these.

Test Plan: Tested on my machine

Reviewers: jackie

Reviewed By: jackie

Subscribers: jackie

Differential Revision: https://phab.nylas.com/D3144
2016-08-01 14:18:13 -07:00
Juan Tejada 8851df50fb fix(utils): Properly export DateUtils.timeZone, fix specs 2016-08-01 12:41:05 -07:00
Ben Gotow c0dd3da5b9 fix(signatures): Scrolling for long signatures 2016-08-01 11:54:00 -07:00
Ben Gotow ffefc93e1f fix(phising): Make detection lower case #1784 2016-07-28 18:19:07 -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
Ben Gotow 1387f219f1 feat(signatures): Fix specs 2016-07-28 14:54:37 -07:00
Ben Gotow 5b12dd6ebd feat(signatures): Upgrade old signatures to new format 2016-07-28 14:46:01 -07:00
Halla Moore 28183cb870 fix(spellchecker): Make sure spellchecker returns selection to its original state
This also fixes the scenario where the link editor wouldn't pop up properly with
misspelled words.
2016-07-28 13:42:53 -07:00
Ben Gotow 44fdb874d9 fix(keybase): incorrect react proptype 2016-07-28 13:33:59 -07:00
Juan Tejada 7dadf2ccd3 fix(specs): Properly spy on streaming connection
- Prevent error logs and actually trying to start delta streaming
connections
2016-07-28 12:40:31 -07:00
Annie 7e3aab2256 refactor(folders): Make folders disappear when deleted rather than graying out until confirmed
Summary:
When testing we thought that Deleting a folder turns it grey but keeps it in the folder list; trying again throws this error.
It turns out, that the folder was actually going to be deleted if left alone long enough, however, since it sat there grey for a while
we would attempt to delete it again which would throw an error. To get around this, we removed the isDeleted grey state and
unpersisted the folder right when delete is clicked then persisted the folder if there was an API error.

fix(folders): Add new and extend destroy category task specs

Test Plan: I tested locally, tweaked destroy category task specs and added minor new specs

Reviewers: bengotow, juan

Reviewed By: juan

Subscribers: bengotow, juan

Differential Revision: https://phab.nylas.com/D3131
2016-07-28 12:10:54 -07:00
Juan Tejada fb18299bc2 fix(log): Rm unecessary console.log call 2016-07-28 10:31:48 -07:00
Jackie Luo 0362849b22 🎨(onboarding): Fix clipped gears in onboarding 2016-07-27 20:08:18 -07:00
Jackie Luo 7d809b7824 🎨(ubuntu): Unhide toolbar for popout composer 2016-07-27 19:32:32 -07:00
Juan Tejada 4427f5eda1 fix(deltas): Update latest cursor, address comments
- Add test to make sure that latest cursor is updated
2016-07-27 14:30:12 -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
Annie b061bf079f build(preferences): Add two buttons to the bottom of the general preferences page that clear email and clear all .nylas
Summary:
Wanted a way to reset configuration settings. I added button in N1 general preferences to remove `.nylas` folder and reboot titled 'Reset Accounts and Settings' as well as one to exclusively remove `.nylas/edgehill.db` titled 'Reset Email Cache'.

Not sure about the wording of the button descriptions.

Test Plan: Tested with different file paths on my machine. Was going to write tests, but the two buttons just call previously tested functions onClick -- rimraf and fs.unlink. Testing might be excessive?

Reviewers: bengotow, juan

Reviewed By: juan

Subscribers: juan

Differential Revision: https://phab.nylas.com/D3127
2016-07-26 16:53:45 -07:00
Annie 3da5c31cdd build(onboarding): Add input with gmail auth url
Summary:
Added animation and input with url of gmail auth for users where the broswer redirect doesnt work.
Still need to finish up some minor styling.

style(onboarding): add input with link for gmail auth if browser redirect doesnt work

Test Plan: testing on my local install

Reviewers: juan

Reviewed By: juan

Subscribers: sdw

Differential Revision: https://phab.nylas.com/D3119
2016-07-26 15:55:45 -07:00
Jackie Luo 50f9a91270 fix(identity): Modify language around subscribing 2016-07-26 15:46:50 -07:00
Jackie Luo e40b5781c2 fix(self-hosting): Check for env properly 2016-07-22 11:00:11 -07:00
Jackie Luo 25f77f0269 fix(quoted-text): Check that message is reply 2016-07-21 17:45:47 -07:00
Jackie Luo 9bda66c081 spec(quoted-text): Fix broken tests 😞 2016-07-21 15:47:54 -07:00
Jackie Luo 49fd61d347 fix(self-hosting): Set identity correctly 2016-07-21 15:46:37 -07:00
Jackie Luo 6a628102ba feat(self-hosting): Add onboarding flow for self-hosted sync engine
Summary:
Adds a fun new UI for adding accounts to the sync engine. After creating your sync engine instance, all you have to do is auth your accounts on the command line and then enter the URL/port number in this flow. That pulls all of your accounts from the `/accounts` endpoint, mocks an identity token, and edits your `config.json` properly.

TODO: Update the docs in the repo and revert the PR with the temporary fix.

Test Plan: Tested locally.

Reviewers: bengotow, halla, juan

Reviewed By: halla, juan

Differential Revision: https://phab.nylas.com/D3114
2016-07-21 14:25:30 -07:00
Ben Gotow 3299789530 fix(message-body): Sanitize contenteditable attrs out of message bodies 2016-07-21 11:56:44 -07:00
Annie 848b4ef8a1 fix(signatures): Added alias to accounts rendered in dropdown
Summary:
Extended default signatures to also be associated with aliases in the signature
preference page. Also fixed some styling with the signature dropdown button in its blurred
state on the popout composer.
fix(signatures): Fixed styling for signature compuser button on popout when blurred

test(signatures): Updated tests to support and cover extending signatures to alias

Test Plan: Modified existing tests to work with these changes

Reviewers: juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3111
2016-07-21 11:33:15 -07:00
Jackie Luo b323275d24 fix(composer): Stop parsing quoted text on each keystroke to prevent composer lag
Summary: We used to parse the quoted text on each keystroke in the composer for a reply so that we could continue to determine what was quoted text. However, that resulted in dramatically slow typing for replies to complex HTML emails. Now, the quoted text isn't a part of the reply until `prepareDraftForSyncback`, after all of the extensions have run their transformations—we use a marker to determine whether quoted text should be appended or not. The quoted text control is now a one-way operation—you can't hide the quoted text after showing it (Gmail-style).

Test Plan: Tested locally (but didn't run unit tests because they won't run on my machine...)

Reviewers: bengotow, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3106
2016-07-21 11:11:14 -07:00
Ben Gotow 3f6415c119 fix(specs): Misc fixes 2016-07-20 12:33:52 -07:00
Annie 36771f4b92 fix(image): Prepend file:// to image paths to solve #621
Summary:
refactor(test): Fix file paths in message item body tests to be prepended with file://

Some inline images were not rendering as seen on (#621). The images were being correctly added to the
downloads folder, however, their path was being prepended with an unrelated base url. I hardcoded
file:// into the image paths so that they would always point to the local downloads folder.

Test Plan: Ran the specific tests for message item body and message item. Also checked in my email.

Reviewers: juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3105
2016-07-19 16:48:24 -07:00
Annie 8a0345152c fix(email): Fix email body height bug #1280
Summary: Some emails were having their body height set to 0 if their height was dependent upon the iframe height -- e.g. body.height equals 100% or inherit. Added a check to see if height computed to 0px and if so, set the height to auto.

Test Plan: Tested with emails on my computer

Reviewers: juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3100
2016-07-19 16:38:59 -07:00
Evan Morikawa 27bfd91e32 fix(delta): add N1 token to delta stream connection 2016-07-13 22:02:48 -07:00
Evan Morikawa 9686361ce4 fix(login): fix error thrown when login fails for IMAP 2016-07-13 15:55:45 -07:00
Carson Ip a3874ce1de Fix incorrect port number when using https (#2600)
When APIRoot is using https, the port will forced to be 443 even when APIRoot
indicates another port. This is because of the line options.port = 443
overwriting the correct options.port extracted by url.parse. This is fixed by
removing the problematic line. The default port is still 443 if you look into
https.js. In case we want a different default port in the future, we can do
options.port = options.port || 443.
2016-07-12 12:03:13 -07:00
Evan Morikawa 2474b0e7d3 fix(onboarding): Fix Rx.Observable.fromQuery not defined bug 2016-07-11 18:07:45 -07:00
Annie bd361c8abb refactor(signatures): Removed old signature imgs and made static empty signatures page
Summary:
Refactored signature preferences page to allow more signatures than the previous 1-1 mapping for signatures and accounts. Created a multi select dropdown of the accounts for which a certain signature is set as default for. Added a button into the draft header From field to toggle between saved signatures.

refactor(signatures): Add basic add/remove capabilities to static

refactor(signatures): Hooked up signature actions and signature store for basic functionality

fix(signatures): Cleaned up signature store and started on multiselectdropdown

fix(signatures): Add multi signature toggle select to multiselect dropdown

build(signatures): Built framework for multiselect dropdown

build(signatures): Toggle button functionality for dropdown

build(signatures): Build multi select from components and add debounce

refactor(signatures): Move signature actions and signature store into flux

fix(signatures): Styled composer signatures button/dropdown and fixed preferences checkmarks

build(signatures): Finish main functionality, about to refactor composer signature button into injected component

fix(signatures): Changed position styles

fix(signatures): Fixed background color for dropdown button when blurred

build(signatures): Began to write tests for signatures store, preferences and dropdown

Test Plan: Wrote tests for preferences signatures, signature store, signature composer dropdown and refactored tests for signature composer extension. For signature composer extension I removed applyTransformsToDraft and unapplyTransformsToDraft and tested by sending emails with signatures to different providers to make sure the <signature> tag caused problems.

Reviewers: bengotow, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3073
2016-07-11 12:35:41 -07:00
Aaron Sikes b03a352ee6 Clear notifications when emails are read
Fixes #1393

The objects returned by `new Notification()` have  a `.close()` method.
So we can just keep a list of notifications that have been sent, and
close them when that message has been read.

Conflicts:
	internal_packages/unread-notifications/lib/main.es6
2016-07-08 11:36:51 -07:00
Aaron Sikes fd61c37985 Change pending unread notification stack to be a queue (#2517)
* Remove double negative from test label

It always takes me a second to read a double negative, and be sure I
understood correctly. It's also particularly troublesome for non-native
English speakers.

* Change pending unread notification stack to be a queue

Consider the case where a user launches N1, and has 3 unreads since
their last launch. Additionally, after N1 has launched, they begin
receiving a new mail every 2 seconds.

Current behavior would be a notification for 1 of the 3 unread emails,
then every 2 seconds a notification for the most recently received mail.
They would only finally receive notifications for the other 2 original
messages once they stopped getting new mail.
2016-07-08 11:30:33 -07:00
Logan Davis 40f9e5172a pgp-plugin update (#2534)
* Fix private key email-adder, add "no private key" error

The decrypt UI is seriously confusing some people. This commit
adds an error message that should at least stop them from trying
to decrypt a message without a private key to speak of. Also,
there was a dumb hardcoded true in validAddress.

* Adds incorrect passphrase notification; enables carriage return for popover

The passphrase popover was woefully inadequate. It didn't tell users
when they had the wrong password - it just closed without saying anything -
and you couldn't even use carriage return to submit the password.
This commit fixes those mistakes by buffing out passphrase-popover.cjsx.

* Adds private key popover to decrypt button

The decrypt UI was confusing and didn't provide the user with
an option to get a key imported from the message view. This
mondo commit adds an entirely new popover so that the user
never again will be forced to go to the preferences page.

* Adds more forgiving encrypted block parsing

* Overhauls decryption error handling

The decrypt UI didn't clearly communicate error messages from the
failure in PGPKeyStore.decrypt up to the user. This commit adds
nice error surfacing as well as some pretty colors.

* Fix encrypt modal key miscount error via getKeyContents coercion

On Linux and Windows, fs.watch double-triggers on some actions in
the key folder, for reasons that aren't super clear. This was causing
issues where the encrypt modal would report not having a key loaded
even though the key was totally loaded and saved. This commit sort
of kludgily forces the modal to run getKeyContents for every key
it has saved right before it returns them all. This would probably
be better fixed with a refactor the the PGP Keystore.

* remember to close popover, d'oh

* patch key picker modal styling for Linux and Windows

* response to review
2016-07-08 11:29:10 -07:00
Ollie Ford 9b75ea72e6 removes phishing warning for different subdomains (#2420)
This commit improves on nylas/N1#2343 (which allowed From and
Reply-To to be different aliases @ the same domain) by allowing the
address to differ by a subdomain.

For example, the pairs:

    From: foo@bar.com
    Reply-To: foo@sub.bar.com

    From: foo@bar.co.uk
    Reply-To: foo@other.bar.co.uk

    From: foo@bar.com
    Reply-To: foobar@bar.com
are each now allowed without warning.
2016-07-08 11:20:19 -07:00
Ben Gotow 856afb991a fix(auth): ssl_required => true instead of "on" 2016-06-30 13:38:54 -07:00
Evan Morikawa b755acda3d fix(github): fix view on Github buttton
Error due to action import.
Convert to ES6
2016-06-17 10:07:05 -04:00
Juan Tejada 4c861ff007 fix(quoted-text): Add option to remove quoted-text, fix styles
- #2323
2016-06-16 15:37:58 -07:00
Jackie Luo fddb5e06f6 feat(spellcheck): Add option to disable spellcheck 2016-06-16 15:12:19 -07:00
Jackie Luo 91d3e3d213 fix(subscription): Change copy to be less confusing 2016-06-16 12:23:06 -07:00
Annie 30bb68ddd5 fix(label-nesting): maintain nested labels when renaming a label
Summary:
when renaming nested labels, maintain nested path
fixes #2402

Test Plan: created nested labels and successfully tested in dev

Reviewers: juan

Reviewed By: juan

Subscribers: evan

Differential Revision: https://phab.nylas.com/D3028
2016-06-15 16:48:26 -07:00
Halla Moore 93455db929 fix(specs): Fix specs on Linux
Summary: Specs were failing on Linux, this diff fixes them.

Test Plan: Unit tests

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3029
2016-06-15 16:30:52 -07:00
Keith Armstrong f8d0c82647 Update broken links for guides, docs, and API (#2455)
Also updated schemes of some links to https for consistency
2016-06-15 15:29:52 -07:00
Jackie Luo 3b9d38e493 fix(identity): Convert datetimes to milliseconds 2016-06-14 15:04:18 -07:00
Ben Gotow 0511c12503 fix(keybase): Don't run specs which require keybase API 2016-06-14 13:26:10 -07:00
Ben Gotow 09addb80a2 Pgp patch (#2430)
* update icons

* style commit

* Debugs export function

The key Export function used to not successfully show items in
their directories and also depend on the most recent attachment
download location. This commit adds a new savedState attribute
just for Keybase keys and also handles the case where that value
is null.

* Forces delete to populate

fs.watch() was acting up and not triggering populates on deletes.
Now deleteKey() just triggers a populate.

* Re-enables decryption of attachments from Enigmail

Decryption of attachments was disabled in the Great Password Popover
Refactor of Early June 2016. This commit adds that feature back
(and makes some changes to getKeyContents to facilitate that
change).
2016-06-14 13:22:38 -07:00
Ben Gotow 3baa987c61 fix(keybase): Invite fetch doesn't need JSON parse 2016-06-14 12:26:43 -07:00
Ben Gotow 10753e128c fix(keybase): Add a small button to redeem a keybase invite 2016-06-13 17:40:21 -07:00
Jackie Luo 9661430268 fix(view-on-github): Import Actions correctly 2016-06-13 16:19:46 -07:00
Ben Gotow bb2cf67722 fix(onboarding): Minor asset tweaks 2016-06-13 15:19:01 -07:00
Ben Gotow f49239dcf2 fix(pro): Add manual refresh to identity page 2016-06-13 12:06:53 -07:00
Evan Morikawa 75a785e683 fix(identity): enable proper People support 2016-06-12 21:13:46 -04:00
Ben Gotow 5f13982399 fix(pro): Replace subscriptionRequiredAfter 2016-06-10 14:36:37 -07:00
Ben Gotow 11fb1aefdc fix(sending): Minor changes to cleanup phase of sending 2016-06-10 12:35:56 -07:00
Ben Gotow d0cb89ebd9 fix(emoji): Remove vertical overflow from composer, allow for popups 2016-06-09 17:51:08 -07:00
Jackie Luo 5a9ac9b79f fix(emoji): Stop checking text outside of current div for matches 2016-06-09 16:50:49 -07:00
Jackie Luo 5e6abfbe68 🎨(darkside): Add UI tweaks for activity list 2016-06-09 16:11:27 -07:00
Evan Morikawa 5ac1e7a63d fix(templates): fix new templates from draft 2016-06-09 15:21:20 -07:00
Evan Morikawa b513b678de fix(template): can hit enter to save template names 2016-06-09 15:21:20 -07:00
Jackie Luo 6a7dc75f11 fix(typo): Correct spelling in error message 2016-06-09 15:04:00 -07:00
Evan Morikawa d1d2749209 fix(templates): detect empty bodies and fix CSS 2016-06-09 15:00:58 -07:00
Ben Gotow 35a8b1ab6e fix(auth): Don't use a persistent session for webview 2016-06-09 10:30:27 -07:00
Ben Gotow 4bf36ebe36 fix(prefs): Use labels instead of email addresses 2016-06-08 18:25:45 -07:00
Evan Morikawa 3b21982af2 fix(welcome): pass utm on to welcome 2016-06-08 14:19:40 -07:00
Ben Gotow c41dade912 fix(onboarding): Switch images into appropriate places 2016-06-08 14:10:09 -07:00
Ben Gotow 11a7472aa8 fix(onboarding): Final tutorial screenshot 2016-06-08 14:05:18 -07:00
Ben Gotow 2f8cba6b5f fix(onboarding): Don't allow going back into N1 signin 2016-06-08 13:48:56 -07:00
Evan Morikawa bc785c7b5d fix(analytics): fix identify 2016-06-07 18:19:41 -07:00
Jackie Luo 3492718609 fix(plugins): Update plugin descriptions 2016-06-07 16:41:04 -07:00
Ben Gotow 54ce91c6fe fix(keybase): Remove fdescribe 2016-06-07 14:50:33 -07:00
Juan Tejada 42bce855ed fix(search): Prevent from adding duplicate threads to the search index
- We have to manually check if we are inserting a thread to the index
that already exists because the virtual table does not support unique
indexes
- Add versioning to the index to be able to rebuild it for the next
update
2016-06-07 14:41:39 -07:00
Ben Gotow db0640a614 fix(keybase): Minor linter errors 2016-06-07 14:25:59 -07:00
Ben Gotow a69a56d0b7 fix(keybase): Disable by default, remove duplicate dependencies 2016-06-07 14:15:54 -07:00