Commit graph

88 commits

Author SHA1 Message Date
Ben Gotow d780740187 fix(build): Fix failing linter and account tests 2016-03-18 13:26:03 -07:00
Drew Regitsky 3240635b4c fix(sync-state): ignore Account.syncState=="stopped" for now
Valid accounts that are syncing properly can reviece a delta for
Account.syncState==stopped currently, due to some quirks in the backend.
Ignore "stopped" until it unabiguously represents an error state.
2016-03-18 10:41:08 -07:00
Juan Tejada 030b0b57b4 feat(view-mode): Add option in menu to select view mode
Summary:
Also add minor refactoring
#1710

Test Plan: Manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2745
2016-03-15 11:20:55 -07:00
Jackie Luo 76d478b677 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
Ben Gotow dbf3610c88 hide(zoom): Remove UI for zoom, move to CONFIG.md 2016-03-14 13:13:32 -07:00
Drew Regitsky 327eb43932 fix(sync-errors): Handle account deltas indicating sync issues
Summary:
Changes the delta code to handle new deltas on the Account object,
which are triggered by changes in sync state indicating various backend
issues. Saves the sync state in a new field on the Account object, which
is persisited in `config.cson`.

Includes several UI changes to display more information when an account has
backend sync issues. Adds better messages and new actions the user can take
based on the type of sync issue.

Additionally, fixes bug in action bridge that was preventing multi-arg global
actions from working.

Test Plan:
Manual, by testing different sync state values and triggering deltas from the
backend

Reviewers: juan, evan, bengotow

Reviewed By: evan, bengotow

Subscribers: khamidou

Differential Revision: https://phab.nylas.com/D2696
2016-03-08 16:06:04 -08:00
Juan Tejada 37af2ba42c fix(remove-from-view): Fix logic for delete/remove-from-view behavior:
Summary:
- Separate gmail's remove-from-view and delete behaviors and write logic
  for each of those
  - Remove MailboxPerspective::{canArchiveThreads, canTrashThreads,
    removeThreads} and some unecessary code in TaskFactory
  - Instead, add MailboxPerspective::tasksForRemovingFromPerspective (I
    know its a bit of a mouthful)
  - I initially tried to put all of the logic for each execution path
    inside the TaskFactory by checking perspective types, but it made
    more sense to use the polymorphism already in place for the different
    perspective types.
  - There is a default delete/remove-from-view behavior which is
    configurable via simple ruleset objects. The gmail behavior is
    configured in this way.
- Update swipe css classes based on destination of threads
- Fixes #1460:
  - Update logic to display archive/trash buttons and context menu options correctly
    when selected threads can be archived/trashed (not based on
    perspective)
  - Same for swiping
- Add a bunch of specs
- Convert some code to ES6
- TODO write some docs for new functions

Test Plan: Unit tests

Reviewers: drew, evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2682
2016-03-07 18:16:37 -08:00
Jackie Luo ba0312501a feat(theme-picker): Add visual theme picker to menu
Summary: Adds a new visual theme picker to the menu that allows users to select different themes based on color palettes and then change their themes live.

Test Plan: Test included.

Reviewers: evan, bengotow

Reviewed By: evan, bengotow

Differential Revision: https://phab.nylas.com/D2669
2016-03-04 15:34:48 -08:00
Juan Tejada 038f348281 fix(lint) 2016-02-26 11:24:00 -08:00
Juan Tejada 7ba13d0f0a fix(aliases): Fix regression to properly create/update/remove aliases
- This fixes #1428
- Add specs
2016-02-26 11:01:01 -08:00
Ben Gotow 6eed3ce054 fix(composer): Redo toolbar styling with theme variables + minor fixes 2016-02-23 15:40:44 -08:00
Juan Tejada 7ca04c579e fix(account-prefs): Update account save logic to prevent incorrect saves
- This fixes #1354 and #1235
- This issue was caused because the account details preferences
  component was keeping as state all of the account object fields. `setState` works
  like `extend`, so when the account changed, state was set to the new set of account fields,
  but the old values were only removed if they were overriden, and remained the
  same if the field did not exist in the new state object.
  Specifically, when a new account was added, setState was called with
  `{..., defaultAlias: undefined}` which did /not/ remove the  the defaultAlias
  from the previous state.
