Commit graph

1203 commits

Author SHA1 Message Date
Jackie Luo ea5744d0ed fix(theme-picker): Fix linter issues for ES6 2016-03-08 17:41:22 -08:00
Jackie Luo e94dbbdca1 fix(theme-picker): Move launch command to activate() 2016-03-08 17:32:23 -08:00
Jackie Luo ba5cba3181 feat(theme-picker): Uninstall themes on click
Summary: Themes can now be uninstalled by clicking a button in the theme picker, instead of going to `~/.nylas/packages` to delete the directory.

Test Plan: Tested locally.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2700
2016-03-08 17:08:35 -08:00
Drew Regitsky 6a4b081707 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
Ben Gotow df9e3b7464 fix(body-processor): Observe the db to clear cache. Fixes #1133
Summary:

Test Plan:

Reviewers:

Subscribers:
2016-03-08 13:14:06 -08:00
Ben Gotow fb4fe3fd5f fix(autolinker): PR accepted into 0.24.1, fixes #839 2016-03-08 10:22:08 -08:00
Evan Morikawa 388fd455ea fix(lint): fix linter issues 2016-03-08 13:02:10 -05:00
Drew Regitsky 1bd3fc74e9 test(plugins): Add specs, refactor/fixes for open and link tracking
Summary:
Add specs to test the components of open tracking and link
tracking. Notably does not test the overall functionality, which
still needs specs.

Test Plan: adds specs

Reviewers: juan, evan, bengotow

Reviewed By: evan, bengotow

Differential Revision: https://phab.nylas.com/D2667
2016-03-07 20:54:43 -08:00
Drew Regitsky e35b37441b fix(send): make send/syncback draft tasks cooperate, fix task ordering tracking
Summary:
Fixes an issue with sending where certain conditions could result in a
duplicated message.

Fixes task dependency logic for draft syncback and send. Changes `createdAt`
on tasks to instead be `sequentialId`, assigned when the task is queued, to
track order of enqueueing. Renames `isDependentTask` => `isDependentOnTask`
and adds comments for clarity.

Test Plan:
Specs updated. Might be good to add some later to test this particular
edge case.

Reviewers: juan, evan, bengotow

Reviewed By: evan, bengotow

Differential Revision: https://phab.nylas.com/D2681
2016-03-07 20:14:58 -08:00
Drew Regitsky eaf831efb4 fix(msg-ctrls): reorder hidden options to reduce accidental error reports 2016-03-07 18:24:31 -08:00
Ben Gotow 6d43c9623c fix(autoload-images): Bar disappears when you choose to load images 2016-03-07 18:19:17 -08:00
Ben Gotow 9bb181ef3e 💄(search): Show focus around search input 2016-03-07 18:19:17 -08:00
Juan Tejada 0d15c6cea6 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
Juan Tejada 1fe51ef586 fix(date-utils): Add localization to date formats
Summary:
- Setting the locale in moment was not sufficient to actually use the
  correct localized formats.
- Moment provides localized format via the formats : 'L', 'LL', 'll',
  etc. See: http://momentjs.com/docs/#/displaying/format/
- Updates to set our date formats based on localized formats:
  - Unfortunately, localized formats always contain the year, so I
    manually removed the year from our short format.
- Actually fixes: #1515
- Fixes bug where setting nextWeek or thisWeekend returned incorrect
  date if the current day was saturday or sunday
- Add specs

Test Plan: Unit tests

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2688
2016-03-07 16:44:54 -08:00
Jackie Luo f21e561317 spec(theme-picker): Remove filter for theme picker spec 2016-03-06 16:37:36 -08:00
Jackie Luo 62007cfbb1 🎨(theme-picker): Add inline style to close button 2016-03-06 16:36:28 -08:00
Jackie Luo 86133a150a fix(theme-picker): Fix linter issue 2016-03-06 15:25:52 -08:00
Jackie Luo 02cdc5d38a fix(theme-picker): Update spec to work with iFrame rewriting function 2016-03-05 11:24:37 -08:00
Jackie Luo c67e2a24ea 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
Evan Morikawa 66c84383ff feat(onboarding): update account-choose page 2016-03-04 16:53:26 -05:00
Evan Morikawa bc4123a045 feat(onboarding): restyle step 3 2016-03-04 16:48:16 -05:00
Evan Morikawa 7cfe045b6d feat(onboarding): style page 2 2016-03-04 16:48:16 -05:00
Evan Morikawa 2f0630b0e8 feat(onboarding): style page 1 2016-03-04 16:48:16 -05:00
Ben Gotow a1867ead6b fix(auth): re-enable ssl_required checkbox with backend support 2016-03-04 13:29:18 -08:00
Ben Gotow 092fb99a17 fix(phishing): Tie to MessageStore so it works when msgs aren't ready 2016-03-03 14:39:15 -08:00
Ben Gotow 84b92af0e7 💄(bars): No email address overflowing phising / autoload images bars 2016-03-03 14:16:54 -08:00
Mehdi Rejraji 19d3c416fc Match only valid URLs for link tracking
As of now, link-tracking creates link tracking for every <a> tag, no matter the href attribute. This commit only creates link tracking for valid URLs.
The reason I wrote a new regex instead of rewriting linkTagRegex is that this regex is used by message-list.
https://regex101.com/r/jD5zC7/3 vs https://regex101.com/r/cK0zD8/2

