Commit graph

422 commits

Author SHA1 Message Date
Ben Gotow 80bf2ed43a fix(T1744): Display attachments when message has no body, additional specs
Summary:
This fixes T1744 and adds specs for the logic in _attachmentComponents.
 - Attachments should display even when the body is an empty string or null
 - Attachments should not include files without names (mime parts of the message)

Test Plan: Run 2 new tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1744

Differential Revision: https://phab.nylas.com/D1566
2015-05-28 18:15:47 -07:00
Ben Gotow 736275cee1 Fixes T1743: Add replyTo field handling, tests to DraftStore
Summary: Fixed T1743. Adds the replyTo field to Message objects and handling to the DraftStore. Also adds specs to make sure we don't break it.

Test Plan: Run 3 new tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1743

Differential Revision: https://phab.nylas.com/D1565
2015-05-28 18:13:46 -07:00
Evan Morikawa 4d6235b006 Fixes T1741: database getting deleted on quit
Summary:
Fixes T1741
The database was getting deleted on every quit!
Since the ~/.nylas/config.cson wasn't getting updated messages weren't
getting refetched.

Now we only delete on logout

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1741

Differential Revision: https://phab.nylas.com/D1564
2015-05-27 14:23:15 -04:00
Evan Morikawa e32a7fe065 Removed invalid Action.notificationDismissed firing
Summary:
If a notification is dismissed manually, the setInterval dismissal is still fired.
         This patch adds a check and removes the notification dismissal action from firing

Test Plan: none

Reviewers: ktalwar, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1218
2015-05-27 12:31:07 -04:00
Ben Gotow 91090d37d3 fix(auto-update): Contrary to all reason, autoUpdater.quitAndInstall does not call before-quit 2015-05-26 16:26:21 -07:00
Evan Morikawa 8a54cd95f0 Fixes T1731: code in iframes renders with white-space: normal
Summary:
Fixes T1731
Chrome by default on a user-agent stylesheet sets white-space to `pre`.
For `pre` elements. This is useful in most cases since whitespace is taken
literally.

Unfortunately when people send out emails with code in them, the `pre`
blocks can get mangled because there may be unnecessary whitespace in
them.

I personally think the default behavior is much better, however, I think
we should have `pre` blocks render with `white-space: normal` because
anyone who's sending an email with code it in will probably use <span> and
<br> and inline styles to ensure it looks correct on most readers. Since
many places (like Outlook) strip whitespace out of HTML, I think we should
mimic that behavior too.

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1731

Differential Revision: https://phab.nylas.com/D1561
2015-05-26 18:47:26 -04:00
Ben Gotow b182fb26f4 fix(quit): Destroy hot-loaded windows so they don't block quit - fixes T1282
Summary:
teardown dblite on quit—if it faiels to exit, it blocks the main process from quitting on linux

fix edge case where the ".quit" sql command is queued to run and then doesn't run because closeRequested is true

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1282

Differential Revision: https://phab.nylas.com/D1559
2015-05-26 14:15:12 -07:00
Ben Gotow 9c8016071c fix(downloads): Wait for download file stream to finalize before resolving and rendering inline attachments. Fixes T1210
Test Plan: No new tests, need to figure out how to prevent regression here.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1210

Differential Revision: https://phab.nylas.com/D1558
2015-05-26 14:14:18 -07:00
Ben Gotow 6b45742db1 fix(iframes): Clear selection when blurring iFrames - Fixes T1167 2015-05-25 11:04:11 -07:00
Ben Gotow 789228e8f2 fix(notifications): Give notifications tag like HTML5 Notifications so you can de-dupe 2015-05-25 10:27:36 -07:00
Ben Gotow 4cf5e3e825 fix(spellchecking): Turn off spellcheck on email fields 2015-05-22 17:04:37 -07:00
Ben Gotow 661f944be2 fix(linux): Closes T1392, updating spellchecker library to be ASAR-aware 2015-05-22 12:06:26 -07:00
Ben Gotow 3e0e3a88e7 fix(linux-build): Move the license file out of app so it works with ASAR 2015-05-21 18:22:11 -07:00
Ben Gotow 310f8ba062 fix(mailto): Handle mailto on application launch, populate NamespaceStore synchronously
Summary:
atom-window `sendMessage` was not the same as `browserWindow.webContents.send`. WTF.

Save current namespace to config.cson so that it is never null when window opens

Don't re-create thread view on namespace change unless the namespace has changed

Tests for NamespaceStore state

Push worker immediately in workerForNamcespace to avoid creating two connections per namespace

Allow \n to be put into sreaming buffer, but only one

Clear streaming buffer when we're reconnecting to avoid processing same deltas twice (because of 400msec throttle)

Make `onProcessBuffer` more elegant—No functional changes

