Commit graph

1574 commits

Author SHA1 Message Date
mbilker 116fbf0fa2 fix(appveyor): check if running in PR, disable commands requiring secure variables if so 2015-12-21 11:11:29 -05:00
Juan Tejada faf86631aa update(tray): Show 'Open Inbox' tray menu option and option to disable
tray  on Mac and Linux

- Resolves #673
- Resolves #762
- Resolves #594
2015-12-20 21:32:59 -08:00
Juan cd97c0c138 Merge pull request #726 from daveperdue/patch-1
Fix broken icon from issue #465 and Fix icon path for install
2015-12-20 13:45:45 -08:00
Juan Tejada 101831b71e fix(feedback-window): Close correctly when in fullscreen mode
- Now shows main window when feedback window is closed/hidden
- Fixes #615
2015-12-20 13:11:58 -08:00
Juan Tejada 2503263e93 fix(feedback-window): Remove handler that prevented window from closing
- Fixes #773
- window.onbeforeunload inside feedback window was returning false and
preventing the window from being closed.
2015-12-20 01:50:44 -08:00
Juan Tejada d5e9397879 fix(typo): Fix typo in floating toolbar container 2015-12-18 14:10:53 -08:00
Juan Tejada 96da7ccb2d feat(editor-region): Add support to register components as editors
Summary:
- The main purpose of this is to be able to properly register the editor for the markdown plugin (and any other plugins to come)

- Refactors ComposerView and Contenteditable ->
  - Replaces Contenteditable with an InjectedComponent for a new region role:
    "Composer:Editor"
  - Creates a new component called ComposerEditor, which is the one that is
    being registered by default as "Composer:Editor"
  - I used this class to try to standardize the props that should be
    passed to any would be editor Component:
    - Renamed a bunch of the props which (I think) had a bit of
      confusing names
    - Added a bunch of docs for these in the source file, although
      I feel like those docs should live elsewhere, like in the
      ComponentRegion docs.
  - In the process, I ended up pulling some stuff out of ComposerView and
    some stuff out of the Contenteditable, namely:
    - The scrolling logic to ensure that the composer is visible while
      typing was moved outside of the Contenteditable -- this feels more
      like the ComposerEditor's responsibility, especially since the
      Contenteditable is meant to be used in other contexts as well.
    - The ComposerExtensions state; it feels less awkward for me if this
      is inside the ComposerEditor because 1) ComposerView does less
      things, 2) these are actually just being passed to the
      Contenteditable, 3) I feel like other plugins shouldn't need to
      mess around with ComposerExtensions, so we shouldn't pass them to the
      editor. If you register an editor different from our default one,
      any other ComposerExtension callbacks will be disabled, which
      I feel is expected behavior.
  - I think there is still some more refactoring to be done, and I left some TODOS
    here and there, but I think this diff is already big enough and its a minimal
    set of changes to get the markdown editor working in a not so duck
    tapish way.
- New props for InjectedComponent:
  - `requiredMethods`: allows you to define a collection of methods that
    should be implemented by any Component that registers for your
    desired region.
    - It will throw an error if these are not implemented
    - It will automatically pass calls made on the InjectedComponent to these methods
      down to the instance of the actual registered component
    - Would love some comments on this approach and impl
  - `fallback`: allows you to define a default component to use if none were
    registered through the ComponentRegistry
- Misc:
  - Added a new test case for the QuotedHTMLTransformer
- Tests:
  - They were minimally updated so that they don't break, but a big TODO
    is to properly refactor them. I plan to do that in an upcoming
    diff.

Test Plan: - Unit tests

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2372
2015-12-18 11:06:44 -08:00
Ben Gotow ea76b7c442 feat(transactions): Explicit (and faster) database transactions
Summary:
Until now, we've been hiding transactions beneath the surface. When you call persistModel, you're implicitly creating a transaction.
You could explicitly create them with `atomically`..., but there were several critical problems that are fixed in this diff:

- Calling persistModel / unpersistModel within a transaction could cause the DatabaseStore to trigger. This could result in other parts of the app making queries /during/
  the transaction, potentially before the COMMIT occurred and saved the changes. The new, explicit inTransaction syntax holds all changes until after COMMIT and then triggers.

- Calling atomically and then calling persistModel inside that resulted in us having to check whether a transaction was present and was gross.

