Commit graph

28 commits

Author SHA1 Message Date
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
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 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 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
Drew Regitsky 6efaf6220a fix(templates): fix a null check bug in template contentedtable ext 2016-03-10 19:06:15 -08: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
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 21b1cd4e19 fix(build): Don't delete plugin package.json files, restore ellipsis (@sdw consulted HIG!) 2016-02-24 18:15:55 -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
Ben Gotow 5e78a9b2c6 💄(plugins): Updated assets and a bit of error handling 2016-02-23 17:51:10 -08:00
Evan Morikawa 481dc28585 feat(composer): new composer footer and icon design 2016-02-23 13:42:10 -08:00
Ben Gotow 34da43c42a 💄(icon): A delightful seafoam green icon 2016-02-23 10:35:08 -08:00
Ben Gotow 298eb06548 💄: White buttons, dropdown / popover cleanup, hairline dividers 2016-02-18 15:21:42 -08:00
Evan Morikawa 5561462568 feat(metadata): add cloudState that sync with Metadata service
Summary:
Now all plugins get passed a `cloudState` object to their `activate`
method.

The `cloudState` object is an instance of `CloudState` and acts like a
key-value store backed by the yet-to-be-implemented Metadata service.

It has a `get`, `getAll`, and `observe` method. The `observe` method
returns a new `Rx.Observable` for the given key.

It has a `set`, and `unset` method that doesn't actually mutate state, but
rather dispatches new `Task`s to Create, Update, and Delete `Metadata`
objects.

The whole object is backed by `Metadata` objects. Since these are standard
Database Objects that will appear on the delta sync streaming API, any
updates from the server will automatically propagate down to listening
views via the `Rx.Observable`s.

Additionally, there is a new `N1-Send-Later` stub plugin that demonstrates
how to use the `cloudState`.

There are few other minor refactors included in this diff:

**Generic CUD Tasks**: There is now a generic `CreateModelTask`,
`UpdateModelTask`, and `DestroyModelTask`. These can either be used as-is
or trivially overridden to easily update simple objects. Hopefully all of
the boilerplate rollback, error handling, and undo logic won't have to be
re-duplicated on every task. There are also tests for these tasks. We use
them to perform mutating actions on `Metadata` objects.

**New `boundProps` for `InjectedComponents`**: When making the
`N1-Send_later` plugin, I realized that the injected component needed to
get the `cloudState` somehow. Traditionally components would require
Stores and load data that way, but these are setup at `require`-time. Now
that `cloudState` only is available on `activate` we needed a way to get
the data to the components. There's now the concept of `boundProps` which
will be props added to the Component when it gets injected. This required
changing the return signature of `findComponentMatching`, which got
renamed to `findComponentDataMatching`.

**Failing on Promise Rejects**: Turns out that if a Promise rejected
due to an error or `Promise.reject` we were ignoring it and letting tests
pass. Now, tests will Fail if any unhandled promise rejects. This
uncovered a variety of errors throughout the test suite that had to be
fixed. The most significant one was during the `theme-manager` tests when
all packages (and their stores with async DB requests) was loaded. Long
after the `theme-manager` specs finished, those DB requests were
(somtimes) silently failing.

**Globally stub `DatabaseStore._query`**: All tests shouldn't actually
make queries on the database. Furthremore, the `inTransaction` block
doesn't resolve at all unless `_query` is stubbed. Instead of manually
remembering to do this in every test that touches the DB, it's now mocked
in `spec_helper`. This broke a handful of tests that needed to be manually
fixed.

**ESLint Fixes**: Some minor fixes to the linter config to prevent
yelling about minor ES6 things and ensuring we have the correct parser.

Test Plan: new tests

Reviewers: drew, bengotow, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2419
2016-02-02 15:28:06 -05:00
Juan Tejada 7a8e10af0d fix(lint): Fix new eslint rule introduced with babel-eslint upgrade.
See https://phabricator.babeljs.io/T6925
2016-02-01 20:07:36 -08:00
Drew Regitsky e1631db435 fix(templates): small CSS fix in preferences page 2016-01-28 14:51:31 -08:00
Drew Regitsky 9641ac0e6e fix(templates): fix when the "no templates" message is displayed 2016-01-20 10:24:45 -08:00
Drew Regitsky f469fd29d8 fix(templates): rewritten "welcome" file / example template 2016-01-13 12:08:41 -08:00
Evan Morikawa ef8759dd62 fix(lint): fix linter issues in template store 2016-01-12 18:33:01 -05:00
Drew Regitsky 6cc0e6ca0d fix(templates): insert template no longer overwrites signature 2016-01-12 14:09:37 -08:00
Juan Tejada 646785e182 fix(styles): Add bottom margin to templates plugin message 2016-01-12 13:46:50 -08:00
Drew Regitsky c91a0c6062 fix(templates): fix several bugs in templates plugin
Fixes behavior when there are no template files, prevents renaming/creating
with an empty name, fixes yet another way to accidentally make yellow text,
misc small style fixes
2016-01-12 12:44:38 -08:00
Drew Regitsky f212752c1c fix(templates): fix two bugs breaking templates plugin rename and search 2016-01-11 15:28:31 -08:00
Ben Gotow 3b6fdd3a53 fix(specs): Minor change to templates package for Travis 2016-01-08 10:52:37 -08:00
Ben Gotow 506ada3a59 fix(lint): Fix linter issues in template package 2016-01-08 10:47:41 -08:00
Drew Regitsky 2a5c1383f8 fix(templates): disable outdated tests in templates plugin for now
TODO: update and rewrite tests for templates plugin
2016-01-07 21:13:07 -08:00
Ben Gotow ed50039b00 rename(templates): Use "Quick Replies" name in plugins screen 2016-01-07 15:23:54 -08:00
Ben Gotow 460a715e4d fix(examples): examples => packages, move away from installing them 2016-01-07 14:56:34 -08:00