- Switched to managing state with a top level key `account`
2016-02-16 18:03:22 -08:00
Ben Gotow 71a5662553 🎨: Smaller buttons, smaller toolbar, smaller text
This should not be considered final, but we do plan to shrink the size of the entire UI slightly to match platform conventions.
2016-02-09 19:45:24 -08:00
Juan Tejada 6a14d5b561 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
Juan Tejada c67bab052a fix(prefs): Fix selector for default account for send 2016-02-01 18:34:42 -08:00
Ben Gotow 809f51f960 feat(reorder): Re-order mail rules (#1074) and accounts (#631)
Summary:
This implements EditableList re-ordering via a new prop callback.
You can drag and drop items in the mail rules list and the accounts list.
Note that you can't drag between lists - right now this is just to enable
re-ordering.

Test Plan: No new specs yet

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2495
2016-02-01 14:06:54 -08:00
Juan Tejada 46f331c0b1 fix(alias-list): Editable list wont create empty items
- Update alias coercion to include name by default
2016-02-01 12:45:52 -08:00
Evan Morikawa ec553b0c3d fix(pref): check for mounting on async launch service 2016-01-29 17:11:54 -08:00
Juan Tejada 74c72e0915 add(docs): Add docs for OutlineView and OutlineViewItem
- Renames some stuff
2016-01-28 15:28:15 -08:00
Evan Morikawa 67edcc836f feat(startup): new option to launch on system start
Summary:
adds new option to launch on system start

Also adds the `--background` flag to launch N1 in the background (aka not
show the main window).

Test Plan: Manual

Reviewers: bengotow, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2474
2016-01-28 12:02:08 -08:00
Juan Tejada b13ca724f1 Add ability to select account to send from
- Adds settings option to select default account to send from
2016-01-25 18:20:54 -08:00
Ben Gotow 0ef4911b22 Merge branch 'master' into unified-inbox
# Conflicts:
#	internal_packages/feedback/lib/feedback-button.cjsx
#	internal_packages/thread-list/lib/thread-list.cjsx
#	src/flux/stores/draft-store.coffee
2016-01-25 17:28:29 -08:00
Drew Regitsky ea934939a1 fix(mail-rules): tiny CSS fix to "+" button in mail rules 2016-01-15 11:01:59 -08:00
Juan Tejada 9f998d1964 refactor(rip-current-account): Rips out AccountStore.current
Summary:
- WIP: Need to fix tests and some errors!
- Refactors Category class to hold information about its type
- Refactors CategoryStore to rely on observables instead of local caches
- Adds and updates Observables and helpers
- Refactors ContactStore to hold entire cache of contacts instead of per
  current account
  - Same for ContactRankingStore and other stores
- Refactors method names for AccountStore + some helpers
- Updates MailViewFilter to hold an account
  - Adds basic Unified filter
- Replaces AccountStore.current calls with either:
  - The account of the currently focused MailViewFilter
  - The account associated with a thread, message, file, etc...
  - A parameter to be passed in
  - Arbitrarily, the first account in the AccountsStore

Test Plan: - Unit tests

Reviewers: evan, bengotow

Differential Revision: https://phab.nylas.com/D2423
2016-01-08 14:22:13 -08:00
Ben Gotow 7e24a13466 feat(zoom): Allow users to override interface zoom. Fixes #699 2016-01-08 11:32:32 -08:00
Ben Gotow f0336b9822 feat(newsletter): Manage subscription directly from N1 2016-01-07 18:44:40 -08:00
Ben Gotow e0339e9e18 fix(keymaps): Display composer keymaps, fix Apple Mail 2016-01-06 11:44:20 -08:00
Ben Gotow 7fabcf6577 fix(rules): Overflow in the prefrences sidebar. Fixes #908 2016-01-06 09:51:42 -08:00
Ben Gotow a2781be17c lint(mail-rules): Fix build failure from linter issue 2015-12-29 14:41:30 -08:00
Ben Gotow d911793bef fix(mail-rules): Catch and disable mail rules building bad actions 2015-12-28 18:39:06 -08:00
Ben Gotow 606909e256 feat(mail-rules): Per-account mail rules filter incoming, existing mail
Summary:
Originally, this was going to be a totally independent package, but
I wasn't able to isolate the functionality and get it tied in to
the delta-stream consumption. Here's how it currently works:

- The preferences package has a new tab which allows you to edit
  mail filters. Filters are saved in a new core store, and a new
  stock component (ScenarioEditor) renders the editor. The editor
  takes a set of templates that define a value space, and outputs
  a valid set of values.

- A new MailFilterProcessor takes messages and creates tasks to
  apply the actions from the MailFiltersStore.

- The worker-sync package now uses the MailFilterProcessor to
  apply filters /before/ it calls didPassivelyReceiveNewModels,
  so filtrs are applied before any notifications are created.

- A new task, ReprocessMailFiltersTask allows you to run filters
  on all of your existing mail. It leverages the existing TaskQueue
  architecture to: a) resume where it left off if you quit midway,
  b) be queryable (for status) from all windows and c) cancelable.
  The TaskQueue is a bit strange because it runs performLocal and
  performRemote very differently, and I had to use `performRemote`.
  (todo refactor soon.)

This diff also changes the EditableList a bit to behave like a
controlled component and render focused / unfocused states.

