Commit graph

1884 commits

Author SHA1 Message Date
Ben Gotow
1e5b26a818 Unified inbox mailbox perspectives working (sidebar disabled atm) 2016-01-18 00:47:04 -08:00
Juan Tejada
351a602b86 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
eb9fc4f224 WIP 2016-01-15 15:39:32 -08:00
Ben Gotow
1ac84f4013 Clean up the MultiselectList implementation a bit 2016-01-15 14:26:07 -08:00
Evan Morikawa
74e21bce16 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
Karim Hamidou
268757c259 [N1] Validate input in the signup dialog
Summary:
This diff bundles a number of small usability fixes to the "Create account" window. It notably:
- forces users to enter required fields before moving on to the next step
- validates email addresses and domain names

Test Plan: Tested manually by going through all the possible auth flows.

Reviewers: evan, juan, bengotow

Reviewed By: bengotow

Subscribers: bengotow

Projects: #edgehill

Differential Revision: https://phab.nylas.com/D2377
2016-01-15 11:27:14 -08:00
Drew Regitsky
ea934939a1 fix(mail-rules): tiny CSS fix to "+" button in mail rules 2016-01-15 11:01:59 -08:00
mbilker
560f659643 fix(N1.sh): allow additional parameters specified on command line
This prevents Electron saying it cannot find the main entrypoint, when
using the `--test -s` parameters on the command line to spec test plugins.
2016-01-15 12:14:07 -05:00
mbilker
dbb996fd79 fix(phishing): set the package name to the correct value 2016-01-14 22:43:40 -05:00
Ben Gotow
6b6f2b39d3 More renaming of view => data source 2016-01-14 15:04:17 -08:00
Ben Gotow
85e65e9135 Some basic thread list cleanup 2016-01-14 14:04:51 -08:00
Ben Gotow
273679a861 DataView => ListDataSource 2016-01-14 12:26:54 -08:00
Ben Gotow
88b901d8a5 New QueryRange specs, fixes 2016-01-14 12:03:06 -08:00
Ben Gotow
9814d80d5a New MutableQueyResultSet specs, fixes 2016-01-14 11:25:52 -08:00
Ben Gotow
cb5f2985ef Merge branch 'master' into unified-inbox
# Conflicts:
#	spec/stores/file-download-store-spec.coffee
2016-01-13 17:20:34 -08:00
Ben Gotow
c8dcab5e6a build(linux): Ensure that target files are not group writable
Should fix #710. Will move all 0775 => 0755 and 0664 => 0644
2016-01-13 16:09:53 -08:00
Juan Tejada
c5d4b10c7d Fix CategoryStore sorting:
- Also fix Category model specs
2016-01-13 14:20:44 -08:00
Drew Regitsky
4f5aea03dd fix(templates): rewritten "welcome" file / example template 2016-01-13 12:08:41 -08:00
Ben Gotow
5bdb097bb8 fix(newsletter): Checkbox refreshes properly when switching accounts 2016-01-13 11:45:48 -08:00
Ben Gotow
5bae17600e Merge pull request #998 from nylas/set_s3_content_type
set the ContentType when uploading packages to S3.
2016-01-13 11:39:35 -08:00
Karim Hamidou
59964b04c8 set the ContentType when uploading packages to S3. 2016-01-13 11:12:39 -08:00
mbilker
bdf545a519 fix(nylas-api): allow custom Sync Engine specified in config.cson 2016-01-13 10:46:54 -05:00
Ben Gotow
b95f1f7cb4 bump(version): 0.3.43 and changelog 2016-01-12 19:19:16 -08:00
Ben Gotow
c64f9440d2 fix(specs): Spec fixes for 37e1f6bb 2016-01-12 19:11:47 -08:00
Ben Gotow
e49a761044 fix(contenteditable): exportedSelection isn't always an inst of ExportedSelection
This is a temporary fix that makes this function more robust to @innerState.exportedSelection not being an ExportedSelection instance.
2016-01-12 19:09:57 -08:00
Ben Gotow
37e1f6bb0b fix(spellcheck): Unwrap nodes with simpler code with less side effects 2016-01-12 19:03:04 -08:00
Juan Tejada
890db385f9 fix(warnings): Don't issue a warning for attachments when word attach in
signature

- Fixes #912
2016-01-12 18:45:27 -08:00
Ben Gotow
b44ab5670b fix(unread): Mark as read twice without visiting another unread thread 2016-01-12 17:14:17 -08:00
Ben Gotow
e87766ebd5 bump(version): 0.3.42 (testing Windows autorestart) 2016-01-12 15:58:37 -08:00
Ben Gotow
7c371d88f7 bump(version): 0.3.41 2016-01-12 15:46:00 -08:00
Evan Morikawa
8c5b7b919d fix(squirrel): remove apm from path 2016-01-12 18:36:44 -05:00
Evan Morikawa
b8c1280383 fix(lint): fix linter issues in template store 2016-01-12 18:33:01 -05:00
Evan Morikawa
60eb7afa12 fix(squirrel): fix win32 update to enable restart and launch from path 2016-01-12 18:17:30 -05:00
Ben Gotow
760c8769b3 fix(accounts): Spec fixes for a03e8f70 2016-01-12 15:16:59 -08:00
Juan Tejada
48ea9e6198 fix(fullscreen): Restore fullscreen if app was closed in fullscreen
Fixes #671
2016-01-12 15:12:43 -08:00
Ben Gotow
a03e8f704b fix(accounts): Load accounts before adding a new one 2016-01-12 15:08:56 -08:00
Ben Gotow
7bbcbbe29a fix(sp): illegial => illegal 🙏 2016-01-12 14:39:16 -08:00
Ben Gotow
329c647181 fix(paste): Keep <div> tags so pate between N1 emails works 2016-01-12 14:31:34 -08:00
Drew Regitsky
b035b0ba73 fix(templates): insert template no longer overwrites signature 2016-01-12 14:09:37 -08:00
Ben Gotow
54f464d999 fix(drag): Drag and drop files with illegial path characters 2016-01-12 13:52:01 -08:00
Ben Gotow
619c753cf3 fix(downloads): Escape all illegial path chars, don't make regex from path.sep 2016-01-12 13:52:01 -08:00
Ben Gotow
806edd7215 fix(packages): Default icon for third-party packages 2016-01-12 13:52:01 -08:00
Ben Gotow
b4690783ac fix(composer): whilePreservingSelection should not call select if not activeElement 2016-01-12 13:52:01 -08:00
Ben Gotow
9558d21efa fix(selection): ExportedSelection must properly represent "None" 2016-01-12 13:52:01 -08:00
Juan Tejada
46889203a6 fix(styles): Add bottom margin to templates plugin message 2016-01-12 13:46:50 -08:00
Drew Regitsky
f679f7c214 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
Juan Tejada
1c12fe3d6a fix(composer): Fix focus behavior when signature present and when
clicking outside:

- When focusing the composer via click inside the contenteditable region or via
tabbing, last text node before the signature (or blockquotes) will be focused.
- When focusing composer by clicking outside contenteditable region, it
  will default to default contenteditable focus behavior via new method:
  `nativeFocus`
2016-01-12 12:36:19 -08:00
Ben Gotow
b14b7086ab fix(indicators): Remove duplicate description key 2016-01-12 10:28:34 -08:00
Ben Gotow
c1f98f2fb3 fix(readme): Remove link to plugins repo 2016-01-12 10:18:41 -08:00
Juan Tejada
fe625d8f6d Update names to use perspective instead of view 2016-01-12 09:49:56 -08:00