Test Plan: Run tests!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1551
2015-05-21 18:08:29 -07:00
Evan Morikawa 57fc6d61e5 update linter to look at all less files
Test Plan: script/grunt lint

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1549
2015-05-21 14:50:40 -07:00
Ben Gotow 92cf2d520c fix(asar): Support ASAR, and running of specs in prod builds
Summary:
fix(task-queue): Repair the findTask function

Add "ship logs" and "open logs" to the developer menu

Patches for Chromium 42

Test Plan: Run tests!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1547
2015-05-21 14:41:30 -07:00
Evan Morikawa f97a3a7b86 Fixes T1363: move file success to task and listen to DB event
Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1363

Differential Revision: https://phab.nylas.com/D1548
2015-05-21 13:43:14 -07:00
Evan Morikawa 8b7509e50d Fixes T1360: don't double register Salesforce component 2015-05-21 09:52:57 -07:00
Ben Gotow 9e8235e954 fix(linux-build): Adding linux icons 2015-05-20 14:21:22 -07:00
Ben Gotow adf2027f2b fix(linux-build): Update build script to reflect 'electron' name 2015-05-20 12:09:14 -07:00
Ben Gotow 4f4f921000 fix(auto-updater): Make updates check happen every 5 minutes, fix critical crash
Summary:
Additional references to the windowmanager

Improve some log messages to make them more clear

Make shipLogs the throttled version. Calling shipLogs over and over leads to crash

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1538
2015-05-20 12:04:31 -07:00
Evan Morikawa 14c4c215e6 Fixes T1344: composer links fixed 2015-05-20 10:22:03 -07:00
Evan Morikawa e5dfc7cadd refactor(code): replace all instances of atom-shell and AtomShell and atomShell
Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1537
2015-05-20 10:20:10 -07:00
Ben Gotow 03e86bf4a5 fix(ship-logs): never use the .coffee extension 2015-05-19 22:28:30 -07:00
Ben Gotow 8a03009a2b fix(archive): Remove optimizations that were breaking archive... 2015-05-19 19:23:34 -07:00
Ben Gotow 4b84c558cd fix(developer-bar-store): Merge conflict not resolved 2015-05-19 17:22:00 -07:00
Ben Gotow 07cd16a491 fix(window-manager): Unregister hot windows, throw away secondary windows on logout
Summary: Fixes T1204 resolves T1204 closes T1204.

Test Plan: Run existing tests - need new tests for this, but will require tons of stubbing.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1204

Differential Revision: https://phab.nylas.com/D1530
2015-05-19 17:07:26 -07:00
Ben Gotow 8599bc0397 feat(logging): Developer bar, verbose logging to logstash, Electron 0.26.0
Summary:
- We now make verbose log files continuously as you use the app
- We ship the logs to LogStash via S3 when an exception occurs
- We log the DatabaseStore, ActionBridge and Analytics packages

- We are now on the latest version of Electron 0.26.0
- We are now on Chrome 42 and io.js 1.4.3
- We should be setup to use ASAR soon.

Update atom.sh to reflect that we're now electron

oniguruma was unnecessary

correctly find log files that haven't been shipped yet

Fix a small issue with nodeIsVisible after upgrade to Chrome 42

Delete old logs, better logging from database store, don't ship empty logs

Test Plan: Run existing tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1531
2015-05-19 17:02:46 -07:00
Evan Morikawa f274bbbf30 fix(composer): polish composer edge cases
Summary:
Fixes T1327
Fixes T1294
Fixes T1307
Fixes T1207

- More robus Undo Manager
- Scrolls to the most recent undo location
- Fixes a variety of bugs when the composer's cursor ends up in an unsupported
location
- Fixes auto-scroll detection at end of content

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1207, T1294, T1307, T1327

Differential Revision: https://phab.nylas.com/D1529
2015-05-19 16:12:39 -07:00
Evan Morikawa 4619871e8d refactor(utils): switch to regular underscore
Summary:
Fixes: T1334

remove final InboxApp references

move out all underscore-plus methods

Mass find and replace of underscore-plus

sed -i '' -- 's/underscore-plus/underscore/g' **/*.coffee
sed -i '' -- 's/underscore-plus/underscore/g' **/*.cjsx

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1534
2015-05-19 16:06:59 -07:00
Ben Gotow 3af6c45387 fix(initial-sync): Make initial sync more robust, show progress, retry on failure
Summary:
Rename ActivityBar => DeveloperBar

Expose sync workers and make them observable

New activity sidebar that replaces momentary notifications

Updated specs

Test Plan: Run new specs!

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1131

Differential Revision: https://phab.nylas.com/D1521
2015-05-19 15:59:37 -07:00
Ben Gotow 1e4aefcebb fix(iframes): Closes T1289—re-attach iFrame event listeners after doc.open
Summary: Re-order the header and toolbar so that the search dropdown appears correctly

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1524
2015-05-19 15:49:28 -07:00
Evan Morikawa ab713b5fac refactor(draft): clean up draft store session proxy logic
Summary:
This is an effort to make the logic around the process of sending a draft
cleaner and easier to understand.

