Commit graph

1681 commits

Author SHA1 Message Date
Evan Morikawa
813669f7d4 fix(lint): fix various linter issues 2016-05-06 14:36:11 -07:00
Evan Morikawa
431b652e62 fix(lint): various linter fixes 2016-05-06 14:11:05 -07:00
Evan Morikawa
3d3b9bf87f fix(lint): fixing various linter errors.
746 left
2016-05-06 13:42:09 -07:00
Evan Morikawa
bd444864c8 fix(linter): object-shorthand, quote-props
object-shorthand got turned off. We think it's fine to say {foo: foo} if
you want

quote-props is error consistent as neeeded.

Use custom file-by-file rules for global-require
2016-05-06 12:41:52 -07:00
Evan Morikawa
d9be81b7f5 feat(babel6): fix es6 importing from coffee 2016-05-06 12:00:45 -07:00
Evan Morikawa
47497dba04 feat(babel6): Fix emoji data 2016-05-06 11:55:48 -07:00
Evan Morikawa
2e2f877ddb feat(babel6): 1,774 linter errors 2016-05-06 11:55:46 -07:00
Evan Morikawa
05515c847c feat(babel6): 2,743 lint errors 2016-05-06 11:55:41 -07:00
Evan Morikawa
e054a6ac91 feat(babel6): Yay all the tests pass 2016-05-06 11:55:36 -07:00
Evan Morikawa
2e906d4e16 feat(babel6): Don't use _.clone on Model objects 2016-05-06 11:55:34 -07:00
Evan Morikawa
57a3e140f4 feat(babel6): Fix autlinker spec 2016-05-06 11:55:32 -07:00
Evan Morikawa
706f92bc9d feat(babel6): Fix spread operator 2016-05-06 11:55:29 -07:00
Evan Morikawa
92199587b3 feat(babel6): Convert message.coffee to message.es6 2016-05-06 11:55:27 -07:00
Evan Morikawa
390007cac9 feat(babel6): fix es6 describe function syntax 2016-05-06 11:55:20 -07:00
Evan Morikawa
2692fce522 feat(babel6): Fix destructuring default from exports and update linter 2016-05-06 11:55:14 -07:00
Evan Morikawa
84e51ed3d9 feat(babel6): Fix syntax errors and add regenerator runtime 2016-05-06 11:55:08 -07:00
Evan Morikawa
a54b540bd4 feat(babel6): Fix linter problems in new es6 files 2016-05-06 11:55:06 -07:00
Evan Morikawa
9e4029036a feat(babel6): Rename to js to es6 2016-05-06 11:55:02 -07:00
Evan Morikawa
21419b9df0 feat(babel6): Convert to use new es6 require syntax 2016-05-06 11:54:55 -07:00
Evan Morikawa
8db8722f74 feat(babel6): Initial babel conversion 2016-05-06 11:54:38 -07:00
Ben Gotow
bbdfa85547 feat(keymaps): Edit your keymaps from preferences 2016-05-05 17:05:51 -07:00
Ben Gotow
3d18241ea1 fix(focus): Always set selection range into editor on focus 2016-05-05 11:53:58 -07:00
Jackie Luo
81d1b36ef2 🎨(darkside): Hide search bar in list mode when items are selected 2016-05-05 10:35:37 -07:00
Ben Gotow
cb2913871e es6(*): AutoUpdateManager, ProtocolHandler, more. 2016-05-04 19:34:41 -07:00
Ben Gotow
204f3005c1 fix(file-drop): Wait for attachments before popping composer 2016-05-04 19:09:28 -07:00
Juan Tejada
6a4b407cb0 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
c85c8d04b7 fix(composer-editor): Remove dead code 2016-05-04 15:02:38 -07:00
Ben Gotow
34f1ca0ba8 rm(fullcontact): Deprecated in favor of new contact sidebar 2016-05-04 14:41:13 -07:00
Ben Gotow
66cb0a6a77 rm(*): deprecated/unused Atom code, user stylesheet support 2016-05-04 14:27:46 -07:00
Ben Gotow
7657598f40 fix(read-receipts): Always remove own read receipt images 2016-05-04 13:44:35 -07:00
Juan Tejada
0e10ccbde9 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
a2faa9b83b fix(keymaps): "Delete" => "Del" to fix keycode 46 2016-05-04 09:29:42 -07:00
Ben Gotow
7a15e369a7 Revert "feat(mailto): Allow N1 to be default client on windows"
This reverts commit a08eb3e175.
2016-05-03 19:04:04 -07:00
Ben Gotow
a08eb3e175 feat(mailto): Allow N1 to be default client on windows 2016-05-03 14:47:21 -07:00
Ben Gotow
e637f6871c 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
4d1c380159 fix(window): fix error when adding account and serializing bad API data 2016-05-03 11:30:41 -07:00
Ben Gotow
5f166cc6ff fix(sheets): Always change sheet when changing perspective (#2094) 2016-05-02 19:14:12 -07:00
Ben Gotow
b9f39cd86e fix(tracking): Use colors for link/read receipts, fix parsing 2016-05-02 15:59:17 -07:00
Ben Gotow
d9bdd90599 fix(emoji): Replace message emoji in DOM, not in html string 2016-05-02 12:33:08 -07:00
Ben Gotow
fb4bd77efd fix(undo): Don't create separate commands, since they bubble separately 2016-04-29 17:10:17 -07:00
Evan Morikawa
399d445e98 fix(specs): fix composer-header specs 2016-04-29 16:54:37 -07:00
Ben Gotow
739d23ffe5 fix(lint): Errors in ActionBarPlugins 2016-04-29 16:19:52 -07:00
Evan Morikawa
ebba673671 feat(composer): better composer plugin loading 2016-04-29 15:58:17 -07:00
Evan Morikawa
dec047b18c fix(composer): fix flashing and focus losing in the composer 2016-04-29 15:58:17 -07:00
Ben Gotow
4fd66e194f feat(mail-merge): Import CSV button 2016-04-29 13:55:11 -07:00
Ben Gotow
03080cf109 fix(mail-merge): Fix drag and drop for files vs. chips 2016-04-29 11:57:43 -07:00
Evan Morikawa
e2dcc7b435 fix(onboarding): pass along accountId too 2016-04-29 10:20:59 -07:00
Karim Hamidou
b82e47ba34 [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
dd40540953 fix(read-receipts): Fix another issue caused by ES6 subclassing Coffeescript 2016-04-28 17:20:39 -07:00
Ben Gotow
67fcba6769 fix(read-receipts): Remove tracking pixels when composing drafts 2016-04-28 17:08:54 -07:00
Evan Morikawa
687ecbfcc3 fix(onboarding): encode welcome page info 2016-04-28 17:06:47 -07:00
Ben Gotow
821dfc27ce fix(build): linter errors 2016-04-28 16:40:48 -07:00
Ben Gotow
765d9f30fc 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
b3ea335345 feat(onboardin): fix win closing & nav to welcome page 2016-04-28 15:29:13 -07:00
Evan Morikawa
9642484b5e perf(composer): tweak tooltip animation timing & composer loading 2016-04-28 13:42:30 -07:00
Evan Morikawa
4b71258dee fix(sidebar): fix account name styles 2016-04-28 11:45:44 -07:00
Juan Tejada
04cebd51f2 fix(cursor): Remove stale cursor from config.cson when cursor error
- #2049
2016-04-28 10:16:40 -07:00
Juan Tejada
71353cdaf1 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
61073da7a0 fix(thread-list): Remove unnecessary extra trigger 2016-04-27 15:20:25 -07:00
Ben Gotow
7ce646a1d3 fix(keymaps): Restore missing bindings, handle single keys inside of email frames 2016-04-27 15:20:06 -07:00
John McNair
f818a134dd 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
6f13a97e1c 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
68bf080b57 fix(autolinker): Don't match emails that are also URLs #2071 2016-04-26 19:03:43 -07:00
Ben Gotow
8e9346f224 fix(autolinker): Use getAttribute('href') because href is magic 2016-04-26 17:01:15 -07:00
Ben Gotow
e11181423e fix(autolinker): Always override title attribute #2056 2016-04-26 16:49:33 -07:00
Ben Gotow
db934cf463 fix(sidebar): Fix overflow of account name 2016-04-26 15:53:51 -07:00
Ben Gotow
14acad2197 fix(attachments): Make presentError display underlying error, file optional. Sentry 27089 2016-04-26 14:03:08 -07:00
Ben Gotow
d7832576b5 fix(composer): Wait frames not msec on focus out #2033 2016-04-26 13:14:06 -07:00
Evan Morikawa
4ea8b9622c fix(win): draft popout windows always send draftJSON 2016-04-26 13:02:05 -07:00
Evan Morikawa
6a55717157 feat(package): fix build-resources-task and move submodule 2016-04-25 16:01:56 -07:00
Evan Morikawa
25dea6a136 feat(package): require 'engines': {'nylas': '*'} in package.json 2016-04-25 15:06:37 -07:00
Ben Gotow
4d38ac6310 cson(cleanup): Remove imports, only used for config.cson now 2016-04-24 20:33:34 -05:00
Jackie Luo
4f31785a16 🎨(plugins): Fix line breaks 2016-04-24 18:32:53 -07:00
Ben Gotow
ba16a71777 fix(build): CSON => JSON no longer necessary for /keymaps, /menus 2016-04-24 20:27:29 -05:00
Ben Gotow
aab39a12da mv(packages): move plugins that are incompatible with open source sync engine 2016-04-24 14:53:12 -05:00
Ben Gotow
a46bad4eb7 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
021eac7679 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
a8413c8e2f fix(win): speed up composer launching 2016-04-22 17:41:22 -07:00
Jackie Luo
fd61995b92 fix(draft-list): Revert regression for sheet selection 2016-04-22 17:30:14 -07:00
Jackie Luo
ff4cbc8d13 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
e90735ed6e 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
534eec2d93 fix(draft-list): Select proper sheet when launching in drafts perspective 2016-04-21 16:00:06 -07:00
Evan Morikawa
1f267d8bec fix(spec): fix to run in utc travis 2016-04-20 14:39:15 -07:00
Ben Gotow
38804cb816 fix(attachments): Don't show the paperclip for inline attachments < 3k (signatures, etc.) 2016-04-20 10:44:32 -07:00
Kevin Jose Martin
0ebdd2046b 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
5829e2691f perf(db): Use partial indexes added in sqlite 3.8 2016-04-19 17:42:02 -07:00
Jackie Luo
665f9c654c lint(github-card): Change duplicated variable name 2016-04-19 17:34:19 -07:00
Jackie Luo
bfa1ef0d40 feat(preferences): Add theme picker button to Appearances 2016-04-19 17:14:25 -07:00
Tim Hitchins
4c749426ad 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
c0c39e69b9 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
ca24fc31e9 rename(drafts) DraftStoreProxy => DraftEditingSession 2016-04-19 16:08:58 -07:00
Ben Gotow
585dab7cdf 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
7e3e3a6015 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
237bad59d8 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
0e2a875f4d Expose ParticipantsTextField through component kit (#1994) 2016-04-18 16:39:08 -07:00
Ben Gotow
ea22bde230 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
40ca758766 fix(default-client): Set initial state to fix React warning 2016-04-15 14:30:13 -04:00
Ben Gotow
244a28dffa fix(related-threads): Show snippet in addition to subject #1683 2016-04-14 17:33:43 -04:00
Ben Gotow
6f2329a169 fix(view-on-github): Add readme and fix bug 2016-04-14 17:03:57 -04:00
Ben Gotow
46cc73816e fix(star): Change action from Star All => Star #1927 2016-04-14 16:34:46 -04:00
Ben Gotow
a6abf801d5 💄(scheduler): Would you like => I'd like 2016-04-13 17:48:27 -07:00
Drew Regitsky
b0fbdf7469 fix(onboarding): Add missing return statement when changing endpoints 2016-04-13 17:41:31 -07:00
Drew Regitsky
d098c96653 fix(onboarding): Change error notification for endpoint changes 2016-04-13 16:13:25 -07:00
Ben Gotow
5c48464691 fix(search-bar): Apparently we were not providing keys 2016-04-13 16:08:24 -07:00
Ben Gotow
fe171a0c8c fix(require): Move more requires to new electron format 2016-04-13 15:35:01 -07:00
Ben Gotow
bdfa426ecf fix(search): Cannot remove items from search (Sentry 30318) 2016-04-13 14:22:43 -07:00
Ben Gotow
217af8d77c bump(electron): 0.36.7 => 0.37.5 2016-04-12 18:42:57 -07:00
Matt Bilker
8e5f75d8e0 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
4cabab5d2a fix(composer-emoji): Fix calculation for category positioning 2016-04-12 14:51:56 -07:00
Ben Gotow
d159e1037d fix(emoji): Improve variable names / diff feedback 2016-04-12 14:46:03 -07:00
Ben Gotow
8613921a55 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
1039ad2c34 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
7b03a80d02 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
c69b192881 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
5f75cccc0f fix(scheduler): End should work even if the mouse isn't over a time 2016-04-11 18:42:17 -07:00
Ben Gotow
938e9b8093 fix(scheduler): Make popover width even so it's not blurry 2016-04-11 18:33:53 -07:00
Ben Gotow
63343adeac fix(sync): Handle "Invalid cursor" scenario by 💣🔥 away the cache 2016-04-11 17:34:52 -07:00
Evan Morikawa
2855c3695f fix(scheduler): minor style tweaks to scheduler popover 2016-04-11 19:33:27 -04:00
Evan Morikawa
3658f0e0da 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
cec811ae36 fix(schedule): Move z-indexes to prevent dropdown layering issue 2016-04-11 14:58:58 -07:00
Ben Gotow
25349295dc fix(schedule): Use draft session to udpate metadata, always save in syncback 2016-04-11 14:32:54 -07:00
Ben Gotow
f7bfb2aceb fix(db): Counts no longer require Thread table join 2016-04-11 13:51:31 -07:00
Ben Gotow
7183918ab2 fix(auth): Fix missing var. This is why we should go ES6! 2016-04-11 10:48:16 -07:00
Ben Gotow
92268ad099 fix(initial-sync): Fix sync sidebar showing all the time 2016-04-11 00:43:06 -07:00
Juan Tejada
aef785eb12 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
286664341b fix(scheduler): use proper start and end time formats for when block 2016-04-10 11:44:24 -04:00
Evan Morikawa
68bb96e83f fix(scheduler): properly formatting when objects for post 2016-04-09 21:47:52 -04:00
Evan Morikawa
16e1331393 fix(scheduler): properly set proposals 2016-04-09 21:25:01 -04:00
Evan Morikawa
a1b5a23273 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
f316c06f7a fix(specs): * 2016-04-08 16:03:21 -07:00
Juan Tejada
b10942a4b3 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
c6e24ce948 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
2edc2e5c32 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
3d00837c4a fix(autoscale): Apply vw when width and height are not present 2016-04-07 18:02:04 -07:00
Evan Morikawa
6bc42a10dc feat(scheduler): better time picker
fix(scheduler): time picker fixed
2016-04-07 15:14:33 -07:00
Jackie Luo
199a900ac1 🎨(preferences): Change spacing and button sizes 2016-04-07 14:32:51 -07:00
Ben Gotow
08792f00bd 💄(prefs): Shrink top tabs better, add min-widths 2016-04-07 14:14:20 -07:00
Jackie Luo
fc2b178d6e 🎨(preferences): Adjust textbox styles for signatures and templates 2016-04-07 14:12:35 -07:00
Evan Morikawa
e61424b7a5 fix(tracking): uid uses draftClientId 2016-04-07 12:18:37 -07:00
Juan Tejada
c0d9915318 fix(contact-sidebar): Don't render <select> when no contacts available 2016-04-07 09:57:53 -07:00
Juan Tejada
a2a3e8af3c 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
ba0251fd7e lint(*): Fix linter errors from QA fixes 2016-04-06 16:15:46 -07:00
Ben Gotow
15eafa7c55 fix(autolinker): Additional test case from #1863 2016-04-06 14:29:28 -07:00
Ben Gotow
f98fedadc0 fix(autolinker): Add test cases, .ly, url hash chars 2016-04-06 14:17:10 -07:00
Evan Morikawa
25b896ccbb fix(scheduler): can scheduler on 30 min intervals 2016-04-06 14:09:51 -07:00
Evan Morikawa
5311ab6b34 fix(scheduler): removes proposals from metadata when removing event
Also add <tbody> tags
2016-04-06 13:59:24 -07:00
Evan Morikawa
5140cf5f07 fix(scheduler): can remove proposed times 2016-04-06 13:59:24 -07:00
Evan Morikawa
6b2d820316 fix(scheduler): fix top banner 2016-04-06 13:59:24 -07:00
Ben Gotow
2226e85e65 fix(cc/bcc): Make targets bigger, wait longer before declaring focus left 2016-04-06 13:54:39 -07:00
Jackie Luo
53fb45aec5 🎨(preferences): Update styling 2016-04-06 13:08:44 -07:00
Ben Gotow
5c2ee75026 fix(*): Minor CSS fixes, open tracking fix when only message is draft 2016-04-06 12:35:30 -07:00
Ben Gotow
5f044c22bc fix(error): Show actual API domain in connection error bar 2016-04-06 12:35:30 -07:00
Jackie Luo
2dbd1a0914 fix(composer-emoji): Fix tabs to scroll correctly 2016-04-06 12:06:27 -07:00
Evan Morikawa
7b3d773c84 fix(schedule): extracted to own SyncbackDraftEventsTask 2016-04-06 11:50:21 -07:00
Ben Gotow
1476764d00 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
9eea7f52b9 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
d047cae9ba fix(scheduler): Fix moment-timezone require 2016-04-05 15:19:53 -07:00
Evan Morikawa
695c1e64f3 fix(scheduler): import from moment-timezone 2016-04-05 14:57:51 -07:00
Juan Tejada
fc255873de fix(react): Fix several warnings in missing imports 2016-04-05 14:53:37 -07:00
Ben Gotow
afd8304359 fix(quoted-text): Correctly update container height 2016-04-05 14:27:54 -07:00
Ben Gotow
e58014a478 fix(collapsed-participants): Resize in correct scenarios 2016-04-05 14:16:24 -07:00
Jackie Luo
cef7809bd6 fix(theme-picker): Reformat invalid class names 2016-04-05 13:43:43 -07:00
Juan Tejada
eb1f9409ef 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
79e15e8408 fix(thread-search): Correct typo 2016-04-05 13:29:25 -07:00
Ben Gotow
792c0e61f1 fix(notifs): _.reject does not support dict, Sentry 26699 2016-04-05 13:10:39 -07:00
Juan Tejada
f08d59bca2 fix(warning): Add key to react component 2016-04-05 12:16:32 -07:00
Juan Tejada
b445f09854 fix(thread-search): Only rebuild index when # of accounts has changed 2016-04-05 12:16:32 -07:00
Ben Gotow
427a743b18 fix(mail-rules): all "on" handlers need to be bound functions 2016-04-05 12:01:53 -07:00
Juan Tejada
954ef4ce89 fix(prefs): Fix this binding in mail rules prefs page 2016-04-05 11:28:08 -07:00
Ben Gotow
0b4127bc4b fix(composer): Show when rendered, send draft JSON to composer windows 2016-04-04 18:30:50 -07:00
Juan Tejada
8a1aa6e9bb 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
79b365e930 fix(lint): Missing const breaking build 2016-04-04 17:12:59 -07:00
Ben Gotow
a3ede94423 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
2ea0c3b078 fix(scheduler): add timezone & fix tabbing 2016-04-04 16:06:48 -07:00
Ben Gotow
f1c0a1615d 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
7d9d7ff0f8 fix(console): remove log 2016-04-04 15:20:25 -07:00
Evan Morikawa
902526eafc fix(react): replace with ReactDOM 2016-04-04 15:17:50 -07:00
Evan Morikawa
39c37e10b9 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
3cf2570561 fix(composer-emoji): Replace images with Unicode characters properly 2016-04-04 11:03:52 -07:00
Jackie Luo
4a1c068c29 Merge pull request #1861 from jamiewilson/darkside
(darkside) correcting window buttons, adding input focus
2016-04-02 13:40:24 -07:00
Jamie Wilson
57ee77c982 correcting size of window contol buttons
This addresses issue #1687 on nylas/n1
2016-04-02 15:02:26 -05:00
Jackie Luo
056cabb7f1 🎨(preferences): Darken tab icons during click 2016-04-01 14:50:56 -07:00
Ben Gotow
e12d901e62 fix(thread-list): Constrain details width to ensure attachment icon visible. #1858 2016-04-01 14:49:15 -07:00
Jackie Luo
df7cd90c4a fix(templates): Convert to ES6 and allow creation of new templates 2016-04-01 14:30:43 -07:00
Jackie Luo
45ef25fc02 🎨(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
280e77c796 spec(composer-emoji): Fix specs for popover 2016-03-31 18:14:11 -07:00
Ben Gotow
c836310fac fix(autolinker): Update regexp to handle reported failure cases 2016-03-31 16:36:23 -07:00
Juan Tejada
74a65bb9c1 fix(build): FIx linting and react errors and popover spec 2016-03-31 16:10:09 -07:00
Ben Gotow
0211304f1a fix(inline): Use vw for max-width, use DOM rather than regex 2016-03-31 15:16:22 -07:00
Ben Gotow
d49c205dc8 fix(inline): radial progress, merge body with download data on render 2016-03-31 15:16:21 -07:00
Jackie Luo
06feced278 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
c71f4e28d2 🎨(theme-picker): Fix oval close button 2016-03-31 12:04:41 -07:00
Jackie Luo
ff08f73f31 🎨(scroll): Fix UI issues in theme picker/emoji picker 2016-03-30 15:52:51 -07:00
Ben Gotow
886328ff7a 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
83aebd99d1 fix(composer-emoji): Render emoji characters on Windows/Linux 2016-03-28 16:18:41 -07:00
Jamie Wilson
6406b8714b applying accent color to focused inputs 2016-03-28 12:49:47 -05:00
Jackie Luo
0f8725a747 🎨(themes): Tweak Taiga to feel more native 2016-03-27 15:51:27 -07:00
Jackie Luo
d8459bb2cd fix(thread-list): Show emoji in bolded subject lines 2016-03-27 15:51:27 -07:00
Juan Tejada
88c5de4f2b update(open-tracking): Only display icon when last message has metadata 2016-03-25 14:00:55 -07:00
Juan Tejada
1efa7ffaca Revert "fix(open-tracking): Make sure icon only shows in sent perspective"
This reverts commit 5c0b88d258.
2016-03-25 14:00:55 -07:00