Resolves: #1525
2016-03-03 13:46:41 -08:00
Juan Tejada 4900df4768 fix(lint): Fix linter error in specs 2016-03-03 13:45:28 -08:00
Juan Tejada f46502ad3e test(plugins): Add snooze and send later specs
Summary:
- Also refactors the code a bit for testability and maintainability
- Fixes #1515

Test Plan: - Unit tests

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2651
2016-03-03 12:38:42 -08:00
Ben Gotow 9b54d9cf31 fix(MessageContainer): Fix state, prevent from getting different messages. #1175
Summary:
This fixes a serious issue where drafts could appear to be sending if
they were located in the same index of the message list as a draft which was
previously sending.

Under the hood this was due to two bad programming choices:

1) State based on props in MessageContainer requires correct implementation of
   componentWillReceiveProps. This is definitely an anti-pattern.

2) Using item index rather than clientId as the key for items in the MessageList
   caused containers to be given a different message prop when one was inserted,
   rather than just shifting the existing ones down and inserting a new one.

Test Plan: Not sure how to test this really...

Reviewers: drew, juan

Differential Revision: https://phab.nylas.com/D2673
2016-03-03 12:10:03 -08:00
Jackie Luo 83fa692bb5 Bump version for node-emoji 2016-03-02 18:58:07 -08:00
Evan Morikawa 572498aa68 fix(composer): fix minor spacing issue on popout composer 2016-03-02 16:06:40 -08:00
Evan Morikawa b727fe374d fix(find-in-thread): minor rename fixes 2016-03-02 15:00:01 -08:00
Evan Morikawa 10e0fcc965 feat(find-in-thread): add the ability to find in a thread
Summary: Find in thread

Test Plan: todo

Reviewers: bengotow, juan

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2660
2016-03-02 14:46:27 -08:00
Ben Gotow a53e72f542 fix(hidden-messages): Address diff feedback from @jstejada 2016-03-02 10:28:32 -08:00
Ben Gotow f5ee557e2e feat(hidden-messages): Filter trash/spam messages. Fixes #1135
Summary:
By default, the messages in a thread are now filtered to exclude
ones moved to trash or spam. You can choose to view those messages by clicking
the new bar in the message list.

When you view your spam or trash, we only show the messages on those threads
that have been marked as spam/trash.

Test Plan: Run a couple new tests

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2662
2016-03-02 10:05:17 -08:00
Evan Morikawa 66d1fe67e8 fix(account): re-add token if a new one comes in
Summary: fix(account): allow users to reconnect accounts if auth has failed

Test Plan: manual

Reviewers: bengotow, juan

Differential Revision: https://phab.nylas.com/D2663
2016-03-01 16:02:20 -08:00
mbilker a1b9775b6d lint(*): correct eslint errors, warnings still exist
There are warnings in `spellcheck-composer-extension.es6` for the `while (true)`
loops.
2016-03-01 10:58:29 -05:00
Jackie Luo 876aea0ad9 fix(composer-emojis): Insert emoji on tab, fixes #1511 2016-02-29 20:46:30 -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 3072246d8e temp(onboarding): Remove checkbox for option not yet on prod 2016-02-26 16:49:46 -08:00
Drew Regitsky 3327fc4cff fix(message-controls): add accountId to debug values copied to clipboard 2016-02-26 15:13:33 -08:00
Ben Gotow b92e4fa07b fix(threads): Right-align the timestamps in the thread list 2016-02-26 15:00:56 -08:00
Ben Gotow 04f93bd055 💄(print): Fix #1425 2016-02-26 14:40:16 -08:00
Ben Gotow 18677e51a6 fix(config): Store cursors with sync state, avoid constant config.cson writes
Summary:
Previously we were storing sync cursors in config.cson. They were by
far the most frequently updated piece of data in config. To make things worse,
all the writing was happening in the worker window - the main window was just
seeing the changes on disk and reloading.

I believe there's an edge case which causes the main window to read the config
file when it's mid-write and empty. This causes the accounts array to become
empty in the AccountStore and lots of downstream issues. It's also then possible
for the main window to write a config change of it's own and empty the file
permanently.

Test Plan: A few new tests to make sure this is backwards compatible.

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D2642
2016-02-26 13:52:19 -08:00
Drew Regitsky d3d4978dbd fix(message-controls): update email address for reporting 2016-02-26 12:29:11 -08:00
Drew Regitsky 0e522ec789 feat(message-controls): Option to copy message IDs/metadata to clipboard 2016-02-26 12:26:20 -08:00
Juan Tejada 0b5afaad71 fix(lint) 2016-02-26 11:24:00 -08:00
Juan Tejada 8e382f8c26 fix(aliases): Fix regression to properly create/update/remove aliases
- This fixes #1428
- Add specs
2016-02-26 11:01:01 -08:00
mbilker 1a5766114e lint(system-tray): code style consistent with rest of file 2016-02-26 11:37:20 -05:00