Commit graph

391 commits

Author SHA1 Message Date
Ben Gotow 26d4361bfb bump(electron): Fix remaining deprecated requires, move to 1.0.1 2016-05-12 13:59:23 -07:00
Ben Gotow 304d3d7138 fix(spam): Better icons for spam / not spam #2107 2016-05-09 17:28:52 -07:00
Ben Gotow da07fe21ab feat(not-spam): Unmark items as junk / spam #2112 2016-05-09 17:28:52 -07:00
Robert Stanfield be48fc4305 The horizontal scrollbar was not showing up when viewing an email (#2028) 2016-05-06 16:44:30 -07:00
Evan Morikawa a16c37f6e7 feat(babel6): Replace stage-0 with electron 2016-05-06 11:55:23 -07:00
Evan Morikawa c483b7a41d feat(babel6): Switch to using local babel-preset-electron 2016-05-06 11:55:22 -07:00
Evan Morikawa 427a23bbe6 feat(babel6): Add babel presets and lint for require.default 2016-05-06 11:54:52 -07:00
Juan Tejada 81fd29c11f perf(mail-merge): Add lazy rendering to table
Summary: Add new LazyRenderedList component and updates Table to use it

Test Plan: TODO

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2936
2016-04-29 13:10:15 -07:00
Ben Gotow cd75db9195 fix(activity-list): Add empty state, cap number of items 2016-04-28 14:20:44 -07:00
Evan Morikawa b226dfb5b1 perf(composer): tweak tooltip animation timing & composer loading 2016-04-28 13:42:30 -07:00
Ben Gotow b396618710 fix(win32): Sharper hamburger, better win32 menu 2016-04-28 12:40:14 -07:00
Evan Morikawa f45c497810 fix(sidebar): fix account name styles 2016-04-28 11:45:44 -07:00
Ben Gotow be5b6bd77b fix(build): resolve lesslint issue 2016-04-27 19:20:59 -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 e4a0c94482 fix(sidebar): Fix overflow of account name 2016-04-26 15:53:51 -07: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
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
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
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
Ben Gotow f85f447141 fix(require): Move more requires to new electron format 2016-04-13 15:35:01 -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
Ben Gotow fc7ae4b415 fix(emoji): Don't allow emoji images to be dragged into attachments 2016-04-12 14:37:14 -07:00
Ben Gotow be3b795811 shrink(emoji): TinyPNG emoji, convert to 32x32 2016-04-12 11:34:45 -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
Ben Gotow 7e07c199c4 fix(empty): Add padding to empty message 2016-04-11 18:20:28 -07:00
Ben Gotow 586d099c23 fix(schedule): Move z-indexes to prevent dropdown layering issue 2016-04-11 14:58:58 -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
Evan Morikawa 6a70584ffa feat(scheduler): better time picker
fix(scheduler): time picker fixed
2016-04-07 15:14:33 -07:00
Evan Morikawa 3fa0ce249f fix(scheduler): fix time bar scroll height 2016-04-06 13:59:24 -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
Ben Gotow 34201ff644 fix(collapsed-participants): Resize in correct scenarios 2016-04-05 14:16:24 -07:00
Ben Gotow 52e5133da2 fix(from): Align from icon correctly 2016-04-05 12:09:40 -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 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 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
Juan Tejada c340338d4d feat(popover): Add popout animation to popover
Summary:
- Adds popout animation to popover
- Fade out animation is pending

Test Plan: - Manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2807
2016-03-31 13:23:12 -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
Juan Tejada 6a151b4f14 fix(animations): Rename animations to use always lower case
- Fixes issue were folder got commited with wrong name because of git
  ignore case config
- #1829
2016-03-28 10:49:13 -07:00
Juan Tejada 4356deadf0 fix(empty-states): Adjust margins for message correctly 2016-03-25 17:49:33 -07:00
Juan Tejada 9298c9a129 fix(empty-state): Remove z-index to allow undo toast to work 2016-03-25 12:30:08 -07:00
Juan Tejada 9e9928861c fix(empty-state): Update animation assets 2016-03-25 12:21:41 -07:00
Juan Tejada a43a73c35d fix(empty-state): Limit scaling factor for animation
- Fix display: none in css
2016-03-25 10:56:49 -07:00
Juan Tejada 843751ea94 fix(styles): Remove unused style in empty-state.less 2016-03-25 10:48:32 -07:00
Juan Tejada 30055abf34 feat(inbox-zero): Adds inbox zero animations and empty states
Summary: Adds inbox zero animations and empty states

Test Plan: Manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2801
2016-03-25 09:56:02 -07:00
Jackie Luo 2fedf7f091 fix(themes): Re-add disclosure triangles to Taiga 2016-03-24 16:19:41 -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
Juan Tejada 176e3d05c3 fix(popover): Reduce animation length to 100ms 2016-03-23 17:43:43 -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
Ben Gotow 5dcb3a1bce fix(template): Rewrite in ES6, add missing windowTypes 2016-03-21 18:25:50 -07:00