Commit graph

1958 commits

Author SHA1 Message Date
Ben Gotow
5d9cf73c3c es6(*): AutoUpdateManager, ProtocolHandler, more. 2016-05-04 19:34:41 -07:00
Ben Gotow
5150dccaf1 fix(file-drop): Wait for attachments before popping composer 2016-05-04 19:09:28 -07:00
Juan Tejada
2c986f2cd0 fix(composer): Properly setup editing action listeners on update
- This prevented emoji selection via the popover from working on a new
window because the plugin is loaded after the contenteditable sets up
the action listeners, so we need to re set them on update
2016-05-04 16:25:42 -07:00
Juan Tejada
6e0e70ddf7 fix(composer-editor): Remove dead code 2016-05-04 15:02:38 -07:00
Ben Gotow
0448dd1070 rm(fullcontact): Deprecated in favor of new contact sidebar 2016-05-04 14:41:13 -07:00
Ben Gotow
aee07a80b8 rm(*): deprecated/unused Atom code, user stylesheet support 2016-05-04 14:27:46 -07:00
Ben Gotow
0992acf4c8 fix(read-receipts): Always remove own read receipt images 2016-05-04 13:44:35 -07:00
Juan Tejada
1a78a758f4 refactor(deltas): Update sync-worker to use NylasAPI.longConnection
Summary:
- Remove nylas-long-connection.coffee duplicate code from sync worker package
  and replace with delta-streaming-connection which uses NylasAPI.longConnection
- Replacement for XHR will come in another diff -- still need to clean up and
  fix some edge cases

Test Plan:
- TODO! Will add test coverage for NylasLongConnection and
  DeltaStreamingConnection

Reviewers: evan, bengotow

Reviewed By: evan, bengotow

