Commit graph

2276 commits

Author SHA1 Message Date
Evan Morikawa
ecea0feb5f fix(console): rm console trace 2016-01-20 21:09:50 -08:00
Evan Morikawa
acb0eb77cf bump(version): 0.3.46 2016-01-20 21:00:01 -08:00
Evan Morikawa
3195ba5d51 fix(link): fix link focus and UX issues
Fix FloatingToolbar position

Fix link-editor to refresh on new props

Fix link content changed

Fix link width
2016-01-20 20:56:56 -08:00
Juan Tejada
0fce8a059f Decrease OutlineView children indentation 2016-01-20 19:30:12 -08:00
Juan Tejada
e8583abb01 Update default collapsed value for sidebar items in unified inbox view 2016-01-20 19:22:33 -08:00
Ben Gotow
36012f84f2 bump(version): 0.3.45 2016-01-20 18:55:51 -08:00
Juan Tejada
99f997d953 Fix styles for outline view heading 2016-01-20 17:47:59 -08:00
Ben Gotow
a3b1f77d45 Disable SELECT DISTINCT unless we know we need it 2016-01-20 17:40:18 -08:00
Ben Gotow
ffb5e0dfda Optimize offsetOfId, shouldn't throw if models contains undefined 2016-01-20 17:27:06 -08:00
Ben Gotow
8b8a505b20 fix(onboarding): Minor style changes, headers for EAS 2016-01-20 17:09:15 -08:00
Ben Gotow
ba606fff21 fix(newsletter): Don't make API request if email is the same 2016-01-20 17:09:15 -08:00
Ben Gotow
2ce24bd4af fix(onboarding): Loosen RegExp so a.com and a.b.c.d.com are valid 2016-01-20 17:09:15 -08:00
Juan Tejada
6c559ddb7e Add collapse capabilities to OutlineView
- Make user category sections collapsible when in unified view
- Get rid of dumb CategoryHelpers class
2016-01-20 17:09:05 -08:00
Drew Regitsky
2d51f92f17 feat(plugin-auth): add plugin auth function in NylasAPI
Summary:
Adds two new functions in NylasAPI to allow auth and unauth of
plugin backends. The `authPlugin` function should be called within
plugins before taking any action that requires offline account access
from the plugin's backend server. The `unauthPlugin` function will be
used by N1 internally to revoke offline account access for plugins.

Test Plan: manual for now

Reviewers: bengotow, evan, juan

Reviewed By: evan, juan

Differential Revision: https://phab.nylas.com/D2440
2016-01-20 16:43:11 -08:00
Evan Morikawa
c7a685630d refactor(toolbar): allow toolbar extensions in contenteditable
Summary:
This is a refactor of the toolbar in the contenteditable. Goals of this
are:

1. Allow developers to add new buttons to the toolbar
2. Allow developers to add other component types to the floating toolbar (like the LinkEditor)
3. Make the toolbar declaratively defined instead of imperatively set
4. Separate out logical units of the toolbar into individual sections
5. Clean up `innerState` of the Contenteditable

The Floating Toolbar used to be an imperative mess. Doing simple
functionality additions required re-understanding a very complex set of
logic to hide and show the toolbar and delecately manage focus states.
There also was no real capacity for any developer to extend the toolbar.

It also used to be completely outside of our `atomicEdit` system and was a
legacy of having raw access to contenteditable controls (since it all used
to be directly inside of the contenteditable)

Finally it was difficult to declaratively define things because the
`innerState` of the Contenteditable was inconsistently used and its
lifecycle not properly thought through. This fixed several lifecycle bugs
with that.

Along the way several of the DOMUtils methods were also subtly not
functional and fixed.

The Toolbar is now broken apart into separate logical units.

There are now `ContentedtiableExtension`s that declare what should be
displayed in the toolbar at any given moment.

They define a method called `toolbarComponentData`. This is a pure
function of the state of the `Contenteditable`. If selection and content
conditions look correct, then that method will return a component to
render. This is how we declaratively define whether a toolbar should be
visible or not instead of manually setting `hide` & `show` bits.

