Commit graph

249 commits

Author SHA1 Message Date
Evan Morikawa
34373e6de3 fix(build): rename babel task to .js to be picked up by grunt 2016-05-06 16:46:36 -07:00
Evan Morikawa
1498bcfac6 fix(lint): final linter fixes
fix(lint): final set of linter fixes
2016-05-06 16:32:34 -07:00
Ben Gotow
42ef0e98a4 fix(lint): Various linter issues 2016-05-06 16:06:16 -07:00
Evan Morikawa
4fed2b452e fix(lint): various linter fixes 2016-05-06 14:11:05 -07:00
Ben Gotow
d961b1e4d4 fix(lint): Correct more linter errors 2016-05-06 14:10:28 -07:00
Evan Morikawa
bb861d494f fix(lint): fixing various linter errors.
746 left
2016-05-06 13:42:09 -07:00
Evan Morikawa
805221dfa3 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
69574e58b4 feat(babel6): remove eslinter fixer task 2016-05-06 12:20:16 -07:00
Evan Morikawa
9c28088797 feat(babel6): 1,043 linter errors 2016-05-06 11:55:57 -07:00
Evan Morikawa
cda4129a41 feat(babel6): 1,240 linter errors 2016-05-06 11:55:55 -07:00
Evan Morikawa
6259332a11 feat(babel6): 1,393 linter errors 2016-05-06 11:55:53 -07:00
Evan Morikawa
c516f6f4af feat(babel6): 1,608 linter errors 2016-05-06 11:55:52 -07:00
Evan Morikawa
13e542928d feat(babel6): Add task to fix function spacing 2016-05-06 11:55:45 -07:00
Evan Morikawa
14b70b1e9d feat(babel6): 2,398 linter errors 2016-05-06 11:55:43 -07:00
Evan Morikawa
5eab36756e feat(babel6): 88,888 lint errors 2016-05-06 11:55:40 -07:00
Evan Morikawa
ed3f062a6a feat(babel6): 90,798 lint problems
Fix eslint-task. Grunt doesn't recognize es6 files
2016-05-06 11:55:38 -07:00
Evan Morikawa
e559c8f69a feat(babel6): Add test for spec describe 2016-05-06 11:55:18 -07:00
Evan Morikawa
47c064617d feat(babel6): Fix destructuring default from exports and update linter 2016-05-06 11:55:14 -07:00
Evan Morikawa
d2ba35a749 feat(babel6): Use absolute paths for linter and dont call default on coffee 2016-05-06 11:54:58 -07:00
Evan Morikawa
ff7f909317 feat(babel6): Detect when packages don't have a default export 2016-05-06 11:54:57 -07:00
Evan Morikawa
7f50074c0d feat(babel6): Convert to use new es6 require syntax 2016-05-06 11:54:55 -07:00
Evan Morikawa
427a23bbe6 feat(babel6): Add babel presets and lint for require.default 2016-05-06 11:54:52 -07:00
Evan Morikawa
e2f9104766 feat(babel6): Initial babel conversion 2016-05-06 11:54:38 -07:00
Ben Gotow
a7f65217bf bump(asar): Re-create ordering hint 2016-05-03 16:25:52 -07:00
Ben Gotow
581787e50c fix(send-later): Simplify logic, use changes.addPluginMetadata 2016-05-03 14:01:06 -07:00
Ben Gotow
05be74ec04 fix(read-receipts): Remove tracking pixels when composing drafts 2016-04-28 17:08:54 -07:00
Akshar Patel
2088e27199 Show under Internet Category in Linux (#2083)
* Update title for system tray

Using only Menu Bar confuses Linux users because ''Menu Bar'' word is only used withing Mac OS. So, also use "System Tray" word.

* Show under Internet Category in Linux

Right now, N1 is showing under Programming Category. "Network" should be added to show under Internet Category.
2016-04-28 10:28:41 -07:00
Ben Gotow
7c557c0c8f cleanup(specs): Remove space-pen. Goodbye, jQuery! 2016-04-26 13:14:07 -07:00
Ben Gotow
1b62e09f71 cleanup(config): Remove unused features, dependencies 2016-04-26 13:14:06 -07:00
Evan Morikawa
cc124be849 fix(build): fix lstatSync throwing 2016-04-25 16:18:23 -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
Ben Gotow
16dd26c29e fix(build): CSON => JSON no longer necessary for /keymaps, /menus 2016-04-24 20:27:29 -05:00
Ben Gotow
9dd9cd81a3 fix(build): Run eslint on files inside submodule 2016-04-24 19:32:37 -05:00
Ben Gotow
e63ea0f163 fix(*): spec failures related to moment-round again 2016-04-24 15:21: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
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
Ben Gotow
9a35a3e336 bump(resources): Updates to submodule 2016-04-22 10:53:11 -07:00
Ben Gotow
33225f56b0 rename(drafts) DraftStoreProxy => DraftEditingSession 2016-04-19 16:08:58 -07:00
Ben Gotow
d1211ab7de bump(electron): 0.36.7 => 0.37.5 2016-04-12 18:42:57 -07:00
Ben Gotow
394d85cecf fix(drafts): Use the appropriate account and alias 2016-03-24 19:35:24 -07:00
Ben Gotow
380d0a9e76 fix(mixpanel): Consolidate reply / replyAll actions 2016-03-23 16:02:30 -07:00
Ben Gotow
a791ae76e0 fix(tray): Use total count, not unread count, for tray icon 2016-03-21 17:36:18 -07:00
Ben Gotow
d58a1aeaf3 feat(dock-icon): Drop files to attach them to new msg
Summary:
Fix specs

Fix responding to mailto, files at launch

It's super important that `window:loaded` is /not/ sent from index.js because `loadSettings.bootstrapScript` is async and nothing is actually loaded yet. This was causing the app to dispatch the mailto:// links into the main window before a DraftStore existed.

I think this was necessary at one point because we had NylasWindows not using a bootstrapScript? Should not be here anymore...

Test Plan: Run a few new tests

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2737
2016-03-17 13:14:55 -07:00
Ben Gotow
38b8d03cf2 fix(icon): update assets to fix #1747 2016-03-15 12:46:03 -07:00
Ben Gotow
8e9d7ff73e fix(signatures): Adds default signature, convert to ES6 2016-03-14 17:05:49 -07: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