Test Plan: Run tests, only for actual filter processing atm.

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2379
2015-12-23 02:19:32 -05:00
Juan Tejada 5675f24407 fix(prefs): Prevent main key commands from being fired to thread list while on prefs page
Summary:
- When the preferences sheet is open, any commands triggered through key presses were being received by the thread-list, producing unexpected
(and unseen) results
- This is a partial/temporary solution and should go away when we do the Keymap/Commands/Menu refactor

Test Plan: - Manaul

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2380
2015-12-22 09:38:56 -08:00
Ben Gotow 71bd96f978 fix(aliases): Add note that aliases may need to be setup 2015-12-15 11:56:31 -08:00
Juan Tejada f575a2dabc 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
Juan Tejada 26a907c0c0 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 9d77d6399d 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
Juan Tejada 80be13410d fix(docs): Update ES6 comment docs to use JSDoc 3 format 2015-12-11 10:01:13 -08:00
Juan Tejada 0073f21982 add(docs):Add documentation to EditableList and PreferencesAccountDetails 2015-12-10 17:59:16 -08:00
Juan Tejada 281e458d39 feat(account-prefs): Adds new page for Account in preferences
Summary:
Adds the new Account preferences page. This consists of two major React components,
PreferencesAccountList and PreferencesAccountDetails, both of which use EditableList.

I added a bunch of fixes and updated the API for EditableList, plus a bit of
refactoring for PreferencesAccount component, and a bunch of CSS so its a big diff.

The detailed changelog:

Updates to EditableList:
  - Fix bug updating selection state when arrows pressed to move selection
  - Add new props:
    - allowEmptySelection to allow the list to have no selection
    - createInputProps to pass aditional props to the createInput
  - Add scroll region for list items
  - Update styles and refactor render methods

Other Updates:
- Updates Account model to hold aliases and a label
  - Adds getter for label to default to email
- Update accountswitcher to display label, update styles and spec

- Refactor PreferencesAccounts component:
  - Splits it into smaller components,
  - Removes unused code
- Splits preferences styelsheets into smaller separate stylesheet for
  account page. Adds some updates and fixes (scroll-region padding)
- Update AccountStore to be able to perform updates on an account.
- Adds new Action to update account, and an action to remove account to
  be consistent with Action usage
- Adds components for Account list and Aliases list using EditableList

Test Plan: - All specs pass, but need to write new tests!

Reviewers: bengotow, evan

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2332
2015-12-10 15:27:29 -08:00
Ben Gotow 77394b837d fix(license): GPLv3 => GPL-3.0 2015-12-07 10:50:47 -08:00
Ben Gotow b224347e10 docs(notifs): On linux, display a note about Zenity in prefs 2015-12-03 11:36:54 -08:00
Ben Gotow ceb9e2cdb1 feat(keybindings): Show all keybindings in prefs 2015-12-01 18:31:19 -08:00
Ben Gotow d48fa50654 feat(rsvp): "Quick RSVP" to events recongized by the API 2015-11-30 17:12:45 -08:00
Ben Gotow be491d6cae fix(signatures): Display signatures tab, blur after prefs changes 2015-11-30 13:39:42 -08:00
Evan Morikawa 83b0a4db5f feat(signatures): add signature support
Summary:
Add signatures back in.

Extract contenteditable css to its own file instead of being bundled with
the composer.

Test Plan: manual

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2295
2015-11-30 11:48:24 -08:00
Ben Gotow 6a4613b4a1 feat(prefs): Allow tabs with an accounts submenu
Summary:
This diff:
- Improves the styling of the tabs in the preferences sidebar.
- Adds an optional param to section cofnig that puts an "account" submenu beneath the tab item.
- Renames preferences "sections" => "tabs", and renames the PreferencesSectionStore to PreferencesUIStore. I think we should include "UI" in more of our stores, and I think "tabs" is a good idea because it's unambigious—there's no way you could confuse it for a "section" of the NylasEnv.config tree or think it deals with actually saving prefs.

Test Plan: Inspect visually

Reviewers: evan, juan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2296
2015-11-30 11:43:49 -08:00
Juan Tejada 84adfb3bdf fix(prefs): Focus main window when open prefs and prevent dupe sheets
- Fixes #498
- Fixes #484
2015-11-28 09:08:45 -08:00
DC 2bd710d668 Internal package.json license: GPLv3
Changed from 'Propietary' to 'GPLv3' to match LICENSE.md
2015-11-24 09:09:33 -08:00
Ben Gotow e0976fde2c bump(electron): 0.34.3 => 0.35.1
Electron 0.35.1 includes the tray fixes we contributed last week but also includes API restructuring and improvements. Most importantly, modules from electron are now imported via `require('electron')`
2015-11-23 22:09:17 -08:00
Ben Gotow fabc047a79 fix(prefs): Minor tweaks, see description
- Make the keymaps panel less wide
- <select>'s now populate their current value properly
- Items should blur after being interacted with so that `esc` still moves you back to parent sheet
2015-11-23 20:34:04 -08:00