There is also a `toolbarButtons` method that declaratively defines buttons
that can go in the new `<ToolbarButtons>` component.

The `ToolbarButtonManager` takes care of extracting these and binding the
correct editorAPI context.

Now the `<LinkEditor>` is a separate component from the `<ToolbarButtons>`
instead of being smashed together.

The `LinkManager` takes care of declaring when the `LinkEditor` should be
displayed and has properly bound methods to update the `contenteditable`
through the standard `atomicEdit` interface.

If users have additional contenteditable popup plugins (like displaying
extra info on a name or some content in the composer), they can now
implement the `toolbarComponentData` api and declaratively define that
information based on the state of the contenteditable.

Test Plan: TODO

Reviewers: bengotow, juan

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2442
2016-01-20 14:35:20 -08:00
Juan Tejada
5dd334bffc Fix Category require 2016-01-20 13:14:34 -08:00
Ben Gotow
1d55f1ac11 Change the sidebar to use Flexbox for container 2016-01-20 13:04:06 -08:00
Ben Gotow
5263c23b02 fix(readme): Broken link to Message View on Github 2016-01-20 12:22:47 -08:00
Ben Gotow
353be64e10 rm(tooltip): Tooltip package no longer in use 2016-01-20 11:30:57 -08:00
Ben Gotow
45403131f1 rm(intercom): Point feedback to support.nylas, shrink button 2016-01-20 11:26:14 -08:00
Ben Gotow
29f4c9d279 bump(version): 0.3.44 beta 2016-01-20 10:56:00 -08:00
Ben Gotow
3c40b3496c fix(auth): Increase timeout to 60s for Exchange auth 2016-01-20 10:49:27 -08:00
Drew Regitsky
9641ac0e6e fix(templates): fix when the "no templates" message is displayed 2016-01-20 10:24:45 -08:00
Juan Tejada
b538ec050c Add account switcher back to sidebar:
- Account switcher can now switch between all accounts and each account
- Updates FocusedPerspectiveStore and Actions.focusDefaultMailboxPerspectiveForAccounts
  to focus a perspective for accountIds instead of for a single account,
  and updates methods
  - Adds helpers to CategoryStore and MailboxPerspective
  - Updates key commands to allow switch to unified inbox
2016-01-19 23:42:50 -08:00
Jackie Luo
143ec77bf7 Merge branch 'master' of github.com:nylas/N1 2016-01-19 16:56:25 -08:00
Jackie Luo
d718c05e02 fix(message): Message time no longer selectable
Summary: Closes #910.

Test Plan: Manual. Tested locally.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2453
2016-01-19 16:55:52 -08:00
Ben Gotow
5c26340965 Merge pull request #966 from cllns/standardize-am-and-pm-capitalization
Standardize capitalization to am/pm, for message-list
2016-01-19 16:45:02 -08:00
Ben Gotow
1ab190c38c Merge pull request #1041 from mbilker/script-fix
Allow additional parameters specified on command line
2016-01-19 16:42:31 -08:00
Jackie Luo
1f0751c026 fix(message): Message time no longer selectable
Summary: Closes #910.

Test Plan: Manual. Tested locally.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2453
2016-01-19 16:32:03 -08:00
Sean Collins
1f0ebfca78 Standardize message-list capitalization to AM/PM, 2016-01-19 15:54:44 -07:00
Ben Gotow
cf39491240 Merge pull request #1029 from mbilker/phishing-detection
Set Phishing Detection package name to the correct value
2016-01-19 13:51:57 -08:00
Juan Tejada
38590139bc Fix collapsing behavior for non perspective sidebar items
- Assign unique id for sheet and draft sidebar items
2016-01-19 10:51:52 -08:00
Michael Grinich
1a627da98e Update README.md 2016-01-19 01:34:22 -08:00
Ben Gotow
f73a732666 Don't wait for all requests to succeed before displaying results 2016-01-19 00:00:08 -08:00
Ben Gotow
50e03946dd Show the important icon whenever any account in the perspective supports it 2016-01-19 00:00:08 -08:00
Juan Tejada
866805f835 More account sidebar refactor + sections for unified inbox
- Refactors some of the old code which was 💩
  - Makes SidbarSection a factory for different types of items for the
    OutlineView
  - Decided not to create a OutlineViewItem.Model class since the only
    purpose it would serve would be to validate getters for props or for
    documentation, both of which are already done via React.PropTypes.
