Commit graph

275 commits

Author SHA1 Message Date
Ben Gotow 79f0405148 feat(starring): Star and unstar threads in the thread list
Summary:
When two or more buttons are grouped together, cut the padding off one interior edge so they're spaced more appropriately

Remove source list graphics for active states we aren't using

Starred in the sidebar

Small fix to the feature that keeps the selected item visible as you scroll

Test Plan: No new tests yet

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1607
2015-06-08 17:02:50 -07:00
Ben Gotow 1f589be4ad feat(paste): Add files by pasting them into the composer
Summary: You can now add file attachments by pasting them.

Test Plan: Run 3 new specs! We only had specs for sanitization so I added some for the paste event handler as well.

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1604
2015-06-08 12:41:31 -07:00
Ben Gotow b74372a7f4 punt(files): Temporarily disable the files package 2015-06-08 11:22:37 -07:00
Ben Gotow 73ee5c0227 fix(test): function execution order seems different on CI server? 2015-06-05 19:25:42 -07:00
Ben Gotow c2b4343880 fix(css): Invalid padding value separated by commas 2015-06-05 18:33:17 -07:00
Ben Gotow af5e2ea1dd fix(mac-build): CSS Linter warnings treated as errors 2015-06-05 18:22:11 -07:00
Ben Gotow 6fa2e20197 fix(iframes): Contextual menus for email contents
Summary: Fixes T1191

Test Plan: No new tests to see here.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1191

Differential Revision: https://phab.nylas.com/D1603
2015-06-05 16:47:30 -07:00
Ben Gotow df13b06c2a feat(scrollbars): Custom scrollbars via ScrollRegion
Summary:
ScrollRegion with support for tooltips shown as you scroll, custom tooltips for thread list and message list.

fix(specs): all other scrollbars hidden to prevent incompatibility

fix scrollbar sizing when used in conjunction with resizableregion

Test Plan: Need to write tests and docs for ScrollRegion - no tests yet

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1597
2015-06-05 11:50:55 -07:00
Ben Gotow 5fbd881304 feat(theming): Definitely not hacker mode. I don't know what you're talking about.
Summary: Add docs for new RetinaImg modes

Test Plan: Not much to test, except that it looks good!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1595
2015-06-05 11:40:44 -07:00
Ben Gotow 4f41845a22 fix(draft-speed): Optimize draft creation and reduce scroll / focus delays
Summary:
This diff attempts to improve the responsiveness of the app when you hit "Reply". This is achieved by being smarter about creating the draft and loading it into the draft store, and also by allowing the compose* actions to take objects instead of just IDs (resulting in a fetch of the object).

Allow Actions.composeReply,etc. to optionally be called with thread and message objects instead of IDs. This prevents a database lookup and the data is "right there."

Create DraftStoreProxy for new drafts optimistically—this allows us to hand it the draft model we just created and it doesn't have to go query for it

When we create a new Draft, immediately bind it to a LocalId. This means that when the MessageStore receives the trigger() event from the Database, it doesn't have to wait while a localId is created

When MessageStore sees a new Message come in which is on the current thread, a draft, and not in the localIds map, assume it's a new draft and shortcut fetchFromCaceh to manually add it to the items array and display. This means the user sees the...

...draft instantly.

Remove delays from focusing draft, scrolling to draft after content is ready. I actually removed these thinking it would break something, and it didn't break anything.... Maybe new Chromium handles better?

Fix specs

Test Plan: Run specs - more in progress right now

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1598
2015-06-05 11:38:30 -07:00
Ben Gotow a26b8d4bc4 fix(*): Resolve a variety of small and simple bugs
Summary:
Fix T1822 - saving templates not working, not showing template

Fix T1800 - give composers a minimum size

Fix the bottom bar of the composer so the gray bar goes all the way across in popout mode.

Fix T1825 - switch to a more attractive "June 4, 2015 at 3:10 PM" styling for expanded dates

Remove, rather than hide, react components for text fields in composer. Fixes T1147

Fix specs

Switch to 999+ instead of infinity. Fixes T1768

Fix broken TemplateStore specs

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1147, T1768, T1822, T1800, T1825

Differential Revision: https://phab.nylas.com/D1601
2015-06-05 11:02:44 -07:00
Ben Gotow e303705b45 feat(*): draft icon, misc fixes, and WorkspaceStore / custom toolbar in secondary windows
Summary:
Features:
- ThreadListParticipants ignores drafts when computing participants, renders "Draft" label, pending design

- Put the WorkspaceStore in every window—means they all get toolbars and custom gumdrop icons on Mac OS X

Bug Fixes:

- Never display notifications for email the user just sent

- Fix obscure issue with DatabaseView trying to update metadata on items it froze. This resolves issue with names remaining bold after marking as read, drafts not appearing in message list immediately.

- When you pop out a draft, save it first and *wait* for the commit() promise to succeed.

- If you scroll very fast, you node.contentWindow can be null in eventedIframe

Other:

Make it OK to re-register the same component

Make it possible to unregister a hot window

Break the Sheet Toolbar out into it's own file to make things manageable

Replace `package.windowPropsReceived` with a store-style model where anyone can listen for changes to `windowProps`

When I put the WorkspaceStore in every window, I ran into a problem because the package was no longer rendering an instance of the Composer, it was declaring a root sheet with a composer in it. This meant that it was actually a React component that needed to listen to window props, not the package itself.