Differential Revision: https://phab.nylas.com/D2875
2016-05-04 13:03:47 -07:00
Ben Gotow
2bd2965acf fix(keymaps): "Delete" => "Del" to fix keycode 46 2016-05-04 09:29:42 -07:00
Ben Gotow
85c1b030b7 Revert "feat(mailto): Allow N1 to be default client on windows"
This reverts commit fad7c1ae86.
2016-05-03 19:04:04 -07:00
Ben Gotow
fad7c1ae86 feat(mailto): Allow N1 to be default client on windows 2016-05-03 14:47:21 -07:00
Ben Gotow
dc30187d30 fix(db): When replacing obj in a set, keep old body if new body not provided 2016-05-03 14:01:06 -07:00
Evan Morikawa
c89413e98d fix(window): fix error when adding account and serializing bad API data 2016-05-03 11:30:41 -07:00
Ben Gotow
c1a296acf9 fix(sheets): Always change sheet when changing perspective (#2094) 2016-05-02 19:14:12 -07:00
Ben Gotow
74232d5b7e fix(tracking): Use colors for link/read receipts, fix parsing 2016-05-02 15:59:17 -07:00
Ben Gotow
4c537cbf8e fix(emoji): Replace message emoji in DOM, not in html string 2016-05-02 12:33:08 -07:00
Ben Gotow
e9a898c869 fix(undo): Don't create separate commands, since they bubble separately 2016-04-29 17:10:17 -07:00
Evan Morikawa
444101a74b fix(specs): fix composer-header specs 2016-04-29 16:54:37 -07:00
Ben Gotow
871383d0b1 fix(lint): Errors in ActionBarPlugins 2016-04-29 16:19:52 -07:00
Evan Morikawa
909226fcf4 feat(composer): better composer plugin loading 2016-04-29 15:58:17 -07:00
Evan Morikawa
99a8143a9d fix(composer): fix flashing and focus losing in the composer 2016-04-29 15:58:17 -07:00
Ben Gotow
55bd04b3a2 feat(mail-merge): Import CSV button 2016-04-29 13:55:11 -07:00
Ben Gotow
105e33c9c4 fix(mail-merge): Fix drag and drop for files vs. chips 2016-04-29 11:57:43 -07:00
Evan Morikawa
db899491ea fix(onboarding): pass along accountId too 2016-04-29 10:20:59 -07:00
Karim Hamidou
cba6ccc220 [N1] Changes to allow running edgehill-server locally
Summary: This is mostly config changes.

Test Plan: Tested the Google OAuth flow.

Reviewers: bengotow, drew

Reviewed By: bengotow, drew

Differential Revision: https://phab.nylas.com/D2907
2016-04-29 10:18:51 -07:00
Ben Gotow
b0d332c2c1 fix(read-receipts): Fix another issue caused by ES6 subclassing Coffeescript 2016-04-28 17:20:39 -07:00
Ben Gotow
05be74ec04 fix(read-receipts): Remove tracking pixels when composing drafts 2016-04-28 17:08:54 -07:00
Evan Morikawa
7907b8fdd1 fix(onboarding): encode welcome page info 2016-04-28 17:06:47 -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
Evan Morikawa
78c453a616 feat(onboardin): fix win closing & nav to welcome page 2016-04-28 15:29:13 -07:00
Evan Morikawa
b226dfb5b1 perf(composer): tweak tooltip animation timing & composer loading 2016-04-28 13:42:30 -07:00
Evan Morikawa
f45c497810 fix(sidebar): fix account name styles 2016-04-28 11:45:44 -07:00
Juan Tejada
8ff5f4f8b5 fix(cursor): Remove stale cursor from config.cson when cursor error
- #2049
2016-04-28 10:16:40 -07:00
Juan Tejada
ea9538f444 feat(mail-merge): Add CSV imports, styling, and several fixes
Summary: Adds CSV imports, proper styles to mail merge plugin and fixes a handful of bugs

Test Plan: TODO

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2925
2016-04-27 18:22:32 -07:00
Ben Gotow
5bda8993f0 fix(thread-list): Remove unnecessary extra trigger 2016-04-27 15:20:25 -07:00
Ben Gotow
a270234f6d fix(keymaps): Restore missing bindings, handle single keys inside of email frames 2016-04-27 15:20:06 -07:00
John McNair
dccf4f3ad3 Parse Office 365 names (#2016)
Office 365 likes to format email addresses as follows:
Last Name, First Name (Some Description) <email@address.org>

This causes Contact.firstName() (and hence sometimes displayName()) to return
"Last Name," which looks a bit odd in the message/thread views.

The intent of the commit is to correctly parse these names so that (using the
above example):
- firstName = "First Name"
- lastName = "Last Name (Some Description)"
- fullName = "First Name Last Name (Some Description)"

These behavioral changes only impact names containing a ','.

I don't know that this really provides exhaustive coverage of Office 365, and
keeping the description as part of the last name is not completely guilt free,
but it's not any worse than the previous state of affairs which also has
the description in the same field but combined instead with (misplaced)
first name data.
2016-04-27 10:26:23 -07:00
Selwyn
cbded86bd4 Linux launch on start (#2019)
* feat(workspace-section): Add Linux-only warning to launch on start

* feat(system-start-service): Add Linux launch on system start option
2016-04-27 09:22:23 -07:00
Ben Gotow
8944e10ae9 fix(autolinker): Don't match emails that are also URLs #2071 2016-04-26 19:03:43 -07:00
Ben Gotow
c5a77fa854 fix(autolinker): Use getAttribute('href') because href is magic 2016-04-26 17:01:15 -07:00
Ben Gotow
aa42040813 fix(autolinker): Always override title attribute #2056 2016-04-26 16:49:33 -07:00
Ben Gotow
e4a0c94482 fix(sidebar): Fix overflow of account name 2016-04-26 15:53:51 -07:00
Ben Gotow
1fcef30b6b fix(attachments): Make presentError display underlying error, file optional. Sentry 27089 2016-04-26 14:03:08 -07:00
Ben Gotow
2bae0d5885 fix(composer): Wait frames not msec on focus out #2033 2016-04-26 13:14:06 -07:00
Evan Morikawa
3ac94a4402 fix(win): draft popout windows always send draftJSON 2016-04-26 13:02:05 -07:00
Evan Morikawa
60d2c24693 feat(package): fix build-resources-task and move submodule 2016-04-25 16:01:56 -07:00
Evan Morikawa
2472e0556b feat(package): require 'engines': {'nylas': '*'} in package.json 2016-04-25 15:06:37 -07:00
Ben Gotow
43b65ca36c cson(cleanup): Remove imports, only used for config.cson now 2016-04-24 20:33:34 -05:00
Jackie Luo
cbda623fec 🎨(plugins): Fix line breaks 2016-04-24 18:32:53 -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
ddba5415ad mv(packages): move plugins that are incompatible with open source sync engine 2016-04-24 14:53:12 -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
Juan Tejada
2dccde2e58 feat(mail-merge): Add mail merge plugin
Summary:
Adds Mail Merge Plugin
- Adds new table components to component kit
- Adds new extension points to allow dragging and dropping into composer contenteditable and participant fields and customizing participant fields
- Adds new decorators and other misc updates
- #1608

Test Plan: TODO

Reviewers: bengotow, evan

Reviewed By: bengotow, evan

Differential Revision: https://phab.nylas.com/D2895
2016-04-22 18:29:07 -07:00
Evan Morikawa
1920d5db8a fix(win): speed up composer launching 2016-04-22 17:41:22 -07:00
Jackie Luo
777ef33622 fix(draft-list): Revert regression for sheet selection 2016-04-22 17:30:14 -07:00
Jackie Luo
6a1bed23c1 feat(activity-list): View message opens and link clicks
Summary:
Adds an activity list view that shows message opens and link clicks in a
chronological feed.

TODO: Add badge for unread notifications and different styling for read/unread
notifications. Click item to jump to corresponding thread.

Test Plan: TODO.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2915
2016-04-22 17:27:30 -07:00
Evan Morikawa
78112563a6 feat(win): faster popout windows
Summary:
This diff is designed to dramatically speed up new window load time for
all window types and reduce memory consumption of our hot windows.

Before this diff, windows loaded in ~3 seconds. They now boot in a couple
hundred milliseconds without requiring to keep hot windows around for
each and every type of popout window we want to load quickly.

One of the largest bottlenecks was the `require`ing and initializing of
everything in `NylasExports`.

I changed `NylasExports` to be entirely lazily-loaded. Drafts and tasks
now register their constructors with a `StoreRegistry` and the
`TaskRegistry`. This lets us explicitly choose a time to activate these
stores in the window initalization instead of whenever nylas-exports
happens to be required first.

Before, NylasExports was required first when components were first
rendering. This made initial render extremely slow and made the proposed
time picker popout slow.

By moving require into the very initial window boot, we can create a new
scheme of hot windows that are "half loaded". All of the expensive
require-ing and store initialization is done. All we need to do is
activate the packages for just the one window.

This means that the hot window scheme needs to fundamentally change from
have fully pre-loaded windows, to having half-loaded empty hot windows
that can get their window props overridden again.

This led to a major refactor of the WindowManager to support this new
window scheme.

Along the way the API of WindowManager was significantly simplifed.
Instead of a bunch of special-cased windows, there are now consistent
interfaces to get and `ensure` windows are created and displayed. This
DRYed up a lot of repeated logic around showing or creating core windows.

This also allowed the consolidation of the core window configurations into
one place for much easier reasoning about what's getting booted up.

When a hot window goes "live" and gets populated, we simply change the
`windowType`. This now re-triggers the loading of all of the packages for
the window. All of the loading time is now just for the packages that
window requires since core Nylas is there thanks to the hot window
mechanism.

Unfortunately loading all of the packages for the composer was still
unnaceptably slow. The major issue was that all of the composer plugins
were taking a long time to process and initialize. The solution was to
have the main composer load first, then trigger another window load
settings change to change the `windowType` that loads in all of the
plugins.

Another major bottleneck was the `RetinaImg` name lookup on disk. This
requires traversing the entire static folder synchronously on boot. This
is now done once when the main window loads and saved in a cache in the
browser process. Any secondary windows simply ask the backend for this
cache and save the filesystem access time.

The Paper Doc below is the current set of manual tests I'm doing to make
sure no window interactions (there are a lot of them!) regressed.

Test Plan: https://paper.dropbox.com/doc/Window-Refactor-UYsgvjgdXgVlTw8nXTr9h

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2916
2016-04-22 13:30:42 -07:00
Jackie Luo
79b5e34211 fix(draft-list): Select proper sheet when launching in drafts perspective 2016-04-21 16:00:06 -07:00
Evan Morikawa
8fb062f765 fix(spec): fix to run in utc travis 2016-04-20 14:39:15 -07: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
Kevin Jose Martin
78ea5c0c64 Doing write on a GET is invalid. (#2004)
* Doing write on a GET is invalid

* Doing write on a GET is invalid
2016-04-20 10:07:12 -07:00
Ben Gotow
658e1a5d0d perf(db): Use partial indexes added in sqlite 3.8 2016-04-19 17:42:02 -07:00
Jackie Luo
8803b01d2f lint(github-card): Change duplicated variable name 2016-04-19 17:34:19 -07:00
Jackie Luo
1bfc8e74b1 feat(preferences): Add theme picker button to Appearances 2016-04-19 17:14:25 -07:00
Tim Hitchins
24fb3ee952 Added link to all plugins section (#2002)
* Added link to all plugins section

* Added correct link - to the nylas repro ;-)
2016-04-19 16:14:06 -07:00
Max Stoiber
fe453b02da Fix Github Sidebar Plugin (#2003)
Hopefully fixes #1991

I don't have N1 setup locally, so this is a blind shot–would appreciate somebody who has it set up to pull this and verify this fixes the issue, but as far as I can tell it should.

The gist is:

> Looking at the code, what you do is use the `search/users` endpoint to find users by email and taking the repos from there. You then load the repositories of the username, but we can't sort those by most-starred: "sort string Can be one of `created`, `updated`, `pushed`, `full_name`. Default: `full_name`" *([src](https://developer.github.com/v3/repos/#list-user-repositories))*
> What we could instead do is use the search API, which **allows us to search for repositories by a specific user and sort by most starred**. This is a tiny bit hacky, but works perfectly fine. E.g. this is the URL for my most starred repos: `https://api.github.com/search/repositories?q=user:mxstbr&sort=stars&order=desc`
2016-04-19 16:13:30 -07:00
Ben Gotow
33225f56b0 rename(drafts) DraftStoreProxy => DraftEditingSession 2016-04-19 16:08:58 -07:00
Ben Gotow
7452705c31 refactor(composer): Make session, draft available everywhere
Summary:
Up until now, we've been requiring that every plugin control in the composer take the draftClientId, retreive the session, listen to it, build state from the draft, etc. This is a huge pain and is hard to explain to newcomers becaus it frankly makes no sense.

In 0.3.45 we made it so that the ComposerView always has a non-null draft and session. (It isn't rendered until they're available). In this diff, I just pass those through to all the plugins and remove all the session retrieval cruft.

Almost none of the buttons have state of their own, which I think is appropriate.

They do render on every keystroke, but they were already running code (to recompute their state) on each keystroke and profiling suggests this has no impact.

Prepare for immutable

In preparation for Immutable models, make the draft store proxy returns a !== draft if any changes have been made. This means you can safely know that a draft has changed if `props.draft !== nextProps.draft`

Test Plan: Run tests

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D2902
2016-04-19 16:05:15 -07:00
Evan Morikawa
b29d5ac75b tests(calendar): adding calendar and scheduler tests
Summary: Adding tests

Test Plan: Tests

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2892
2016-04-19 11:54:15 -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
Dakota Nelson
ccaa03e944 Expose ParticipantsTextField through component kit (#1994) 2016-04-18 16:39:08 -07:00
Ben Gotow
0de50b476c fix(default-alias): Show primary email instead of "None", clarify only for new messages currently 2016-04-15 19:05:54 -04:00
Ben Gotow
e70fdd4dcd fix(default-client): Set initial state to fix React warning 2016-04-15 14:30:13 -04:00
Ben Gotow
cd4b1c7016 fix(related-threads): Show snippet in addition to subject #1683 2016-04-14 17:33:43 -04:00
Ben Gotow
59b0c1c556 fix(view-on-github): Add readme and fix bug 2016-04-14 17:03:57 -04:00
Ben Gotow
b521cf7f03 fix(star): Change action from Star All => Star #1927 2016-04-14 16:34:46 -04:00
Ben Gotow
c96a5a4d22 💄(scheduler): Would you like => I'd like 2016-04-13 17:48:27 -07:00
Drew Regitsky
8ea78417a8 fix(onboarding): Add missing return statement when changing endpoints 2016-04-13 17:41:31 -07:00
Drew Regitsky
19a4281bb4 fix(onboarding): Change error notification for endpoint changes 2016-04-13 16:13:25 -07:00
Ben Gotow
1b6525910c fix(search-bar): Apparently we were not providing keys 2016-04-13 16:08:24 -07:00
Ben Gotow
f85f447141 fix(require): Move more requires to new electron format 2016-04-13 15:35:01 -07:00
Ben Gotow
b64719d09f fix(search): Cannot remove items from search (Sentry 30318) 2016-04-13 14:22:43 -07:00
Ben Gotow
d1211ab7de bump(electron): 0.36.7 => 0.37.5 2016-04-12 18:42:57 -07:00
Matt Bilker
5fd8faa82c fix(imports): switch to Electron's require('electron') (#1907)
* fix(imports): switch to Electron's require('electron')

Electron in 0.37.5 phases out the usage of `require('built-in-module')`
in favor of `require('electron').builtInModule`. This commit corrects usage in
some cases that cause N1 to not start under Electron 0.37.5.

* fix(specs): use new Electron remote import
2016-04-12 18:09:13 -07:00
Jackie Luo
cf926b0346 fix(composer-emoji): Fix calculation for category positioning 2016-04-12 14:51:56 -07:00
Ben Gotow
d5fb58a029 fix(emoji): Improve variable names / diff feedback 2016-04-12 14:46:03 -07:00
Ben Gotow
370edc40e9 fix(emoji): Re-use img tag to avoid running out of file descriptors
Summary:
On my machine the new emoji picker was causing "too many open file descriptor"
errors. I think that this was because it was creating 1300 image tags in 50msec.

I refactored this code so that it uses a single image tag and only loads one image
at a time. This could make it slower on some people's machines, but eliminates the
possibility of it breaking the app!

Test Plan: Run tests

Reviewers: jackie

Differential Revision: https://phab.nylas.com/D2878
2016-04-12 14:29:59 -07:00
Jackie Luo
2a431fcec7 fix(composer-emoji): Switch to characters to PNGs (#1898)
* Add PNGs and JSON file

* Add Apple and Twitter emoji

* Fix linter issues and tests

* Get correct path from EmojiStore

* Add emoji regex and update extensions

* Remove the scary regex
2016-04-12 10:27:24 -07:00
Evan Morikawa
c5f4c7305d feat(scheduler): add an event preview when sending a meeting request
Summary: add event preview

Test Plan: manual

Reviewers: bengotow, juan

Differential Revision: https://phab.nylas.com/D2874
2016-04-11 22:45:36 -04:00
Ben Gotow
793b9efae0 fix(scheduler): Don't cast durations to integers, fix 1.5, 2.5 hour blocks 2016-04-11 18:52:49 -07:00
Ben Gotow
24d9157ee5 fix(scheduler): End should work even if the mouse isn't over a time 2016-04-11 18:42:17 -07:00
Ben Gotow
c3fad8cca7 fix(scheduler): Make popover width even so it's not blurry 2016-04-11 18:33:53 -07:00
Ben Gotow
046c8b3122 fix(sync): Handle "Invalid cursor" scenario by 💣🔥 away the cache 2016-04-11 17:34:52 -07:00
Evan Morikawa
d24f653e26 fix(scheduler): minor style tweaks to scheduler popover 2016-04-11 19:33:27 -04:00
Evan Morikawa
ceee33eb10 fix(scheduler): fix jumping calendar and add popover
fix(scheduler): fix jumping calendar and add popover

Summary: feat(scheduler): improved calendar picker

Test Plan: manual

Reviewers: bengotow, juan

Differential Revision: https://phab.nylas.com/D2873
2016-04-11 18:23:06 -04:00
Ben Gotow
586d099c23 fix(schedule): Move z-indexes to prevent dropdown layering issue 2016-04-11 14:58:58 -07:00
Ben Gotow
db90db3131 fix(schedule): Use draft session to udpate metadata, always save in syncback 2016-04-11 14:32:54 -07:00
Ben Gotow
5220b471e3 fix(db): Counts no longer require Thread table join 2016-04-11 13:51:31 -07:00
Ben Gotow
c00190c492 fix(auth): Fix missing var. This is why we should go ES6! 2016-04-11 10:48:16 -07:00
Ben Gotow
b4b67c65c9 fix(initial-sync): Fix sync sidebar showing all the time 2016-04-11 00:43:06 -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
Evan Morikawa
e2e9a72233 fix(scheduler): use proper start and end time formats for when block 2016-04-10 11:44:24 -04:00
Evan Morikawa
42d7aa47b4 fix(scheduler): properly formatting when objects for post 2016-04-09 21:47:52 -04:00
Evan Morikawa
8960009643 fix(scheduler): properly set proposals 2016-04-09 21:25:01 -04:00
Evan Morikawa
8f7b99ee4f refactor(scheduler): move all event data into metadata
Summary: Moved events into metadata. Removed a lot of code

Test Plan: todo

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2866
2016-04-09 21:19:01 -04:00
Ben Gotow
d884eccb36 fix(specs): * 2016-04-08 16:03:21 -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
227bc81736 fix(sync-errors): Improve display of sync errors and offline status
- Make the retry interval go 2 sec, 3.4s, 6 sec...
- Only show the connection status bar if the interval is > 5 seconds, in case the error was temporary.
- Do not show sync errors in the sidebar. The only available action is "Try Again", and we try again on our own. The error is frustrating and the user can't do anything about it anyway.
2016-04-08 13:52:26 -07:00
Drew Regitsky
3918f1a181 feat(auth): Provide reauth param to handle changed server endpoints
Summary:
Notify the backend when auth is a reauth of an existing account by
providing the `accountId`. This lets the backend differentiate between
a new auth (where a new account will be created if the server endpoints
don't match) and a re-auth (where the auth will fail on server endpoint
mismatch, prompting the user).

Test Plan: manual

Reviewers: juan, evan, bengotow

Reviewed By: bengotow

Subscribers: mg, spang, kav-ya

Differential Revision: https://phab.nylas.com/D2833
2016-04-08 12:00:03 -07:00
Ben Gotow
0b4527bb03 fix(autoscale): Apply vw when width and height are not present 2016-04-07 18:02:04 -07:00
Evan Morikawa
6a70584ffa feat(scheduler): better time picker
fix(scheduler): time picker fixed
2016-04-07 15:14:33 -07:00
Jackie Luo
c78401c566 🎨(preferences): Change spacing and button sizes 2016-04-07 14:32:51 -07:00
Ben Gotow
b6f539ac7b 💄(prefs): Shrink top tabs better, add min-widths 2016-04-07 14:14:20 -07:00
Jackie Luo
5fc110c1dc 🎨(preferences): Adjust textbox styles for signatures and templates 2016-04-07 14:12:35 -07:00
Evan Morikawa
be7a196eeb fix(tracking): uid uses draftClientId 2016-04-07 12:18:37 -07:00
Juan Tejada
cb46f8a9d8 fix(contact-sidebar): Don't render <select> when no contacts available 2016-04-07 09:57:53 -07:00
Juan Tejada
317f9be93d feat(thread-search): Make thread search indexing smarter
Summary:
- When accounts change, make sure sync has completed, and only add or
remove threads from the index based on accounts that were added or
removed instead of rebuilding the entire index from scratch

- When thread is updated, make sure to only update the index for threads
that belong to accounts that are not currently in the sync process

- Add more logging and docs

Test Plan: TODO

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2852
2016-04-07 09:57:29 -07:00
Ben Gotow
b16b465fd9 lint(*): Fix linter errors from QA fixes 2016-04-06 16:15:46 -07:00
Ben Gotow
0bd7480338 fix(autolinker): Additional test case from #1863 2016-04-06 14:29:28 -07:00
Ben Gotow
a05daeb0f0 fix(autolinker): Add test cases, .ly, url hash chars 2016-04-06 14:17:10 -07:00
Evan Morikawa
d4de652dab fix(scheduler): can scheduler on 30 min intervals 2016-04-06 14:09:51 -07:00
Evan Morikawa
544eacd87e fix(scheduler): removes proposals from metadata when removing event
Also add <tbody> tags
2016-04-06 13:59:24 -07:00
Evan Morikawa
f1a8b6929f fix(scheduler): can remove proposed times 2016-04-06 13:59:24 -07:00
Evan Morikawa
dc5210275e fix(scheduler): fix top banner 2016-04-06 13:59:24 -07:00
Ben Gotow
3cd94e8957 fix(cc/bcc): Make targets bigger, wait longer before declaring focus left 2016-04-06 13:54:39 -07:00
Jackie Luo
748e6ed55e 🎨(preferences): Update styling 2016-04-06 13:08:44 -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
Ben Gotow
5989fa7e52 fix(error): Show actual API domain in connection error bar 2016-04-06 12:35:30 -07:00
Jackie Luo
8479fdd0ce fix(composer-emoji): Fix tabs to scroll correctly 2016-04-06 12:06:27 -07:00
Evan Morikawa
f97aa855a4 fix(schedule): extracted to own SyncbackDraftEventsTask 2016-04-06 11:50:21 -07:00
Ben Gotow
7210e2f42d fix(mail-rules): Only process inbox, never skip threads
Summary:
- Disable processing button while already processing
- Only process mail in the inbox in bulk reprocess task
- Advance through mail using "after X" rather than "offset X", avoiding the issue where mail can be deleted as you're advancing.

Test Plan: Run existing tests

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2847
2016-04-05 19:16:58 -07:00
Evan Morikawa
bb318bf69c feat(scheduler): add new date & time picker
Summary: Adds a date and time picker to the new event creator

Test Plan: todo

Reviewers: bengotow, juan

Reviewed By: bengotow, juan

Differential Revision: https://phab.nylas.com/D2842
2016-04-05 18:42:19 -07:00
Juan Tejada
cf6f577a68 fix(scheduler): Fix moment-timezone require 2016-04-05 15:19:53 -07:00
Evan Morikawa
3d80e03421 fix(scheduler): import from moment-timezone 2016-04-05 14:57:51 -07:00
Juan Tejada
4c250640fe fix(react): Fix several warnings in missing imports 2016-04-05 14:53:37 -07:00
Ben Gotow
d1b1c5bea2 fix(quoted-text): Correctly update container height 2016-04-05 14:27:54 -07:00
Ben Gotow
34201ff644 fix(collapsed-participants): Resize in correct scenarios 2016-04-05 14:16:24 -07:00
Jackie Luo
4f11201ff7 fix(theme-picker): Reformat invalid class names 2016-04-05 13:43:43 -07:00
Juan Tejada
9f4b9693ac fix(sync-status): Fix logic for checking sync status:
- Only check sync status keys that belong to actual models being synced
- Return false if state object is empty
2016-04-05 13:29:25 -07:00
Juan Tejada
18aa0f2bb8 fix(thread-search): Correct typo 2016-04-05 13:29:25 -07:00
Ben Gotow
e08c7fe9d4 fix(notifs): _.reject does not support dict, Sentry 26699 2016-04-05 13:10:39 -07:00
Juan Tejada
4e326edfce fix(warning): Add key to react component 2016-04-05 12:16:32 -07:00
Juan Tejada
5a8f8b9877 fix(thread-search): Only rebuild index when # of accounts has changed 2016-04-05 12:16:32 -07:00
Ben Gotow
698af87912 fix(mail-rules): all "on" handlers need to be bound functions 2016-04-05 12:01:53 -07:00
Juan Tejada
c17c1ffaa6 fix(prefs): Fix this binding in mail rules prefs page 2016-04-05 11:28:08 -07:00
Ben Gotow
646ac9589c fix(composer): Show when rendered, send draft JSON to composer windows 2016-04-04 18:30:50 -07:00
Juan Tejada
fc489e5db3 feat(thread-search): Add client side search
Summary:
This diff includes several updates:
- Update sqlite version to use FTS5
- Adds new methods to DatabaseStore to create and update Search Indexes
- Currently indexing subject, participants, and thread message bodies or snippets if the body is not available
- Update initial sync to fetch 5000 message bodies per account
- Adds a new SearchMatcher
- Add new thread-search-index package to run in the worker window to
  init and keep thread search index up to date
- Converts Thread to ES6

TODO:
- Remove/Update suggestions dropdown
- Add tests

Test Plan: - TODO

Reviewers: evan, bengotow

Reviewed By: evan, bengotow

Differential Revision: https://phab.nylas.com/D2826
2016-04-04 17:15:19 -07:00
Ben Gotow
2688881ff3 fix(lint): Missing const breaking build 2016-04-04 17:12:59 -07:00
Ben Gotow
26fe05153c feat(offline-status): Show a bar when not connected to the API
Summary:
The TaskQueue does it's own throttling and has it's own processQueue retry timeout, no need for longPollConnected

Remove dead code (OfflineError)

Rename long connection state to status so we don't ask for `state.state`

Remove long poll actions related to online/offline in favor of exposing connection state through NylasSyncStatusStore

Consoliate notifications and account-error-heaer into a single package and organize files into sidebar vs. header.

Update the DeveloperBarStore to query the sync status store for long poll statuses

Test Plan: All existing tests pass

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2835
2016-04-04 17:11:09 -07:00
Evan Morikawa
db1f651a3e fix(scheduler): add timezone & fix tabbing 2016-04-04 16:06:48 -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
Evan Morikawa
4986049bd6 fix(console): remove log 2016-04-04 15:20:25 -07:00
Evan Morikawa
fd76568f15 fix(react): replace with ReactDOM 2016-04-04 15:17:50 -07:00
Evan Morikawa
15ff969e73 feat(calendar): add week view for quick scheduler
Summary: New Calendar

Test Plan: TODO

Reviewers: drew, juan, bengotow

Reviewed By: bengotow

Subscribers: jackie

Differential Revision: https://phab.nylas.com/D2767
2016-04-04 15:05:48 -07:00
Jackie Luo
73bf32c477 fix(composer-emoji): Replace images with Unicode characters properly 2016-04-04 11:03:52 -07:00
Jackie Luo
d786fb85da Merge pull request #1861 from jamiewilson/darkside
(darkside) correcting window buttons, adding input focus
2016-04-02 13:40:24 -07:00
Jamie Wilson
8164d75b02 correcting size of window contol buttons
This addresses issue #1687 on nylas/n1
2016-04-02 15:02:26 -05:00
Jackie Luo
f7e0acc4dd 🎨(preferences): Darken tab icons during click 2016-04-01 14:50:56 -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
Jackie Luo
e2480c1e36 fix(templates): Convert to ES6 and allow creation of new templates 2016-04-01 14:30:43 -07:00
Jackie Luo
6e07dce03c 🎨(preferences): Updates preferences to look prettier
Summary:
Adds new redesigned preferences with horizontal tab bar and refactored code.

Converts Preferences, Plugins, and a few components to ES6.

Test Plan: Tested locally.

Reviewers: evan, bengotow

Reviewed By: bengotow

Subscribers: juan

Differential Revision: https://phab.nylas.com/D2818
2016-04-01 14:01:26 -07:00
Jackie Luo
603a3dfb4b spec(composer-emoji): Fix specs for popover 2016-03-31 18:14:11 -07:00
Ben Gotow
9a588dbda6 fix(autolinker): Update regexp to handle reported failure cases 2016-03-31 16:36:23 -07:00
Juan Tejada
bec4a86629 fix(build): FIx linting and react errors and popover spec 2016-03-31 16:10:09 -07:00
Ben Gotow
3d8133ff8d fix(inline): Use vw for max-width, use DOM rather than regex 2016-03-31 15:16:22 -07:00
Ben Gotow
78681f6ed1 fix(inline): radial progress, merge body with download data on render 2016-03-31 15:16:21 -07:00
Jackie Luo
6faa7d5e12 spec(composer-emoji): Add tests for emoji popover
Summary: Adds tests to check that emoji popover is inserting emoji correctly and adding PNGs as expected.

Test Plan: Tested locally.

Reviewers: evan, bengotow, juan

Reviewed By: juan

Subscribers: juan

Differential Revision: https://phab.nylas.com/D2810
2016-03-31 14:54:46 -07:00
Jackie Luo
dc1ff47bb0 🎨(theme-picker): Fix oval close button 2016-03-31 12:04:41 -07:00
Jackie Luo
49a321124f 🎨(scroll): Fix UI issues in theme picker/emoji picker 2016-03-30 15:52:51 -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
62b06121f6 fix(composer-emoji): Render emoji characters on Windows/Linux 2016-03-28 16:18:41 -07:00
Jamie Wilson
c5d41eaf6a applying accent color to focused inputs 2016-03-28 12:49:47 -05:00
Jackie Luo
ec3ac5f58d 🎨(themes): Tweak Taiga to feel more native 2016-03-27 15:51:27 -07:00
Jackie Luo
9a923c7c88 fix(thread-list): Show emoji in bolded subject lines 2016-03-27 15:51:27 -07:00
Juan Tejada
f7a4523604 update(open-tracking): Only display icon when last message has metadata 2016-03-25 14:00:55 -07:00
Juan Tejada
0e360b061b Revert "fix(open-tracking): Make sure icon only shows in sent perspective"
This reverts commit 872aae1bcd.
2016-03-25 14:00:55 -07:00
Jackie Luo
cbf9627029 fix(composer-emoji): Only show replacement PNGs for OS X 2016-03-25 13:35:32 -07:00
Juan Tejada
872aae1bcd fix(open-tracking): Make sure icon only shows in sent perspective 2016-03-25 12:37:42 -07:00
Juan Tejada
8a3c2730cb fix(tray): Re add old icon assets for tray icon for win32 and linux 2016-03-25 10:05:17 -07:00
Ben Gotow
3fa93c2730 fix(composer): Sentry 9688 2016-03-24 17:18:50 -07:00
Jackie Luo
3e36e10f07 lint(themes): Add import to ui-variables 2016-03-24 16:56:49 -07:00
Ben Gotow
c1b3f87d71 fix(autolinker): Don't include trailing ? or . in URLs 2016-03-24 16:35:11 -07:00
Jackie Luo
2fedf7f091 fix(themes): Re-add disclosure triangles to Taiga 2016-03-24 16:19:41 -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
Ben Gotow
fc33e97bf8 perf(*): Replace _.omit, refresh scrollbar height less often 2016-03-24 15:14:41 -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
Jackie Luo
d6bc6e7bc5 fix(composer-emoji): Return if no search results are found 2016-03-24 11:57:49 -07:00
Ben Gotow
1d97b6811a fix(selection): Make the clear selection button a button 2016-03-24 10:57:12 -07:00
Jackie Luo
d0b001012e feat(composer-emoji): Add emoji button to composer
Summary: The emoji picker allows users to insert emoji to their messages on click. A few emoji that don't render properly in Chromium are replaced with PNGs, both in the composer view and the message list view, but only the Unicode characters are sent in the message bodies.

Test Plan: TODO

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2787
2016-03-24 10:45:48 -07:00
Ben Gotow
ac70ed3064 fix(undo-redo): Remove initial state check 2016-03-24 10:42:15 -07:00
Ben Gotow
27000e1965 fix(autolinker): Only match top ten tld's when schme not present 2016-03-24 10:14:47 -07:00
Ben Gotow
75ff8282a8 perf(autolinker): Use requestIdleCallback to fix hanging on large bodies 2016-03-23 19:03:21 -07:00
Juan Tejada
95cd1945de fix(snooze): Correctly display snoozed until label 2016-03-23 18:00:46 -07:00
Juan Tejada
4a6d9d1085 fix(send-later): Close popover in inline composer when msg scheduled 2016-03-23 17:46:24 -07:00
Juan Tejada
9413459311 fix(styles): Fix styles for attachment and upload items 2016-03-23 17:16:25 -07:00
Jackie Luo
f059e65acc fix(composer-emoji): Return null if no matching node is found 2016-03-23 17:01:14 -07:00
Jackie Luo
e574c2ecf7 fix(composer-emoji): Fix setBaseAndExtent bug 2016-03-23 16:48:35 -07:00
Juan Tejada
0056773769 fix(signatures): Fix signature switching between accounts in composer 2016-03-23 15:23:13 -07:00
Dakota Nelson
f3250e5395 Add extensibility in composer recipient chips
Summary:
Allow for injection into the composer's list of recipients to indicate
something about each recipient (i.e. for the PGP plugin, allow an
indicator as to whether or not each recipient has a PGP key
available)

Test Plan: Tested locally

Reviewers: juan

Reviewed By: juan

Subscribers: bengotow

Differential Revision: https://phab.nylas.com/D2761
2016-03-22 17:08:54 -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
c07bead684 🎨(composer): Reduce contenteditable min height 2016-03-22 14:51:38 -07:00
Juan Tejada
a6f9e84c9a fix(tasks): Properly handle DraftNotFoundError in DestroyDraftTask
- Fix reference to actual DestroyDraftTask class inside
  syncback-draft-task
2016-03-22 14:34:09 -07:00
Juan Tejada
419eace7e8 feat(popover): Add subtle ease-in animation when opening popover
- Closes popover on window resize:
  - Re rendering popover on window resize will be a bit more tricky because
    the FixedPopover only receives an origin rect. The one who
    dispatches the action has the responsability of re dispatching when
    the window resizes
- Fixes tiny behavior in send later popover
2016-03-22 13:45:07 -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
9bbaf3b90d fix(attachments): Update fn name in ImageAttachmentComponent 2016-03-22 11:28:55 -07:00
Jackie Luo
b1d49e8477 🎨(theme-picker): Fix styling for non-Retina displays 2016-03-21 19:35:47 -07:00
Ben Gotow
5dcb3a1bce fix(template): Rewrite in ES6, add missing windowTypes 2016-03-21 18:25:50 -07:00
Juan Tejada
96846d4052 feat(download-all): Adds download-all button + style updates, more ES6
Summary:
- Adds initial version of download all button
- Converts attachments plugin to ES6 and adds updated styling
- Updates quoted text button
- #905, #1712

Test Plan: - Unit + manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2769
2016-03-21 18:23:26 -07:00
Ben Gotow
a791ae76e0 fix(tray): Use total count, not unread count, for tray icon 2016-03-21 17:36:18 -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
b5fe01e5d0 fix(composer): Refactor header actions, clean up layout
Summary:
WIP

Remove the mode prop from everywhere, use NylasEnv.isComposerWindow() instead

Test Plan: Run updated tests

Reviewers: drew, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2766
2016-03-21 11:32:48 -07:00
Jackie Luo
400ccb1cdb fix(theme-picker): Add tabIndex to click to dismiss 2016-03-18 18:12:55 -07:00
Ben Gotow
04faa0769f log(sync-state): Send Account State Delta to mixpanel 2016-03-18 15:09:00 -07:00
Ben Gotow
2d279eeb05 fix(onboarding): Focus first field when showing settings #1696 2016-03-18 14:03:37 -07:00
Jackie Luo
7ee762a202 fix(ui-taiga): Remove border-bottom in two-pane mode 2016-03-18 13:48:14 -07:00
Jackie Luo
e0fa3d5707 fix(ui-taiga): Show active list item in single-pane mode (#1751) 2016-03-18 13:42:32 -07:00
Ben Gotow
073924ff00 fix(build): Fix failing linter and account tests 2016-03-18 13:26:03 -07:00
Ben Gotow
301cc4ad8b fix(quick-schedule): Update to use new APIs, remove leftover docs 2016-03-18 10:43:43 -07:00
Drew Regitsky
3af91d22b6 fix(sync-state): ignore Account.syncState=="stopped" for now
Valid accounts that are syncing properly can reviece a delta for
Account.syncState==stopped currently, due to some quirks in the backend.
Ignore "stopped" until it unabiguously represents an error state.
2016-03-18 10:41:08 -07:00
Jackie Luo
e0db484276 bump(node-emoji): Use 1.2.1 with merged PR 2016-03-18 10:07:56 -07:00
Ben Gotow
9099542643 fix(quoted-text): div vs blockquote, signature cleanup #1746
Summary:
Previously we always created <blockquote class="gmail_quote"> to wrap quoted text. This is not correct.
Gmail uses blockquotes only when it wants visual indentation, and <div>s to wrap other quoted text, like forwarded
messages which are not displayed indented.

This diff updates N1 to match Gmail exactly. Note that for replies, Gmail actually nests a blockquote.gmail_quote
inside a div.gmail_quote.

I also updated signature handling because it turns out the regexp that was removing existing signatures would blow
away any and all divs until it reached a <blockquote> tag.

Test Plan: See updated specs. Manually tested by creating a thread in Google Inbox and then performing fwd and reply in both N1 and Inbox. Results match.

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2750
2016-03-17 13:11:00 -07:00
Ben Gotow
9794817fb0 fix(lint): Actions is defined but never used 2016-03-16 20:04:01 -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
Jackie Luo
e5e474569b sp(composer-emoji): Correct emojis to emoji 2016-03-15 13:37:54 -07:00
Juan Tejada
b47c707845 fix(focus): Show drafts in unfocused state when window is blurred
- See #1695
- Update key commands region to clear focus when window blurs
- Dispatch broswer-window-focus/blur as a window event into the renderer
  window
- Update tray icon to listen to window instead of ipc event
2016-03-15 12:12:30 -07:00
Juan Tejada
d324a33d4b feat(view-mode): Add option in menu to select view mode
Summary:
Also add minor refactoring
#1710

Test Plan: Manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2745
2016-03-15 11:20:55 -07:00
Jackie Luo
c49d523e8f refactor(ui-variables): Clean UI variables for consistency/usage
Summary: Shortens and simplifies UI variables so that unused variables are no longer present.

Test Plan: Tested locally.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2738
2016-03-15 11:18:50 -07:00
Ben Gotow
da47fd4bdb fix(autolinker): Additional phone number parsing specs 2016-03-15 11:04:00 -07:00
Ben Gotow
73afdbb482 fix(autolinker): Add more test cases, improv URL regex 2016-03-15 10:47:14 -07:00
Ben Gotow
1ad2598a50 fix(uploads): Display icon regardless of ext capitalization
Note: In the future we really need to consolidate file-upload.cjsx and attachment-component.cjsx. #1700
2016-03-15 09:31:22 -07:00
Ben Gotow
310b8de2b0 fix(next/prev): Move buttons to correct column #1721 2016-03-15 09:16:28 -07:00
Jackie Luo
c68834553d Merge pull request #1731 from jamiewilson/darkside
(darkside) using new toolbar selectors, svgs, etc
2016-03-14 18:50:43 -07:00
Jackie Luo
e5c2075d26 🎨(plugins): Add theme-specific icon in plugins tab 2016-03-14 17:55:25 -07:00
Juan Tejada
32a47bcb7a feat(tray): Update to new set of icons and behavior for tray (menubar)
Summary:
- See #1698

Add specs

Test Plan: - Unit tests

Reviewers: bengotow, evan, drew

Reviewed By: drew

Differential Revision: https://phab.nylas.com/D2734
2016-03-14 17:17:11 -07:00
Ben Gotow
8e9d7ff73e fix(signatures): Adds default signature, convert to ES6 2016-03-14 17:05:49 -07:00
Jamie Wilson
913c9d633c using new toolbar selectors, svgs, etc. 2016-03-14 19:02:00 -05:00
Juan Tejada
812b64edec fix(snooze): Correctly query and create snooze categories per account
Summary:
- Was not properly updating the references to snoozed categories when
  accounts were added or removed
- Update whenCategoriesReady to make sure we listen until category syncing has concluded (Move inside CategoryStore)
- #1676, #1658

Test Plan: - TODO

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2723
2016-03-14 15:36:39 -07:00
Ben Gotow
4593d0a9b1 fix(config): Move account tokens to system keychain
Summary:
This diff also adds an account version number to the config so that the AccountStore can tell whether it should reload accounts (depending on whether it was the instance making tthe changes.)

This diff also fixes a tiny issue where un-opened composers threw an exception if you changed accounts.

Test Plan: New tests

Reviewers: evan, drew, juan

Reviewed By: juan

Subscribers: juan

Differential Revision: https://phab.nylas.com/D2726
2016-03-14 15:14:08 -07:00
Ben Gotow
a1691c10b2 hide(zoom): Remove UI for zoom, move to CONFIG.md 2016-03-14 13:13:32 -07:00
Ben Gotow
c76582194a rm(autolinker): Use our own very simple autolinker
Summary:
Autolinker is a great open source project but it attempts to parse HTML with regexp, is quite slow, and hangs on specific emails https://github.com/nylas/N1/issues/1540

This is super bad, and also super unnecessary. I think this should do the trick.

Note: I changed the urlRegex in our Utils to be much more liberal. It now matches anything that looks like a URL, not just things with the http:// and https:// prefixes. It's used in the LinkEditor and onboarding screen (detecting auth errors with urls) and I think it should be ok?

Test Plan: Need to write some tests

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2725
2016-03-14 12:30:54 -07:00
Juan Tejada
1e765a6b62 fix(acct-menu): Add option to add account from context menu 2016-03-14 11:22:52 -07:00
Ben Gotow
96c70368c4 fix(spellcheck): Enables spellcheck menu for basic inputs (#1600)
Summary: Just moves some code so we can easily attach spelling menus to the basic inputs.

Test Plan: Updated existing tests

Reviewers: juan, drew

Reviewed By: drew

Differential Revision: https://phab.nylas.com/D2721
2016-03-14 10:23:57 -07:00
Ben Gotow
53037b9918 Merge pull request #1648 from Eldorado234/patch-2
Fixed text overflow in phishing detection indicator
2016-03-14 10:09:21 -07:00
Jackie Luo
6e9384792a 🎨(themes): Fixes Windows button UI issues in #1649 2016-03-12 11:43:49 -08:00
Evan Morikawa
9cbe002a8b fix(sidebar): keep trying on 202s
Also fixed a bug where the email could come back with different
capitalization causing a cache miss
2016-03-11 16:27:04 -05:00
Simon Seyer
9b14c551e2 Fixed text overflow in phishing detection indicator 2016-03-11 20:33:06 +01:00
Jackie Luo
f7f39e74ce fix(themes): Add quick fixes for Ubuntu 2016-03-11 11:02:02 -08:00
Jackie Luo
ea912f5690 Merge pull request #1629 from ahmedlhanafy/master
Added Ubuntu theme to the internal packages
2016-03-11 10:59:30 -08:00
Simon Seyer
6d85e1785b Fixed alignment of message headers
like the phishing indicator.

Before this change: http://pasteboard.co/2bUg8PU9.png
After: http://pasteboard.co/2bUj2Bmz.png
2016-03-11 19:07:52 +01:00
Drew Regitsky
6efaf6220a fix(templates): fix a null check bug in template contentedtable ext 2016-03-10 19:06:15 -08:00
Ahmed Magdy
cad18a0d98 Added Ubuntu theme to the internal packages 2016-03-11 03:50:19 +02:00
Juan Tejada
533ffd683e fix(snooze): Fix getter for inbox category in when moving to snooze 2016-03-10 17:46:23 -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
Jackie Luo
d28c79fc75 🎨(theme-picker): Order internal themes and update theme names 2016-03-10 16:37:06 -08:00
Ben Gotow
038032d68e fix(bodies): Message with empty string body showed loading forever 2016-03-10 16:13:17 -08:00
Ben Gotow
c296e2e1d4 fix(sync): Do not paginate /metadata unless pluginsSupported 2016-03-10 16:03:36 -08:00
Evan Morikawa
a69d918c0f fix(sidebar): return valid person to prevent cache miss 2016-03-10 18:49:00 -05:00
Evan Morikawa
ea98cb8388 fix(sidebar): change optional bit in package 2016-03-10 18:40:26 -05:00
Evan Morikawa
69d1b10508 fix(sidebar): don't show nulled profiles 2016-03-10 18:32:37 -05:00
Ben Gotow
04492c06c7 fix(messages): Replace calc with margin to make plugin styling easier 2016-03-10 15:31:05 -08:00
Ben Gotow
3888c0c510 fix(labels): Labels should not show "X" in wide mode 2016-03-10 15:31:05 -08:00
Jackie Luo
688582bf57 🎨(theme-picker): Adjust styles 2016-03-10 15:18:57 -08:00
Evan Morikawa
5dbef230a3 fix(sidebar): explicitly detect 202 and cache null people 2016-03-10 18:16:32 -05:00
Ben Gotow
e8e4761e45 fix(github): Correct minor issue during ES6 conversion 2016-03-10 14:31:50 -08:00
Ben Gotow
0fb6d4c401 fix(remove-from-view): Missing invocation for non-Gmail 2016-03-10 14:25:28 -08:00
Jackie Luo
4d7f515090 feat(plugins): Move uninstall from theme picker to plugins tab
Summary: Move uninstall functionality to the plugins tab in preferences.

Test Plan: Tested locally.

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2716
2016-03-10 14:16:07 -08: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
b8485eaee5 fix(onboarding): We should accept IPs for servers during auth 2016-03-10 12:08:05 -08:00
Ben Gotow
a1a5aaddbb fix(onboarding): Make links in error messages clickable 2016-03-10 12:08:05 -08:00
Evan Morikawa
d9d9d1a474 fix(sidebar): design tweaks to sidebar 2016-03-10 15:06:59 -05:00
Evan Morikawa
dade20a148 fix(sidebar): minor sidebar style and padding tweaks 2016-03-10 15:06:59 -05:00
Jackie Luo
73e01dabb4 fix(themes): Fix linter issues and relink images 2016-03-10 11:54:05 -08:00
Ben Gotow
263c3a152e 💄(sidebar): Replace icon with person 2016-03-10 11:15:52 -08:00
Jackie Luo
7e7835095d 🎨(themes): Move notification heading below toolbar 2016-03-10 11:14:02 -08:00
Jackie Luo
07d0655c55 Merge pull request #1621 from jamiewilson/master
Adding ui-darkside to internal packages
2016-03-10 11:11:15 -08:00
Evan Morikawa
fe5b9c3258 fix(sidebar): use http basic auth to pass token 2016-03-10 14:06:48 -05:00
Ben Gotow
2bd03dc44f fix(sync): Pull down and associate metadata during initial sync
Summary:
Snooze should wait for categories on all accounts

Fix authPlugin to rembmer `plugin+accountId`, not pluginId, add specs

categories() returned [], categories(acctId) returned {}

dry up sync worker, fetch metadata before anything else

Test Plan: Run tests

Reviewers: drew, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2693
2016-03-10 11:06:06 -08:00
Ben Gotow
4fefec0b52 patch(save): Only save drafts when necessary, avoid sync-engine issues
Summary:
Previously, we have saved drafts back to the user's provider through the sync engine. There are a handful of very serious edge case issues we're working to solve that are creating a bad user experience. (#933, #1175, #1504, #1237)

For now, we're going to change the behavior of N1 to mitagate these issues.

- If you create a draft in N1, we will not sync it to other mail clients while you're working on it.
- If you enable send later, we'll start syncing the draft to the server as before.
- If you created the draft in another client, we'll sync the draft to the server as before.

Fix specs

Test Plan: Run specs

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2706
2016-03-10 11:03:38 -08:00
Jamie Wilson
cf6fa6d93f adding ui-darkside to internal packages 2016-03-10 12:18:32 -06:00
Ben Gotow
6d7cfa50f2 fix(bodies): MBP should cache "" so that it updates when new body arrives 2016-03-09 19:14:54 -08:00
Ben Gotow
7a31da9fc9 fix(bodies): Move loading into component, add retry, loading spinner 2016-03-09 19:14:54 -08:00
Evan Morikawa
a53f2ade75 Revert "fix(sidebar): use n1_id to verify edgehill server"
This reverts commit 2e1bf03700.
2016-03-09 21:11:53 -05:00
Evan Morikawa
614865c439 fix(sidebar): fix ordering and add hover state 2016-03-09 20:57:13 -05:00
Evan Morikawa
2e1bf03700 fix(sidebar): use n1_id to verify edgehill server 2016-03-09 20:27:31 -05:00
Jackie Luo
6823b31e21 🎨(plugins): Add install button in preferences 2016-03-09 16:54:29 -08:00
Jackie Luo
94580240ba 🎨(plugins): Switch to switches 2016-03-09 16:54:09 -08:00
Jackie Luo
4792193bd4 🎨(themes): Tweak UI for consistency 2016-03-09 16:20:33 -08:00
Juan Tejada
ee95640f2e fix(snooze-button): Change div to button 2016-03-09 16:10:15 -08:00
Jackie Luo
997e1bb5ad fix(themes): Move Taiga into directory 2016-03-09 15:52:22 -08:00
Noah Buscher
82e7e153b7 Added Taiga! 2016-03-09 17:44:01 -06:00
Ben Gotow
26888f9287 Revert "fix(autolinker): PR accepted into 0.24.1, fixes #839"
This reverts commit fb4fe3fd5f.
2016-03-09 15:21:27 -08:00
Ben Gotow
5e360b41cd fix(sync): Paginate /threads, etc. slightly slower to aleviate backend load 2016-03-09 15:21:27 -08:00
Evan Morikawa
19682d8095 fix(search): search perf and fix css issues 2016-03-09 18:12:06 -05:00
Evan Morikawa
51906bd085 fix(spec): fix message timestamp spec 2016-03-09 16:44:44 -05:00
Evan Morikawa
89323b05db feat(sidebar): add timestamps to related messages 2016-03-09 16:17:20 -05:00
Evan Morikawa
8475afbbfb fix(sidebar): ui tweaks to narrow sidebar 2016-03-09 15:46:10 -05:00
Juan Tejada
a0a3247815 fix(warning): Remove unused Popover require 2016-03-09 12:11:16 -08:00
Juan Tejada
69a99c914d fix(signatures): Correct regex to properly replace existing signature
- Fixes #1561
- Add more specs
2016-03-09 12:06:27 -08:00
Ben Gotow
9c07a1a15e 💄(onboarding): Minor style changes to account choose page 2016-03-09 11:40:56 -08:00
Ben Gotow
aac3198971 fix(sent): Sort sent view by most recent sent message, not received 2016-03-09 11:40:56 -08:00
Evan Morikawa
d4ef6a20e5 feat(sidebar): Add thread list of currently selected participants
Summary:
WIP. I added a collection index to make displaying the threads of a
currently selected participant on the sidebar easy and fast.

The problem is that the `participants` of a thread, while a collection of
`Contact` objects, have no "ids" for those contact objects.

One idea was to create the join table but access contacts by email instead
of id. This required a minor change to the way the data is entered in the
join table.

This means the sidebar can now simply do:

`DatabaseStore.findAll(Thread).where(Thread.attributes.participants.contains('foo@bar.com'))`

While I didn't for this initial test, we could also/instead create the
`Message-Contact` join table. The trick about a Message-Contact table is
that I believe we'd have to create additional columns further specifying
which field we're interested in.

The following two queries:

`DatabaseStore.findAll(Message).where(Message.attributes.to.contains('foo@bar.com'))`

`DatabaseStore.findAll(Message).where(Message.attributes.from.contains('foo@bar.com'))`

would require additional columns in the `Message-Contact` join table
because currently the only columns are `id` and `value`.

In the case of the sidebar use case, I think the Thread participants is
what you want to see anyway.

Unfortunately an email-centric scheme can't distinguish between
`noreply@phab.com <Evan>` and `noreply@phab.com <Juan>`. I actually think
this may be a good thing since I think most people think in terms of email
address as the unique key anyway and for the use case of showing related
emails in the sidebar I'd rather overshow than undershow.

This solution seems to be working pretty well in initial testing, but I
want to see if you guys can think of anything this may subtly screw up
down the line, or if you can think of a simpler way to do this.

Test Plan: todo

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2687
2016-03-09 14:33:31 -05:00
Juan Tejada
c6acca8ca3 remove(popover): Remove Popover in favor of FixedPopover
Summary:
- FixedPopover now correctly adjusts itself when overflowing outside
  window, in all directions
  - Updates styles
  - Adds specs
- Remove Popover and popover.less, and refactor all code that used it in
  favor of the new FixedPopover

Test Plan: Unit tests

Reviewers: drew, evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2697
2016-03-09 10:05:46 -08:00
Jackie Luo
ea5744d0ed fix(theme-picker): Fix linter issues for ES6 2016-03-08 17:41:22 -08:00
Jackie Luo
e94dbbdca1 fix(theme-picker): Move launch command to activate() 2016-03-08 17:32:23 -08:00
Jackie Luo
ba5cba3181 feat(theme-picker): Uninstall themes on click
Summary: Themes can now be uninstalled by clicking a button in the theme picker, instead of going to `~/.nylas/packages` to delete the directory.

Test Plan: Tested locally.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2700
2016-03-08 17:08:35 -08:00
Drew Regitsky
6a4b081707 fix(sync-errors): Handle account deltas indicating sync issues
Summary:
Changes the delta code to handle new deltas on the Account object,
which are triggered by changes in sync state indicating various backend
issues. Saves the sync state in a new field on the Account object, which
is persisited in `config.cson`.

Includes several UI changes to display more information when an account has
backend sync issues. Adds better messages and new actions the user can take
based on the type of sync issue.

Additionally, fixes bug in action bridge that was preventing multi-arg global
actions from working.

Test Plan:
Manual, by testing different sync state values and triggering deltas from the
backend

Reviewers: juan, evan, bengotow

Reviewed By: evan, bengotow

Subscribers: khamidou

Differential Revision: https://phab.nylas.com/D2696
2016-03-08 16:06:04 -08:00
Ben Gotow
df9e3b7464 fix(body-processor): Observe the db to clear cache. Fixes #1133
Summary:

Test Plan:

Reviewers:

Subscribers:
2016-03-08 13:14:06 -08:00
Ben Gotow
fb4fe3fd5f fix(autolinker): PR accepted into 0.24.1, fixes #839 2016-03-08 10:22:08 -08:00
Evan Morikawa
388fd455ea fix(lint): fix linter issues 2016-03-08 13:02:10 -05:00
Drew Regitsky
1bd3fc74e9 test(plugins): Add specs, refactor/fixes for open and link tracking
Summary:
Add specs to test the components of open tracking and link
tracking. Notably does not test the overall functionality, which
still needs specs.

Test Plan: adds specs

Reviewers: juan, evan, bengotow

Reviewed By: evan, bengotow

Differential Revision: https://phab.nylas.com/D2667
2016-03-07 20:54:43 -08:00
Drew Regitsky
e35b37441b fix(send): make send/syncback draft tasks cooperate, fix task ordering tracking
Summary:
Fixes an issue with sending where certain conditions could result in a
duplicated message.

Fixes task dependency logic for draft syncback and send. Changes `createdAt`
on tasks to instead be `sequentialId`, assigned when the task is queued, to
track order of enqueueing. Renames `isDependentTask` => `isDependentOnTask`
and adds comments for clarity.

Test Plan:
Specs updated. Might be good to add some later to test this particular
edge case.

Reviewers: juan, evan, bengotow

Reviewed By: evan, bengotow

Differential Revision: https://phab.nylas.com/D2681
2016-03-07 20:14:58 -08:00
Drew Regitsky
eaf831efb4 fix(msg-ctrls): reorder hidden options to reduce accidental error reports 2016-03-07 18:24:31 -08:00
Ben Gotow
6d43c9623c fix(autoload-images): Bar disappears when you choose to load images 2016-03-07 18:19:17 -08:00
Ben Gotow
9bb181ef3e 💄(search): Show focus around search input 2016-03-07 18:19:17 -08:00
Juan Tejada
0d15c6cea6 fix(remove-from-view): Fix logic for delete/remove-from-view behavior:
Summary:
- Separate gmail's remove-from-view and delete behaviors and write logic
  for each of those
  - Remove MailboxPerspective::{canArchiveThreads, canTrashThreads,
    removeThreads} and some unecessary code in TaskFactory
  - Instead, add MailboxPerspective::tasksForRemovingFromPerspective (I
    know its a bit of a mouthful)
  - I initially tried to put all of the logic for each execution path
    inside the TaskFactory by checking perspective types, but it made
    more sense to use the polymorphism already in place for the different
    perspective types.
  - There is a default delete/remove-from-view behavior which is
    configurable via simple ruleset objects. The gmail behavior is
    configured in this way.
- Update swipe css classes based on destination of threads
- Fixes #1460:
  - Update logic to display archive/trash buttons and context menu options correctly
    when selected threads can be archived/trashed (not based on
    perspective)
  - Same for swiping
- Add a bunch of specs
- Convert some code to ES6
- TODO write some docs for new functions

Test Plan: Unit tests

Reviewers: drew, evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2682
2016-03-07 18:16:37 -08:00
Juan Tejada
1fe51ef586 fix(date-utils): Add localization to date formats
Summary:
- Setting the locale in moment was not sufficient to actually use the
  correct localized formats.
- Moment provides localized format via the formats : 'L', 'LL', 'll',
  etc. See: http://momentjs.com/docs/#/displaying/format/
- Updates to set our date formats based on localized formats:
  - Unfortunately, localized formats always contain the year, so I
    manually removed the year from our short format.
- Actually fixes: #1515
- Fixes bug where setting nextWeek or thisWeekend returned incorrect
  date if the current day was saturday or sunday
- Add specs

Test Plan: Unit tests

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2688
2016-03-07 16:44:54 -08:00
Jackie Luo
f21e561317 spec(theme-picker): Remove filter for theme picker spec 2016-03-06 16:37:36 -08:00
Jackie Luo
62007cfbb1 🎨(theme-picker): Add inline style to close button 2016-03-06 16:36:28 -08:00
Jackie Luo
86133a150a fix(theme-picker): Fix linter issue 2016-03-06 15:25:52 -08:00
Jackie Luo
02cdc5d38a fix(theme-picker): Update spec to work with iFrame rewriting function 2016-03-05 11:24:37 -08:00
Jackie Luo
c67e2a24ea feat(theme-picker): Add visual theme picker to menu
Summary: Adds a new visual theme picker to the menu that allows users to select different themes based on color palettes and then change their themes live.

Test Plan: Test included.

Reviewers: evan, bengotow

Reviewed By: evan, bengotow

Differential Revision: https://phab.nylas.com/D2669
2016-03-04 15:34:48 -08:00
Evan Morikawa
66c84383ff feat(onboarding): update account-choose page 2016-03-04 16:53:26 -05:00
Evan Morikawa
bc4123a045 feat(onboarding): restyle step 3 2016-03-04 16:48:16 -05:00
Evan Morikawa
7cfe045b6d feat(onboarding): style page 2 2016-03-04 16:48:16 -05:00
Evan Morikawa
2f0630b0e8 feat(onboarding): style page 1 2016-03-04 16:48:16 -05:00
Ben Gotow
a1867ead6b fix(auth): re-enable ssl_required checkbox with backend support 2016-03-04 13:29:18 -08:00
Ben Gotow
092fb99a17 fix(phishing): Tie to MessageStore so it works when msgs aren't ready 2016-03-03 14:39:15 -08:00
Ben Gotow
84b92af0e7 💄(bars): No email address overflowing phising / autoload images bars 2016-03-03 14:16:54 -08:00
Mehdi Rejraji
19d3c416fc Match only valid URLs for link tracking
As of now, link-tracking creates link tracking for every <a> tag, no matter the href attribute. This commit only creates link tracking for valid URLs.
The reason I wrote a new regex instead of rewriting linkTagRegex is that this regex is used by message-list.
https://regex101.com/r/jD5zC7/3 vs https://regex101.com/r/cK0zD8/2

Resolves: #1525
2016-03-03 13:46:41 -08:00
Juan Tejada
4900df4768 fix(lint): Fix linter error in specs 2016-03-03 13:45:28 -08:00
Juan Tejada
f46502ad3e test(plugins): Add snooze and send later specs
Summary:
- Also refactors the code a bit for testability and maintainability
- Fixes #1515

Test Plan: - Unit tests

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2651
2016-03-03 12:38:42 -08:00
Ben Gotow
9b54d9cf31 fix(MessageContainer): Fix state, prevent from getting different messages. #1175
Summary:
This fixes a serious issue where drafts could appear to be sending if
they were located in the same index of the message list as a draft which was
previously sending.

Under the hood this was due to two bad programming choices:

1) State based on props in MessageContainer requires correct implementation of
   componentWillReceiveProps. This is definitely an anti-pattern.

2) Using item index rather than clientId as the key for items in the MessageList
   caused containers to be given a different message prop when one was inserted,
   rather than just shifting the existing ones down and inserting a new one.

Test Plan: Not sure how to test this really...

Reviewers: drew, juan

Differential Revision: https://phab.nylas.com/D2673
2016-03-03 12:10:03 -08:00
Jackie Luo
83fa692bb5 Bump version for node-emoji 2016-03-02 18:58:07 -08:00
Evan Morikawa
572498aa68 fix(composer): fix minor spacing issue on popout composer 2016-03-02 16:06:40 -08:00
Evan Morikawa
b727fe374d fix(find-in-thread): minor rename fixes 2016-03-02 15:00:01 -08:00
Evan Morikawa
10e0fcc965 feat(find-in-thread): add the ability to find in a thread
Summary: Find in thread

Test Plan: todo

Reviewers: bengotow, juan

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2660
2016-03-02 14:46:27 -08:00
Ben Gotow
a53e72f542 fix(hidden-messages): Address diff feedback from @jstejada 2016-03-02 10:28:32 -08:00
Ben Gotow
f5ee557e2e feat(hidden-messages): Filter trash/spam messages. Fixes #1135
Summary:
By default, the messages in a thread are now filtered to exclude
ones moved to trash or spam. You can choose to view those messages by clicking
the new bar in the message list.

When you view your spam or trash, we only show the messages on those threads
that have been marked as spam/trash.

Test Plan: Run a couple new tests

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2662
2016-03-02 10:05:17 -08:00
Evan Morikawa
66d1fe67e8 fix(account): re-add token if a new one comes in
Summary: fix(account): allow users to reconnect accounts if auth has failed

Test Plan: manual

Reviewers: bengotow, juan

Differential Revision: https://phab.nylas.com/D2663
2016-03-01 16:02:20 -08:00
mbilker
a1b9775b6d lint(*): correct eslint errors, warnings still exist
There are warnings in `spellcheck-composer-extension.es6` for the `while (true)`
loops.
2016-03-01 10:58:29 -05:00
Jackie Luo
876aea0ad9 fix(composer-emojis): Insert emoji on tab, fixes #1511 2016-02-29 20:46:30 -08:00
Ben Gotow
94badcda15 es6(*): convert 20+ source files used in example packages to ES2016
There could be a few lurking bugs. Please test!
2016-02-29 18:47:22 -08:00
Ben Gotow
3072246d8e temp(onboarding): Remove checkbox for option not yet on prod 2016-02-26 16:49:46 -08:00
Drew Regitsky
3327fc4cff fix(message-controls): add accountId to debug values copied to clipboard 2016-02-26 15:13:33 -08:00
Ben Gotow
b92e4fa07b fix(threads): Right-align the timestamps in the thread list 2016-02-26 15:00:56 -08:00
Ben Gotow
04f93bd055 💄(print): Fix #1425 2016-02-26 14:40:16 -08:00
Ben Gotow
18677e51a6 fix(config): Store cursors with sync state, avoid constant config.cson writes
Summary:
Previously we were storing sync cursors in config.cson. They were by
far the most frequently updated piece of data in config. To make things worse,
all the writing was happening in the worker window - the main window was just
seeing the changes on disk and reloading.

I believe there's an edge case which causes the main window to read the config
file when it's mid-write and empty. This causes the accounts array to become
empty in the AccountStore and lots of downstream issues. It's also then possible
for the main window to write a config change of it's own and empty the file
permanently.

Test Plan: A few new tests to make sure this is backwards compatible.

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D2642
2016-02-26 13:52:19 -08:00
Drew Regitsky
d3d4978dbd fix(message-controls): update email address for reporting 2016-02-26 12:29:11 -08:00
Drew Regitsky
0e522ec789 feat(message-controls): Option to copy message IDs/metadata to clipboard 2016-02-26 12:26:20 -08:00
Juan Tejada
0b5afaad71 fix(lint) 2016-02-26 11:24:00 -08:00
Juan Tejada
8e382f8c26 fix(aliases): Fix regression to properly create/update/remove aliases
- This fixes #1428
- Add specs
2016-02-26 11:01:01 -08:00
mbilker
1a5766114e lint(system-tray): code style consistent with rest of file 2016-02-26 11:37:20 -05:00
mbilker
38dce709e2 fix(system-tray): rename icon files for Windows and Linux 2016-02-26 11:23:53 -05:00
Drew Regitsky
e313da8a6b fix(metadata): update metadata version when processing deltas 2016-02-25 16:20:58 -08:00
logandavis
dded8abd7f Re-add SSL checkboxes with name ssl_required
Summary:
Now that IMAP auth without SSL is enabled,
those checkboxes that weren't doing anything can come
back.

Test Plan:
This change isn't fully tested and should be thoroughly
inspected (on staging?) before rollout. The N1 end works and sends
parameters correctly, but a 401 prevented local testing of the
interface between N1 auth and sync-engine auth.

Reviewers: bengotow, drew

Reviewed By: drew

Subscribers: kav-ya

Maniphest Tasks: T6666

Differential Revision: https://phab.nylas.com/D2632
2016-02-25 14:38:49 -08:00
Ben Gotow
1df517c4af bump(version): 0.4.9 and changelog 2016-02-25 14:10:21 -08:00
Juan Tejada
dd92c9b6ad fix(snooze): Do not display snooze buttons unless looking at inbox 2016-02-25 14:02:58 -08:00
Evan Morikawa
d97e724c1b fix(analytics): fix send later and snooze analytics 2016-02-25 14:01:15 -08:00
Ben Gotow
816596d422 perf(snooze): Don't wrap snooze label in unsafe container 2016-02-25 13:39:30 -08:00
Ben Gotow
94a8ca57d8 fix(link/open tracking): Update error messages 2016-02-25 13:32:59 -08:00
Ben Gotow
a1db17e3c9 fix(snooze): Hide N1-Snoozed from the category picker 2016-02-25 13:32:58 -08:00
Evan Morikawa
e77d658a96 fix(composer): focus on the absolute end when clicking near the bottom 2016-02-25 13:31:34 -08:00
Juan Tejada
93f43f6b4f feat(snooze): Add snooze date label to snooze threads
- Adds a new InjectedComponentSet for the role 'ThreadList:Label'.
- Adds a new label to the thread list indicating the snooze date if the
  thread has been snoozed
- Coerces MailLabel to achieve this. This is a temporary hack, we should
  design a better view to display snooze date information
2016-02-25 13:12:40 -08:00
Ben Gotow
fe27fb161f fix(link/open tracking): Remove intermediate metadata states, extra db lookup, dead code 2016-02-25 12:54:18 -08:00
Evan Morikawa
274131863f feat(analytics): add analytics to send later, snooze, tracking 2016-02-25 12:34:09 -08:00
Drew Regitsky
d5ba162e82 fix(composer-buttons): Fix broken icons on overflow, make buttons wrap 2016-02-25 12:30:20 -08:00
Evan Morikawa
cc15d35848 fix(plugin): better errors if plugins are malformed
Fixed read assets
2016-02-25 11:55:11 -08:00
Juan Tejada
57d7057161 💄(composer): Properly align 'X more' token 2016-02-25 11:42:38 -08:00
Ben Gotow
bb99f95d2c sp(translate): Transalate => Translate 2016-02-25 11:05:07 -08:00
Juan Tejada
58833b39e8 feat(snooze): Update message in toast when snoozing
- Adds new arg to ChangeLabelTask and ChangeFolderTask to override
  default description
- Adds custom description to task when snoozing
2016-02-25 10:42:21 -08:00
Juan Tejada
2a757f332e fix(plugins): Add headers for composer popover + Fix in snooze popover 2016-02-25 10:24:29 -08:00
Evan Morikawa
407498057c fix(composer): minor padding fix in composer 2016-02-25 10:06:17 -08:00
Ben Gotow
296110d177 fix(swipe): Make it easier to close snooze-confirm swipe state, fix double-popover issue 2016-02-24 21:01:23 -08:00
Jackie Luo
5a480031f0 fix(composer-emojis): Adjust width for overflower 2016-02-24 20:41:54 -08:00
Ben Gotow
9d0ebe9423 fix(snooze): A few minor popover adjustments. See desc.
- Rather than have a `showing` prop on the fixed popover, I just remove it and put a span in it's place when it's gone. This means we always get componentDidMount when the popover appears and simplifies when to focus it's content.
- The fixed popover implements esc and blur behaviors itself
- The fixed popover uses the background-secondary color and works in dark mode
- The snooze items have hover and active states
2016-02-24 20:05:21 -08:00
Ben Gotow
030b60d27d fix(star): Bulk star icon has never shown current state(?!) 2016-02-24 20:05:21 -08:00
Juan Tejada
dea8318e13 💄(plugins): Add error messages back to plugin dialogs 2016-02-24 18:22:54 -08:00
Ben Gotow
21b1cd4e19 fix(build): Don't delete plugin package.json files, restore ellipsis (@sdw consulted HIG!) 2016-02-24 18:15:55 -08:00
Drew Regitsky
db5c822ccf fix(snooze): options text capitalization: title case => sentence case 2016-02-24 17:56:52 -08:00
Juan Tejada
8e26c8574f fix(lint): Fix lint errors 2016-02-24 17:53:31 -08:00
Drew Regitsky
d58f8567b5 fix(send-later): options text capitalization: title case => sentence case 2016-02-24 17:45:14 -08:00
Juan Tejada
9fa64c38e2 fix(plugins): Several minor fixes:
- Fixes styling for snooze quick action button when thread selected
- Fixes snooze popover input debouncing
- Other interaction fixes
2016-02-24 17:34:18 -08:00
Drew Regitsky
cffa9c723c fix(open-tracking): quick CSS fix to thread list icon 2016-02-24 16:55:17 -08:00
Evan Morikawa
829facd6dc fix(snooze): look at allCategories instead of userCategories 2016-02-24 16:51:34 -08:00
Ben Gotow
f083818c92 💄(snooze): Fix swipe-to-snooze animation 2016-02-24 16:44:16 -08:00
Drew Regitsky
fb335c332b fix(plugins): Change server URLs for open/link tracking to final values 2016-02-24 16:29:12 -08:00
Evan Morikawa
17ea99d2ff fix(error-handling): handle offline for link tracking & read-receipts
Fix offline error handling of link tracking and read receipts

Fix ellipses for tooltips

Allow you to change the title in the error box
2016-02-24 16:06:08 -08:00
Juan Tejada
d866679737 fix(snooze): Fix quick action button, remove italic from popover 2016-02-24 15:33:57 -08:00
Evan Morikawa
3790f15732 fix(read-receipt): message status updates live 2016-02-24 15:25:11 -08:00
Juan Tejada
f86d984355 fix(snooze): Close popover on error 2016-02-24 15:11:03 -08:00
Juan Tejada
7f5c225d40 fix(snooze): Close popover when opening a new one 2016-02-24 15:08:53 -08:00
Juan Tejada
defbbbe3c7 fix(snooze): Only allow snooze from inbox 2016-02-24 15:06:06 -08:00
Juan Tejada
9c2a05ba3f fix(fixed-popover): Reposition when overflowing on left direction
- This is a temporary solution
2016-02-24 15:02:42 -08:00
Evan Morikawa
9ad088f899 feat(tracking): sticky tracking state and consolidate component 2016-02-24 14:46:09 -08:00
Ben Gotow
afa22729aa fix(feedback): Remove feedback btn, update "N1 Help" in menu bar 2016-02-24 13:49:15 -08:00
Ben Gotow
1f29cb3cea 💄(send-later): Minor draft list styling changes 2016-02-24 13:44:56 -08:00
Ben Gotow
9d52cb1124 fix(snooze/send-later): Change chrono config to always prefer dates in future 2016-02-24 13:16:53 -08:00
Evan Morikawa
d04ee7ef3a fix(read-receipts): fix padding and styles under selection 2016-02-24 13:16:35 -08:00
Drew Regitsky
fb8f8b78ac fix(read-receipts): threadlist icon vert align and placeholder when missing 2016-02-24 13:02:18 -08:00
Evan Morikawa
02600786c2 fix(tracking): tracking pixel won't register if it's from you 2016-02-24 12:55:00 -08:00
Evan Morikawa
0d7d5489c6 fix(lint): fix less and js linter issues 2016-02-24 12:31:56 -08:00
Evan Morikawa
6144f83834 fix(tracking): fix link tracking and read receipt plugins
Fix broken links in link tracking and read receipts

Fix bug in email frame where it wouldn't adjust the height even when
content changed

MessageItem bodies automatically clear the MessageBodyProcessor cache when
the message contents (including metadata) change.

Remove unused Account stuff from nylas-observables

Plugins appIds properly read if there's an environment set
2016-02-24 12:30:12 -08:00
Ben Gotow
7526fd8684 fix(send-later): Resolves a variety of small bugs from QA 2016-02-24 12:26:56 -08:00
Drew Regitsky
29f751e1ce fix(plugins): more fixes to open/link tracking urls 2016-02-24 12:17:39 -08:00
Drew Regitsky
feabd96f86 fix(plugins): fix open tracking and link tracking URLs 2016-02-24 12:00:40 -08:00
Juan Tejada
aebbaec639 💄 (send-later): Update placeholder copy, again 2016-02-24 11:50:43 -08:00
Juan Tejada
4de7948500 fix(sidebar): Prevent error in snooze item when category doesnt exist
- Add Snooze category to locked and hidden categories to prevent from
  directly moving stuff to it and showing up in the user categories
  section
2016-02-24 11:45:47 -08:00
Jackie Luo
4459fad47b 🎨(composer-emojis): Remove pointer and adjust styling
Summary: The floating toolbar now takes an optional boolean to decide whether it shows the pointer.

Test Plan: Tested locally.

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2628
2016-02-24 11:31:32 -08:00
Juan Tejada
ab181305b3 💄 (popover): Properly apply styles to input inside popover
- Fix tabindex in send later popover
- Update placeholder copy
2016-02-24 11:22:54 -08:00
Juan Tejada
1eb7515ff6 feat(snooze): Add snooze item to sidebar 2016-02-24 10:50:21 -08:00
Juan Tejada
f5c18d1b34 💄 (snooze): Add quotes to popover placeholder 2016-02-24 10:28:08 -08:00
Juan Tejada
194aa84f44 fix(snooze): Close all popover types when submitting date with enter 2016-02-24 10:27:16 -08:00
Jackie Luo
f04449d67a 🎨(composer-emojis): Fix styles in emoji picker
Summary: Adjust sizing, padding, etc., to fit better with overall app design.

Test Plan: Tested locally.

Differential Revision: https://phab.nylas.com/D2627
2016-02-24 10:12:38 -08:00
Ben Gotow
7bc335c28b fix(*): misc fixes for warnings, appearance of PL indicators 2016-02-24 01:04:57 -08:00
Juan Tejada
579d4ad71b fix(signature): Update signature when account is changed in composer
Summary:
- Fixes #1239
- Adds action in composer view to indicate when draft partcipants have
  changed. This seemed like the simplest way to listen for this change without
  adding another extension point
- Updates signature plugin to listen to this action and update signature
  accordingly
- Adds test

Test Plan: - Unit tests

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2614
2016-02-24 00:19:55 -08:00
Juan Tejada
57fb1919ee fix(system-tray): Move Tray to main process
Summary:
- Fixes #1223
- Still uses a package in the renderer process to listen to changes in
  the unread count and have access to the canvas api.
- Renderer process will write icon to disk and inform main process that
  it should update the icon

Test Plan: - Manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2613
2016-02-23 23:26:06 -08:00
Juan Tejada
0c8ecc5829 💄 (plugins): Clean up constants in plugins
- Fix some eslint issues
2016-02-23 22:55:47 -08:00
Juan Tejada
d930abcea6 fix(snooze): Fix react component warnings 2016-02-23 22:39:18 -08:00
Ben Gotow
9b32ac4719 fix(metadata-plugins): Add production app ids 2016-02-23 22:29:49 -08:00
Juan Tejada
e82278ab25 feat(snooze): Adds initial design pass and update snooze popover
Summary:
- Add FixedPopover, an absolutely positioned popover component to use for swipe snoozing:
  - This component needs to be finished, as its current behavior is primarily for the snooze plugin
- Updates popover.cjsx to properly render pointer for thesnooze popover for the `down` direction
- Adds new design assets
- Adds date input to snooze popover

Test Plan: - TODO

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2624
2016-02-23 20:03:42 -08:00
Drew Regitsky
4289e09651 fix(metadata-plugins): update all appIds and URLs for staging 2016-02-23 19:19:43 -08:00
Evan Morikawa
393156c55c fix(link-tracking): fixes in link-tracking 2016-02-23 18:58:07 -08:00
Evan Morikawa
6e48af0c90 fix(read-receipts): Style fixes to link tracking and read receipts 2016-02-23 18:58:07 -08:00
Evan Morikawa
f3d8ddda21 feat(read-receipts): show status on MessageItem 2016-02-23 18:58:07 -08:00
Ben Gotow
29a0da36a3 fix(auth-failure): Warn of disconnect on 403s, fix logic 2016-02-23 18:35:24 -08:00
Ben Gotow
5e78a9b2c6 💄(plugins): Updated assets and a bit of error handling 2016-02-23 17:51:10 -08:00
Ben Gotow
40274cfc77 fix(composer): Redo toolbar styling with theme variables + minor fixes 2016-02-23 15:40:44 -08:00
Ben Gotow
6efd513608 💄(snooze): Quick action styling, draft pencil alignment 2016-02-23 14:37:10 -08:00
Ben Gotow
5f38c9dfb1 fix(send-later): Re-order so send later always appears beside send 2016-02-23 14:37:10 -08:00
Evan Morikawa
e450e10c66 fix(linter): fix less linter error 2016-02-23 14:18:49 -08:00
Evan Morikawa
e6b285f504 fix(inbox-zero): don't show inbox zero when syncing 2016-02-23 14:17:11 -08:00
Evan Morikawa
2dc88f3fe2 fix(img): png-crush images 2016-02-23 14:12:02 -08:00
Evan Morikawa
eedf84792d fix(composer): fix styles in popout composer 2016-02-23 13:55:31 -08:00
Ben Gotow
39265572bc 💄(send-later): Lots of styling of send-later 2016-02-23 13:52:18 -08:00
Evan Morikawa
481dc28585 feat(composer): new composer footer and icon design 2016-02-23 13:42:10 -08:00
Evan Morikawa
97b15a5ace feat(inbox-zero): add minimal graphic to inbox when no threads 2016-02-23 10:50:08 -08:00
Ben Gotow
66986ff00a 💄(onboarding): Incorrect button padding during onboarding 2016-02-23 10:48:36 -08:00
Ben Gotow
34da43c42a 💄(icon): A delightful seafoam green icon 2016-02-23 10:35:08 -08:00
Ben Gotow
2e1cb643dc fix(swipe): Better animation, callback for action completion 2016-02-22 16:08:10 -08:00
Ben Gotow
d3641d2703 💄 Minor visual tweaks to win32 + dark mode 2016-02-22 13:30:12 -08:00
Ben Gotow
7a873cac58 fix(drag): Patch for crash on dragging threads 2016-02-22 10:57:22 -08:00
Ben Gotow
3049e9869c 💄(search): Fix clear button positioning 2016-02-22 10:14:34 -08:00
Ben Gotow
8168838101 fix(compose): More defensive check when switching from address, see description
This fixes #1341, but is more restrictive:

- You cannot switch From: accounts if the draft was retrieved from the sync engine (authored via Gmail or via another copy of N1. The sync-engine gives drafts a non-null threadId)

- You cannot switch From: accounts if the draft is a forward from an existing thread.

These two restrictions are unfortunately necessary to ensure that we don't have to download attachments we don't have to re-upload them to another account on the sync-engine. We could write code for this in the future but it's going to be gross.
2016-02-19 19:19:43 -08:00
Ben Gotow
99441ebd35 fix(print): Add print button to preview, don't print immediately (Fixes #1352) 2016-02-19 19:07:22 -08:00
Ben Gotow
7a760ff766 fix(compose): Enable esc-to-cancel from Cannot Send dialog (Fixes #1383) 2016-02-19 18:59:17 -08:00
Ben Gotow
825d2ef8be 💄: Experimental app icon, fix for merge conflict 2016-02-19 18:52:49 -08:00
Ben Gotow
f63b7e66e4 feat(swipe-to-*): Gesture support and animation in thread list
Summary:
This diff does two things:
- It adds a new SwipeContainer that makes it easy to implement swipe gestures. This is built into listTabular, so you can create a list and define onSwipeLeft/Right to enable gestures.

- It adds support for basic add/remove animations to the thread list. This works by adding a CSS transition to `top` and also leaving removed rows around for a specified time. (these times need to match.) Pretty much just cloned the core idea from TimeoutTransitionGroup.

Test Plan: No tests yet

Reviewers: evan, juan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2581
2016-02-19 18:22:28 -08:00
Evan Morikawa
3b8cc984d0 feat(menu): add right click menu
Summary:
Adds a right click menu to the thread list
Moving to folders and labels #TODO

Test Plan: TODO

Reviewers: bengotow, juan

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2609
2016-02-19 18:35:48 -05:00
Ben Gotow
0559e92dc3 fix(sending): Tiny fix for strange vertical space when sending 2016-02-19 15:31:51 -08:00
Drew Regitsky
fe7a894e51 feat(new-plugins): add open tracking and link tracking plugins
Summary:
Adds two (very similar) plugins - Open Tracking and Link Tracking.
Both can be enabled via a button in the composer. Open tracking
inserts a tracking pixel right before send, and link tracking replaces
all links with tracked redirects. Both plugins use the new Metadata
service to store their open/click counts, and have backend servers to
respectively serve the pixel image or handle the redirects. Requests
also trigger a metadata update to increment the open/click counters.

Test Plan: Manual for now

Reviewers: evan, bengotow, drew

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2583
2016-02-19 12:42:56 -08:00
Ben Gotow
a0484d13c1 lint(emoji): Fix lint failure from spacing 2016-02-19 11:29:31 -08:00
Karim Hamidou
3aa4b16b44 [auth] Change a Google OAuth parameter
Summary:
Some of our users who reauth are getting weird errors from Google — it seems that in some cases Google OAuth doesn’t pass us a `refresh_token`, even though we ask for one by passing `approval_prompt=force` (I’ve landed a commit to log more details about this in edgehill-server —- 6e984ffa26 — but this won’t fix the problem).

Apparently, Google recently « soft-deprecated » `approval_prompt` in favor of a new parameter called `prompt`, which does mostly the same thing (https://developers.google.com/identity/protocols/OAuth2WebServer#formingtheurl)

This diff replaces `approval_prompt` by `prompt`.

Test Plan: Tested by authing a Gmail account and checking that it worked.

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: emfree

Differential Revision: https://phab.nylas.com/D2557
2016-02-19 11:20:36 -08:00
Ben Gotow
e5bf37cf9e fix(participants): Update specs to reflect that spacing is now in CSS 2016-02-19 10:28:02 -08:00
Ben Gotow
298eb06548 💄: White buttons, dropdown / popover cleanup, hairline dividers 2016-02-18 15:21:42 -08:00
Juan Tejada
e798a1a02d fix(draft-list): Display , separated participants list 2016-02-18 12:14:18 -08:00
Juan Tejada
1f25a37971 🎨(composer): Fix show-more token style in collapsed participants 2016-02-18 12:06:29 -08:00
Juan Tejada
ba1a305485 fix(snooze): Check if snooze category is defined when creating 2016-02-18 10:44:03 -08:00
Juan Tejada
76bda1dbe4 feat(snooze/send-later): Add snooze and send later plugins
Summary:
- Add initial version of snooze and send later plugins
- Tests are missing since this will probably heavily change before we are done with them

Test Plan: - TODO

Reviewers: drew, bengotow, evan

Reviewed By: bengotow, evan

Differential Revision: https://phab.nylas.com/D2578
2016-02-18 10:06:21 -08:00
Ben Gotow
fa34fc303f fix(onboarding): Missing require for Actions, bad CSS 2016-02-17 22:21:23 -08:00
Juan Tejada
1ba3a64785 feat(metadata): Switch to storing metadata on models
Summary:
 - Adds a class ModelWithMetadata which models can now extend from
 - Instances of this class can query metadata for a plugin via
   `obj.metadataForPluginId(pluginId)`
 - To observe changes on metadata it is sufficient to observe database changes on
   the model. e.g.:
   `DatabaseStore.findAll(Thread,
   [Thread.attributes.pluginMetadata.contains(pluginId)])`
 - To set metadata a new action has been created: Actions.setMetadata
 - Adds a helper observable in nylas-observables to query for models with
   metadata
 - Merges CreateModelTask and UpdateModelTask into SyncbackModelTask
 - Update SendDraftTask ans SynbackDraftTask to handle metadata changes

Test Plan: - Unit tests

Reviewers: drew, evan, bengotow

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2575
2016-02-17 15:00:33 -08:00
Juan Tejada
ddb661ed37 fix(account-prefs): Update account save logic to prevent incorrect saves
- This fixes #1354 and #1235
- This issue was caused because the account details preferences
  component was keeping as state all of the account object fields. `setState` works
  like `extend`, so when the account changed, state was set to the new set of account fields,
  but the old values were only removed if they were overriden, and remained the
  same if the field did not exist in the new state object.
  Specifically, when a new account was added, setState was called with
  `{..., defaultAlias: undefined}` which did /not/ remove the  the defaultAlias
  from the previous state.
- Switched to managing state with a top level key `account`
2016-02-16 18:03:22 -08:00
Ben Gotow
e6044d8b33 fix(important): Remove todo, reference to usesImportantFlag. Fixes #1331 2016-02-16 11:41:15 -08:00
Evan Morikawa
2658a01e40 fix(composer): fix dissapearing participant bug w/ multiple composers
If you had multiple composers on a single thread, all but the last
composer would lose its participants. This was because once it loaded the
participants would blur and trigger a request to set the participants to
blank. That request was async so by the time it was resolved the draft was
loaded and the request erroneously went through
2016-02-15 18:12:41 -05:00
Evan Morikawa
55687d3d9f fix(onboarding): remove ssl-enabled checkbox
Until it's implemented in the backend
2016-02-15 16:51:02 -05:00
Evan Morikawa
7edfe3853f fix(messages): fix jumping message list on draft focus
We were erroneously jumping to an individual message when you focused on
it.
2016-02-15 16:34:23 -05:00
Evan Morikawa
e24e0f99f5 fix(message): fix collapse unset when new thread delta
The minification bit was erroneously getting reset when a new thread
update delta came in due to an object equality check instead of an id
check.
2016-02-15 15:46:33 -05:00
Jackie Luo
ecac59f1c3 fix(composer-emojis): Add spec, allow adjacent emojis, fix toolbar positioning bug
Summary:
Adds tests to the emoji picker.

The emoji picker should also now be able to add emojis consecutively (without spaces).

Finally, the toolbar positioning bug (emoji picker appearing in front of typed text, the toolbar manager appearing in the upper left corner when empty lines are selected) should be fixed so that the toolbar appears directly above/below the selection area.

Test Plan: Tests included in diff.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2551
2016-02-12 11:42:11 -08:00
Evan Morikawa
280015b5c0 fix(analytics): delay closing of onboarding window 2016-02-12 10:56:36 -08:00
Evan Morikawa
0f9475cc91 fix(analytics): add onboarding welcome event 2016-02-12 10:25:28 -08:00
Ben Gotow
d7aacc3cf8 fix(search): Compile immediately to avoid truncating. Fixes #1307 2016-02-11 17:18:24 -08:00
Ben Gotow
92abf1f441 🎨: Fixes, labels in narrow thread view, better label wrap 2016-02-11 15:25:24 -08:00
Juan Tejada
76cbb97c2b 🎨(popover): Remove hardcoded width from code -> move to stylesheet 2016-02-11 13:15:59 -08:00
Ben Gotow
ef40e73108 fix(min-height): Reduce minimum window size to 250px. Fixes #1293 2016-02-10 12:39:13 -08:00
Ben Gotow
fa0438ea9f fix(build): LESS lint issue 2016-02-10 09:38:10 -08:00
Ben Gotow
8a8170eb0e 🎨: Smaller buttons, smaller toolbar, smaller text
This should not be considered final, but we do plan to shrink the size of the entire UI slightly to match platform conventions.
2016-02-09 19:45:24 -08:00
Ben Gotow
fbb7a4b40c bump(*): Electron 0.36.7, version to 0.4.6 2016-02-08 18:35:23 -08:00
Ben Gotow
f4e3137b5b fix(readme): Force github to refresh cache of screenshot 2016-02-08 14:52:07 -08:00
Ben Gotow
399f83bccc fix(tray): Do not show count on Mac OS X when 0. Fixes #1233 2016-02-08 10:31:13 -08:00
Ben Gotow
12f4142d84 fix(system-start): Do not continue when checkAvailability returns false 2016-02-06 11:35:01 -08:00
Ben Gotow
1bd41a84e9 fix(undo): Ensure undo bar dismisses after re-appearing 2016-02-05 19:11:27 -08:00
Ben Gotow
1b3c4cf594 fix(messages): Field label was always "To" 2016-02-05 18:42:29 -08:00
Ben Gotow
7406e2a5a3 feat(perspective): Restore through NylasEnv.savedState 2016-02-05 18:36:48 -08:00
Ben Gotow
fc2a179c6c fix(message): Allow height to be 0, remove 150px min height 2016-02-05 15:33:07 -08:00
Ben Gotow
205f3ba6ab fix(tray): Fix accidental conversion to NaN 2016-02-05 14:37:55 -08:00
Juan Tejada
78665c5fec fix(sidebar): Handle edge cases for sidebar shortcuts
Summary:
- Update menus and shortcuts correclt when accounts change or focused
  accounts change
- Move menu logic into SidebarCommands to remove duplicated logic
- Make `Window` menu also contain checkboxes

Test Plan: - Manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2534
2016-02-05 14:25:07 -08:00
Juan Tejada
c4749f592e fix(sidebar): Display correct keyboard shortcuts in account switcher
- Fixes #1203
2016-02-05 09:55:27 -08:00
Ben Gotow
44150fc529 perf(outbox): Only trigger when send draft tasks are present 2016-02-04 20:15:15 -08:00
Juan Tejada
682bae5e08 fix(styles): Fix less lint error 2016-02-04 18:19:26 -08:00
Juan Tejada
182f6abb25 update(sidebar): Update sidebar design + context menus
Summary:
- Removes account switcher almost entirely
- Update context menu to edit and delete sidebar items
- Gross hardcoded position and size for the switcher icon -- will likely update with later redesign

Test Plan: - Visual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2527
2016-02-04 14:58:47 -08:00
Ben Gotow
8b3f7f0578 feat(outbox): Sending status now appears beside drafts
Summary:
This diff adds an "OutboxStore" which reflects the TaskQueue and
adds a progress bar / cancel button to drafts which are currently sending.

- Sending state is different from things like Send later because drafts
  which are sending shouldn't be editable. You should have to stop them
  from sending before editing. I think we can implement "Send Later"
  indicators, etc. with a simple InjectedComponentSet on the draft list
  rows, but the OutboxStore is woven into the DraftList query subscription
  so every draft has a `uploadTaskId`.

- The TaskQueue now saves periodically (every one second) when there are
  "Processing" tasks. This is not really necessary, but makes it super
  easy for tasks to expose "progress", because they're essentially
  serialized and propagated to all windows every one second with the
  current progress value. Kind of questionable, but super convenient.

- I also cleaned up ListTabular and MultiselectList a bit because they
  applied the className prop to an inner element and not the top one.

- If a DestroyDraft task is created for a draft without a server id, it
  ends with Task.Status.Continue and not Failed.

- The SendDraftTask doesn't delete uploads until the send actually goes
  through, in case the app crashes and it forgets the file IDs it created.

Test Plan: Tests coming soon

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2524
2016-02-04 14:14:24 -08:00
Dakota Nelson
40cb19d122 Disallow Gmail accounts from entering IMAP flow
Summary:
The error message from D2515 is being upgraded to also disable the
continue button so that a user is unable to sync an @gmail.com account
using the IMAP flow.

Test Plan: Tested locally.

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2516
2016-02-04 09:54:01 -08:00
Bernd Verst
f162353ce4 Removes the MessageListNotificationBar editable component in favor of the existing MessageListHeaders
Summary: Removes the MessageListNotificationBar editable component in favor of the existing MessageListHeaders

Test Plan: Manually built N1 and verified the MessageListNotificationBar no longer appears as editable component.

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2523
2016-02-03 18:11:23 -08:00
Jackie Luo
dec0e95dc2 fix(composer-emojis): Fix bugs around null nodes and whitespace
Summary: Corrected the linting errors and changed some of the logic around tracking typed text and triggering properly.

Test Plan: Tested locally.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2522
2016-02-03 18:10:56 -08:00
Ben Gotow
8f7795b40f fix(send-action): Make dropdown trigger secondary send actions
We can come up with a new UX for this later, but for now this is important for consistency with the Reply/Reply-All/Forward picker and others in the app that perform actions rather than changing selection. Also makes it possible to choose to "Send and Archive" /without/ making it the future default, which will be nice when there are many you may want infrequently.
2016-02-03 16:27:11 -08:00
Ben Gotow
a3cd23b41c 💄(emoji): Add an icon / description to emoji package 2016-02-03 15:43:22 -08:00
Dakota Nelson
041fc24927 Warn when entering Gmail address in imap settings
Summary:
Users have been configuring their Gmail accounts using the IMAP
authentication method, which causes problems. Attempting to do so will
now create an error message.

Test Plan: Tested locally.

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg, emfree

Maniphest Tasks: T6621

Differential Revision: https://phab.nylas.com/D2515
2016-02-03 15:14:02 -08:00
Evan Morikawa
d4db0737cf feat(error): improve error reporting. Now NylasEnv.reportError
Summary:
The goal is to let us see what plugins are throwing errors on Sentry.

We are using a Sentry `tag` to identify and group plugins and their
errors.

Along the way, I cleaned up the error catching and reporting system. There
was a lot of duplicate error logic (that wasn't always right) and some
legacy Atom error handling.

Now, if you catch an error that we should report (like when handling
extensions), call `NylasEnv.reportError`. This used to be called
`emitError` but I changed it to `reportError` to be consistent with the
ErrorReporter and be a bit more indicative of what it does.

In the production version, the `ErrorLogger` will forward the request to
the `nylas-private-error-reporter` which will report to Sentry.

The `reportError` function also now inspects the stack to determine which
plugin(s) it came from. These are passed along to Sentry.

I also cleaned up the `console.log` and `console.error` code. We were
logging errors multiple times making the console confusing to read. Worse
is that we were logging the `error` object, which would print not the
stack of the actual error, but rather the stack of where the console.error
was logged from. Printing `error.stack` instead shows much more accurate
stack traces.

See changes in the Edgehill repo here: 8c4a86eb7e

Test Plan: Manual

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2509
2016-02-03 18:06:52 -05:00