- Adds sections when looking at unified inbox and integrates with new
  mailbox perspecitve interface
- Updates OutlineViewItem a bit + styles
- Tests missing
2016-01-18 23:22:46 -08:00
Ben Gotow
864f808823 Update SearchSubscription to support basic multiaccount search... seems to work? 2016-01-18 22:37:49 -08:00
Michael Grinich
480fda88ac Update README.md 2016-01-18 19:28:23 -08:00
Juan Tejada
81bd78fb09 Fix merge errors 2016-01-18 11:56:52 -08:00
Juan Tejada
e1084708b8 Minor fixes and style updates 2016-01-18 11:48:34 -08:00
Michael Grinich
32d400b18a Update README.md 2016-01-18 10:32:43 -08:00
Ben Gotow
ec7aa08f10 Fix for broken thread serialization. We now coerce folders/labels => categories and never go back. 2016-01-18 01:47:09 -08:00
Ben Gotow
00ff8269da Make a few changes to AccountSidebar - needs to use accountIds? 2016-01-18 01:31:54 -08:00
Ben Gotow
99854add72 Remove current()? references, use Perspectiv.forNothing instead 2016-01-18 01:31:35 -08:00
Ben Gotow
f1b4a23897 Merge branch 'unified-inbox-bg' into unified-inbox
# Conflicts:
#	internal_packages/account-sidebar/lib/account-sidebar-store.coffee
#	internal_packages/account-sidebar/lib/main.coffee
#	internal_packages/category-picker/lib/category-picker.cjsx
#	spec/stores/focused-perspective-store-spec.coffee
#	src/flux/stores/focused-perspective-store.coffee
#	src/mailbox-perspective.coffee
2016-01-18 00:53:03 -08:00
Ben Gotow
96f429ff39 Unified inbox mailbox perspectives working (sidebar disabled atm) 2016-01-18 00:47:04 -08:00
Juan Tejada
ebb9c9735f AccountSidebar package refactor:
- Creates OutlineView generic component and uses that instead of custom
  code
- Refactors AccountSidebarStore:
  - Split the generation of the state tree into smaller functions
  - Adds different types of account sidebar items and sections, which contain
    logic and props necessary to be rendered as OutlineViewItems, and
    removes that logic from the store
- Removes WorkspaceStore.SidebarItem and removes the ability to register
  new sidebar items. If people want to add something to the sidebar they
  can just register a Component via the component registry and use the
  OutlineView component
- Removes the DraftListSidebarItem, which was basically duplicated code
  for an item but with a different data source. This is now handled
  generically by the account sidebar by rendering OutlineViewItems with
  different props and handlers
- Clean ups here and there:

- TODO
  - Add AccountSwitcher
  - Revisit calculation and generation of the state tree. Should the
    parent store contain and update the entire state all the time.
    Should separate items inside the tree have their own data sources?
  - This would avoid having the AccountSidebarStore listen to a bunch of
    different other stores, and the specific logic wold be contained
    inside each item type.
2016-01-15 16:55:21 -08:00
Ben Gotow
31f808ef35 WIP 2016-01-15 15:39:32 -08:00
Ben Gotow
774562dbc1 Clean up the MultiselectList implementation a bit 2016-01-15 14:26:07 -08:00
Evan Morikawa
6695de4187 feat(tasks): add Create, Update, Destroy tasks plus spec & lint fixes
Summary:
1. **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.

1. **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.

1. **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.

1. **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: bengotow, juan, drew

Differential Revision: https://phab.nylas.com/D2419

Remove cloudState and N1-Send-Later
2016-01-15 15:16:21 -05:00