- Many parts of the code ran extensive logic inside a promise chained within `atomically`:

  BAD:

```
  DatabaseStore.atomically =>
   DatabaseStore.persistModel(draft) =>
     GoMakeANetworkRequestThatReturnsAPromise
```

OVERWHELMINGLY BETTER:

```
  DatabaseStore.inTransaction (t) =>
     t.persistModel(draft)
  .then =>
    GoMakeANetworkRequestThatReturnsAPromise
```

Having explicit transactions also puts us on equal footing with Sequelize and other ORMs. Note that you /have/ to call DatabaseStore.inTransaction (t) =>. There is no other way to access the methods that let you alter the database. :-)

Other changes:
- This diff removes Message.labels and the Message-Labels table. We weren't using Message-level labels anywhere, and the table could grow very large.
- This diff changes the page size during initial sync from 250 => 200 in an effort to make transactions a bit faster.

Test Plan: Run tests!

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D2353
2015-12-17 11:46:05 -08:00
Ben Gotow 9fee3c4cf1 Merge pull request #728 from francois2metz/fix_unused_require
Harmonize require and remove unused ones.
2015-12-17 11:19:09 -08:00
François de Metz efefe0dae7 Harmonize require and remove unused ones. 2015-12-17 00:02:37 +01:00
Dave Perdue 848fb0d688 Fix broken GNOME dock icon
This addresses an issue mentioned in Issue #465 regarding a missing icon.
2015-12-16 12:14:26 -08:00
Dave Perdue 2fc66a42fa Remove redundant path in .desktop for Linux
The install-task has two instructions that add an extra "resources" to the iconName directory and thus the icon doesn't work. The resulting nylus.desktop has an invalid path for the icon.
2015-12-16 11:59:01 -08:00
Ben Gotow 60d6f672d1 Merge pull request #706 from noahbuscher/patch-1
Added link to plugin and theme repo
2015-12-15 17:08:56 -08:00
Ben Gotow b81c6040b4 fix(downloads): Create directory path with correct separator
Fixes #709
2015-12-15 13:55:59 -08:00
Ben Gotow 1482ae0f44 bump(version): 0.3.32 2015-12-15 11:59:01 -08:00
Ben Gotow 411204be70 fix(aliases): Add note that aliases may need to be setup 2015-12-15 11:56:31 -08:00
Ben Gotow 159bb51a10 fix(locales): Copy lproj files to ensure navigator.language works
See https://github.com/atom/electron/issues/2484
2015-12-15 11:34:56 -08:00
Juan Tejada b3bf4ad65d feat(theme-selector): Add theme selector to preferences page
Summary:
- Adds a couple of helper methods to theme manager and updates how
a theme package is enabled to be consistent with how we actually want to
activate themes.
- Adds small select component to choose a theme or install a new one.

Test Plan: - Manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2355
2015-12-15 10:29:58 -08:00
Ben Gotow f071764f20 fix(lint): Remove return statement from editable list 2015-12-14 15:47:58 -08:00
Evan Morikawa 267a339250 fix(bootstrap): split commands 2015-12-14 15:22:47 -08:00
Juan Tejada 5a8ca1ef51 add(integration-test): Adds test for onboarding flow with Exchange
Summary:
- Make sure user can log in using exchange
- Adds some test helpers for the test
- Updates eslint.json and cleans up lint errors

Test Plan: - Integration Tests

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2346
2015-12-14 15:14:58 -08:00
Ben Gotow 281baf5c48 bump(version): 0.3.31 2015-12-14 14:36:17 -08:00
Juan Tejada 832d0b8dcf feat(default-alias): Add functionality to select a default alias
Summary:
- Update Account model witha default alias and DraftStore methods that
construct new messages to use default alias if available.
- Update AccountDetails page and add selector to select default alias