Fixes T1253

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1253

Differential Revision: https://phab.nylas.com/D1518
2015-05-19 12:07:08 -07:00
Ben Gotow 1d03939888 [naming] Nylas Mail => Nylas, Nilas => Nylas 2015-05-18 19:21:54 -07:00
Ben Gotow dc34be2272 [arcconfig] Change to https://phab.nylas.com/ 2015-05-18 11:19:25 -07:00
Evan Morikawa 9ff8cf682d Fixes T1272: Package keyboard commands work in prod build
CSON files were not being copied over and therefore couldn't be parsed
into the main package.json file. All package-specific keymaps (like the
composer's ctrl+enter send) were not being activated on production builds.
2015-05-16 13:50:51 -07:00
Ben Gotow 8c08e61d6f fix(naming): Mac menus and Info.plist should say Nylas Mail 2015-05-16 11:12:43 -07:00
Evan Morikawa d6784ae7de fix(drafts): drafts save when they close
Summary: Closes T1264: Drafts save when they close

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1264

Differential Revision: https://review.inboxapp.com/D1515
2015-05-15 13:44:01 -07:00
Evan Morikawa 0fa6ccd9e2 fix(draft): drafts order newest to oldest
Summary: Fixes T1192: Allow ordering in database view. Fixes draft list ordering

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1192

Differential Revision: https://review.inboxapp.com/D1514
2015-05-15 13:16:34 -07:00
Ben Gotow b12e5c512f fix(linux): Window manager throwing exception when all closed 2015-05-15 11:56:44 -07:00
Ben Gotow f7b4bb4f12 InboxAPI => NylasAPI 2015-05-15 11:12:03 -07:00
Ben Gotow afcebd6463 Update docs 2015-05-15 11:09:39 -07:00
Ben Gotow 29c3e2993b Move atom.inbox => {NylasAPI} = require 'nylas-exports'
Conflicts:
	spec-nylas/tasks/file-upload-task-spec.coffee
2015-05-15 11:09:24 -07:00
Ben Gotow 91edef9f7a fix(naming): Move atom/inbox/nilas refs to Nylas
Conflicts:
	internal_packages/inbox-activity-bar/lib/activity-bar-long-poll-item.cjsx
2015-05-15 11:07:28 -07:00
Ben Gotow b0aabf377e fix(paste): Don't paste html with surrounding line breaks
Summary: This resolves T1187 — pasting plain text and html now work pretty well

Test Plan: Run new test case

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1187

Differential Revision: https://review.inboxapp.com/D1511
2015-05-15 10:56:40 -07:00
Ben Gotow b476532952 fix(T1241): Key repeat rate higher than animation duration causes cursor to disppear
Summary: Resolves T1241

Test Plan: No tests to run - all CSS!

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1241

Differential Revision: https://review.inboxapp.com/D1510
2015-05-15 10:55:17 -07:00
Ben Gotow e42e683f06 fix(T1242): Warn when sending an empty body, or a body that is all quoted text and not a forward.
Summary: Resolves T1242

Test Plan: Run new tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1242

Differential Revision: https://review.inboxapp.com/D1509
2015-05-15 10:53:22 -07:00
Evan Morikawa f1cec289af fix(*): fix draft preparing
Summary:
Fixes T1162: Search no longer lowercases

Fixes T1212: Selection anchor nodes are restored properly

Fixes T1254: Make sessionForLocalId return a promise

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg

Maniphest Tasks: T1263, T1212, T1162, T1254

Differential Revision: https://review.inboxapp.com/D1512
2015-05-15 10:45:18 -07:00
Evan Morikawa 8941eb791e feat(salesforce): add Lead and Contact syncing
Summary:
associating salesforce contacts and leads with Nylas contacts

adding fetcher form salesforce

shows conencted leads and contacts

auto associates acount

fixing salesforce forms

Salesforce composers are styled

fix opportunity association with account on object creation

fix specs

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1507
2015-05-14 14:58:42 -07:00
Ben Gotow e8f7f76080 feat(window-manager): Refactor window code, actually destroy main window when logging out
Summary:
Resolves T1200 and probably others.

This diff moves all the window management / hot loading into a new class called the WindowManager
and also changes the way the app transitions between onboarding and main window. When you log out,
the main window clears config and clearing the config causes the window manager to close the main
window and open the login window. When it detects a token again, it opens the main window.

This means you can't:
- Open the main window from the login window
- Open mailto: links and accidentally see the main window or a composer, since the draft store isn't
  running anywhere.
- Don't need to worry about properly resetting thigns when namespaces change, since the window
  is now actually re-created from scratch with the new auth token.

Be a little more defensive about namespace checks in draft-store

Move window code to window-manager

Rename AtomApplication to just `Application`

Specs fix

Test Plan: Run tests, would be good to have more for this.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1200

Differential Revision: https://review.inboxapp.com/D1501
2015-05-14 14:54:29 -07:00