`atom` is already an event emitter, so I added a `onWindowPropsReceived` hook so that components can listen to window props as if they were listening to a store. I think this might be more flexible than only broadcasting the props change event to packages.

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1592
2015-06-03 16:02:19 -07:00
Ben Gotow 01f83e4d83 fix(build): Temporarily disable 'Task' tests Jenkins can't run, and avoid empty ui-variables files 2015-06-03 12:04:43 -07:00
Ben Gotow 40c3de5590 fix(fakt): Switch to otf fonts with correct baseline, remove hacky styles 2015-06-03 11:07:59 -07:00
Ben Gotow 3f8486547a add(specs): Empty folders and node_modules in spec fixture to fix specs 2015-06-03 10:23:54 -07:00
Ben Gotow f82e6da9c0 add(specs): +101 specs and 403 assertions from Atom 2015-06-02 19:51:00 -07:00
Ben Gotow a3b45cf33a feature(package-management): Package management interface, APM integration
Summary:
Update a few more packages to deactivate properly

Miscelaneous fixes

Initial commit of new settings package

WIP

WIP - can load and unload and install / uninstall

Click to create new boilerplate package, package updating

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1582
2015-06-02 19:04:21 -07:00
Ben Gotow 215dbbd3f3 fix(focus): When composing a forward, focus on the To field.
Summary:
fix specs

This functionality used to work but `component` isn't defined and focus: was failing. Added specs to make sure this doesn't happen again.

Test Plan: Run new specs

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1583
2015-06-01 15:12:18 -07:00
Evan Morikawa 28a6668567 Fixes T1751: Make sure composer can't send twice
Summary:
Fixes T1751
Since there's time between clicking "send" and the draft appearing on the
TaskQueue (which is what we use to determine sending state declaratively)
it's possible for it to send twice.

I opted to use `setState` at the Composer View level since I don't think
we should debouce the Action or the Store. It's totally fine for a script
to queue a bunch of messages to send via the queue. We really just want to
stop it at the user intaction level.

Test Plan: There's a test for this now in the composer-spec

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1751

Differential Revision: https://phab.nylas.com/D1576
2015-06-01 11:24:32 -04:00
Ben Gotow 9b37bfe4cb 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
Evan Morikawa ac1ad67123 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
Evan Morikawa f399e76408 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 a7da51617c fix(notifications): Give notifications tag like HTML5 Notifications so you can de-dupe 2015-05-25 10:27:36 -07:00
Ben Gotow a7740559d2 fix(spellchecking): Turn off spellcheck on email fields 2015-05-22 17:04:37 -07:00
Ben Gotow b194d7fb37 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 7bd3f7ac78 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 e198c4f6c4 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 9d18b1e1d5 Fixes T1344: composer links fixed 2015-05-20 10:22:03 -07:00
Ben Gotow 4a4872ec27 fix(archive): Remove optimizations that were breaking archive... 2015-05-19 19:23:34 -07:00
Ben Gotow e177746006 fix(developer-bar-store): Merge conflict not resolved 2015-05-19 17:22:00 -07:00
Ben Gotow 8133cc88d6 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 3807831826 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 fc4b3b56d7 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 0efdec5fd5 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 a265b54f48 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 ae41c94e42 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 684a8ef4c0 [naming] Nylas Mail => Nylas, Nilas => Nylas 2015-05-18 19:21:54 -07:00
Evan Morikawa a237d69327 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 e96f242121 InboxAPI => NylasAPI 2015-05-15 11:12:03 -07:00
Ben Gotow 7abf5a480b 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 9378f4480c 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 dc9e8dc8af 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 4f4e7f802d 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 0e0f296866 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 96ead235ff 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 214c8b2aaa 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
Ben Gotow 9a0c3a245e fix(thread-list): Archive performance improvements, white rows fix
Summary:
Debounce changes out of the DatabaseStore to prevent lots of calls to persistModel from flooding the app

Tasks must always call super so they get IDs

The task queue shouldn't save every time it adds/removes a task - there could be hundreds

ActivityBar package is actually surprisingly slow, re-rendering needlessly

setState in MultiselectList sometimes renders immediately. Don't do this, because sometimes we're rendering twice back to back

Remove dead references

Never allow duplicate tags in the tags array

Don't archive threads that already have the archive tag (it doesn't do anything bad, but why bother creating tasks?)

Update DB specs

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1506
2015-05-14 14:12:53 -07:00
Ben Gotow 5b7ae0ad54 feat(tags): Tags dropdown and new features for Menu and Popover
Summary:
Focused Content Store should notify observers when focused items change, not just when they're reassigned

Popovers should have a `direction` and optional event onOpened

Menu divider documentation was wrong, menus should support checked items by default

Pressing escape in a popover's input should dismiss the popover

Other changes

Remove specs that make no sense anymore

Small tweak to report build breaking. Shouldn't happen often ;)

Test Plan: Run tests, which will now phone home if they break

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1493
2015-05-13 12:01:41 -07:00
Ben Gotow 7edafa3819 feat(docs): doc site generation, doc organization into sections, docs for actions and more
Summary: Lots o docs

Test Plan: Run tests, review docs

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1496
2015-05-13 11:44:28 -07:00
Evan Morikawa 27c177dc2f fix(search): can search with a colon character
Summary:
Fixes T1127

For now, colons are taken literally. This means you can't type scoped
searches. This will likely change when search gets re-designed

Test Plan:
SearchBar.cjsx got a test for this. The class needs more tests
edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg

Maniphest Tasks: T1127

Differential Revision: https://review.inboxapp.com/D1490
2015-05-11 18:07:58 -07:00