Test Plan: - Unit tests

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2352
2015-12-14 14:35:26 -08:00
Juan Tejada f0cc7afb54 fix(editable-list): Prevent empty selection on esc pressed + other fixes
- When prop specified to not allow empty selection it should also
prevent it from being cleared when pressing Esc while focusing the list
- Adds a default value to the edit item input
- Updates specs
- Updates styles
2015-12-14 14:29:45 -08:00
Noah Buscher f6c76c0271 Added link to plugin and theme repo 2015-12-14 14:24:13 -06:00
Evan Morikawa 643844c998 fix(tests): fix composer integration specs 2015-12-14 12:09:51 -08:00
Evan Morikawa 0e583de21b fix(tests): fix composer integration tests 2015-12-14 12:05:55 -08:00
Juan Tejada 7275336665 fix(shortcuts): Fix shortcut handlers for marking as read/unread
- Marking as read/unread did not work when selecting multiple threads
2015-12-14 10:32:45 -08:00
Juan Tejada b9253ebbfd fix(prefs): Make General preferences tab be the initially selected one 2015-12-14 00:31:11 -08:00
Juan Tejada 0eb163fdbd fix(specs): Fix composer view specs for enabling 'from:' field based on
aliases

- Will show from field when account has at least one alias
2015-12-14 00:02:30 -08:00
Juan Tejada 823dab988b refactor(extensions): Move extensions outside of flux/ folder
Not really related to flux, makes more sense to be inside src/
2015-12-13 23:33:42 -08:00
Juan Tejada fc69d2dbf6 fix(warnings): Remove deprecate warnings from specs 2015-12-13 23:32:24 -08:00
Ben Gotow 64d0d60f8b fix(aliases): Show from field whenever aliases are present 2015-12-11 19:04:14 -08:00
Ben Gotow 8ea8df8efc fix(ci): stable instead of release/* branches 2015-12-11 17:13:42 -08:00
Ben Gotow 0f67438c9f fix(ci): Publish appveyor release branch builds 2015-12-11 15:11:13 -08:00
Ben Gotow 5593886bcf bump(version): 0.3.30 2015-12-11 15:11:13 -08:00
Evan Morikawa 186c6923f0 fix(ci): run grunt script in win compatible way 2015-12-11 17:46:18 -05:00
Ben Gotow 922a9e80ec fix(ci): Publish builds on release branches 2015-12-11 14:44:53 -08:00
Ben Gotow 74913ddb78 fix(select-all): Disable Cmd-A to select threads for now 2015-12-11 14:10:04 -08:00
Evan Morikawa fe5d218ce4 fix(build): add nylas resources before apm install 2015-12-11 17:08:39 -05:00
Evan Morikawa 1d7f9f6cac fix(spellcheck): let win < 8 fallback to hunspell 2015-12-11 16:41:41 -05:00
Evan Morikawa 8fe4a7a02f docs(tests): add docs about integration testing 2015-12-11 16:25:25 -05:00
Juan Tejada 15fac5be4d fix(editable-list): Refocus list after editing or creating 2015-12-11 12:43:01 -08:00
Evan Morikawa e928f85cd7 fix(spellcheck): add tests and merge in Linux changes 2015-12-11 15:36:13 -05:00
mbilker ddb4716706 spec(spellchecker): handle some weird Linux cases
Linux returns ['asked', 'acidify', 'Assad'] for the string "asdfk"
which seems normal to me. Why do OS X and/or Windows return [] for
that string? That seems weird, so I just broke the spec to run different
specs on different platforms.
2015-12-11 15:36:12 -05:00
mbilker a9047542f2 fix(spellchecker): confine the linux changes to only 3 methods
The "it provides options for misspelled words" still fails with
"asdfk" supposed to supply no corrections, which I find unlikely in
the real world, and Hunspell provides corrections.
2015-12-11 15:36:12 -05:00
mbilker 3c647ef2be lint(spellchecker): remove trailing semicolons 2015-12-11 15:36:12 -05:00
mbilker 80774afaa1 fix(spellchecker): Preliminary Linux support
The Linux component of Atom's spellchecker depends on Hunspell for
corrections. It requires a dictionary to be set, unlike Mac OS X
and Windows that have spellcheckers built in to the OS, and they
have the dictionaries built-in as well. This commit uses Atom's
spellchecker default dictionary method (which I wish was a public
API) to reset the dictionary to its default setting. It also ignores
the dictionaries available command for the Linux platform, which
seems to always return an empty Array.
2015-12-11 15:36:12 -05:00
Ben Gotow 580bc9e150 fix(editablelist): Remove spec warning 2015-12-11 12:16:55 -08:00
Ben Gotow 02fcd8e9be fix(thread-list): Initialize database view immediately 2015-12-11 12:15:38 -08:00