Commit graph

945 commits

Author SHA1 Message Date
Juan Tejada a6c44b8529 feat(system-tray): add system-tray package
Summary:
- Updates support for ES6 code inside packages
- Displays system tray icon with unread count on darwin, or with bubble on other platforms
- Uses canvas api to dynamically generate icon image given unread count:
  - Adds CavasUtils.canvasFromImgAndText to do this
- Adds config option to display system tray icon on darwin

Test Plan: Need to write the tests for this.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2231
2015-11-06 11:12:38 -08:00
Ben Gotow dc538930a7 fix(search): Allow typing in the middle of the search text 2015-11-04 17:11:40 -08:00
Ben Gotow c1bf8ae026 fix(deltas): Use the official API to create cursors 2015-10-30 22:20:41 -07:00
Evan Morikawa eea25a307d fix(composer): support Chinese & others - handle composition events
Summary:
ignores composition event commands until they're done. We then simply
update the new state after that happens.

Some additional refactoring:

- The <Contenteditable /> prop is 'value' instead of 'html' to make it
  look more like a standard React controlled input
- Removed `filters` prop and `footerElements` prop from Contenteditable.
  These could easily be moved into the composer (where they belong).
- Moved contenteditable and a few of its helper classes into their own
  folder.
- Moved `UndoManager` up out of the `flux` folder into `src`. Currently
  undo/redo is only in the composer when all contenteditables should have
  the basic funcionality. Will refactor this later.
- Fix tests

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2211
2015-10-30 20:03:33 -04:00
Ben Gotow 6bee127134 feat(shortcuts): Pageup/dn in message list, shift+pageup/dn in thread list 2015-10-29 20:34:43 -07:00
Ben Gotow 538af665cf fix(sp): It's => its 2015-10-29 19:35:31 -07:00
Evan Morikawa cc61aa7811 feat(signatures): add signature support in preferences
Summary:
Adding signature support in preferences

Extracting out DraftStore extensions from the Contenteditable component

Moved Contenteditable to the nylas component kit

Build react remote window selection synchronization.

Test Plan: todo

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2204
2015-10-29 17:20:41 -04:00
Ben Gotow 62d45698d1 fix(thread-list): Line up sender, subject and snippet
Fixes GitHub issue #278
2015-10-29 11:30:06 -07:00
Ben Gotow 29cc5853b3 feat(notifs): Native notifications for Mac OS X, Win coming
Summary: Replaces `new Notification`-based HTML5 notifications with system native notifications on Mac OS X. This allows us to implement the "Reply" button in the notifications. This will also serve as the hook for native Windows notifications, which are unsupported in Chromium.

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2199
2015-10-29 11:23:51 -07:00
Ben Gotow 8f13b71403 fix(notifs): Make sure notifs always have thread references
Summary:
This started as a fix to https://sentry.nylas.com/sentry/edgehill/group/2970/, which was caused by `threads[msg.threadId]?.categoryNamed('inbox') isnt null`, because `undefined isnt null`.

Then I realized that we batch "incoming" messages and threads arbitrarily, and the reason this happened is because the thread and message were split into different delta updates. Previously, notifications would just have been skipped.

Now we call `_onNewMessagesMissingThreads` when threads cannot be found for new messages, and then try to find the threads again in 10 seconds. If we can find them, we simulate a delta call and run them back through the processor. It would have been simpler to call `_onNewMailReceived` again directly, but I want to be 100% sure we never create infinite loops.

Test Plan: Run new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2188
2015-10-28 16:55:35 -07:00
Evan Morikawa 985a8b55fe fix(ui): better unread count box
Smaller box that sits next to item.
Drafts is now no longer a strong color
Fixes T3535
2015-10-28 18:50:04 -04:00
Ben Gotow 6bbe9308cf fix(notifications): Buttons always triggered default action 2015-10-28 10:47:44 -07:00
Ben Gotow edaf751c3b feat(changelog): Link to changelog before and after updates
Summary: Link to the changelog, and add a new notification which appears after updates are installed

Test Plan: No tests to see here..

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2201
2015-10-27 16:48:05 -07:00
Ben Gotow 08e2e7581a fix(onboarding): Check code format before hitting API 2015-10-27 16:43:07 -07:00
Ben Gotow 0ff48ca9a6 rm(composer): Dead code related to Scribe / Bower 2015-10-27 11:38:39 -07:00
Ben Gotow 43c43a6bf5 fix(search): New X, focus styling for search
Fixes T3485
2015-10-27 11:28:11 -07:00
Ben Gotow 69e4ba32ac fix(files): Not-yet-downloaded files can be opened via double click
Fixes T4840
2015-10-27 11:05:33 -07:00
Ben Gotow 703b9decfa fix(onboarding): Request /status/ to avoid 302 2015-10-27 10:50:18 -07:00
Ben Gotow 2ddfb1595a fix(prefs): Fix overflow of account names. #175 2015-10-26 10:47:47 -07:00
Ben Gotow 09ed1ea415 fix(prefs): Guard against null account in preferences window 2015-10-26 10:47:47 -07:00
Ben Gotow 5c5c1e98c1 fix(drafts): Draft selection / deletion fixes 2015-10-23 16:04:27 -07:00
Ben Gotow 528224a184 fix(sidebar): Better disclosure triangle position on multiline labels / folders 2015-10-23 16:04:27 -07:00
Evan Morikawa 7711ec533e fix(onboarding): fix add account button width 2015-10-23 15:21:58 -07:00
Ben Gotow 992b90d969 fix(message-list): Clicking Archive or Trash should pop back to the thread list 2015-10-23 15:21:37 -07:00
Ben Gotow e9141a44ec fix(plugins): Packages => Plugins in a few more places 2015-10-23 15:14:44 -07:00
Evan Morikawa cc95662adc fix(win): composer and input styles 2015-10-23 15:04:35 -07:00
Ben Gotow aeb756cb27 fix(undo-redo): Fix "undo" button clickability, improve animation 2015-10-23 15:03:12 -07:00
Ben Gotow cb50b3700b fix(list): Additional focused CSS changes 2015-10-23 14:55:07 -07:00
Ben Gotow 29fdd3024a fix(threads): Show the archive button in the bulk action bar 2015-10-23 14:50:39 -07:00
Evan Morikawa 45466a18b0 fix(archive): can archive and trash from focused message 2015-10-23 14:49:29 -07:00
Ben Gotow 096e829f33 fix(list): Incorrect snippet color on unread selected threads in narrow mode 2015-10-23 12:54:02 -07:00
Ben Gotow a84e1b3db4 fix(keymaps): Reveal keymap.cson rather than opening 2015-10-23 12:49:14 -07:00
Ben Gotow 316d460288 fix(thread-list): Better hover state for quick actions 2015-10-23 12:47:32 -07:00
Evan Morikawa 4b7a3264bd fix(windows): fix apm package loading and onboarding styles 2015-10-23 12:18:00 -07:00
Ben Gotow 5c57817ee6 fix(onboarding): Do not open plugin folders after install 2015-10-23 11:58:33 -07:00
Ben Gotow 7d45b1ec97 fix(onboarding): Replace ❤️ with a heart image for win32 2015-10-23 11:42:55 -07:00
Ben Gotow 256330c3cb fix(onboarding): Fix size animation, resolves #150 2015-10-23 11:35:13 -07:00
Ben Gotow 404d0d2ec3 Merge pull request #121 from madhugb/master
Fixed a pixel cut in floating-toolbar
2015-10-23 09:54:39 -07:00
Ben Gotow acc0c18bc6 fix(drafts): Fix missing import, resolves Sentry 4041 2015-10-22 16:13:37 -07:00
Ben Gotow 084fcb53e4 fix(spellcheck): Fix dead code, resolve Sentry 3594 2015-10-22 16:08:03 -07:00
Evan Morikawa e9acc3d315 fix(event): remove EventStore
Summary:
The EventStore was really doing nothing, except caching hundreds of MB of
event data unnecessarily in each and every window :(

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2187
2015-10-22 14:14:58 -07:00
Ben Gotow 9ff6c4912c fix(feedback): Links should open in the user's default browser 2015-10-22 11:34:51 -07:00
Ben Gotow a83201ef7e feat(sidebar): Hierarchical folders/labels in the sidebar, rendering perf
Summary:
Fix label sorting... apparently we just synced them in creation date order

Allow labels / folders to be nested using separators `.`, `/`, and `\`

Allow collapsing of nested labels in sidebar

Add overflow hidden to some core flexboxes, which dramatically reduces repaints because it knows columns will not overflow into other columns

Prevent scroll region contents from re-rendering all the time, not sure why this works

Add test for account sidebar store

Test Plan: Run new test of AccountSidebarStore

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2181
2015-10-22 10:53:57 -07:00
Ben Gotow 53137a9bfa fix(onboarding): Correct error where token pane is too small 2015-10-22 10:32:20 -07:00
Madhu GB 7122d22da9 A pixel cut in floating-toolbar 2015-10-22 11:18:55 +05:30
Evan Morikawa e8c4790d40 fix(lint): fix indentation linter error 2015-10-21 20:39:05 -07:00
Evan Morikawa 2500e52179 feat(windows): improve UI for Windows
Remove rounded corners and gradients
2015-10-21 20:32:33 -07:00
Evan Morikawa 134702805d feat(windows): upgarade preferences UI on Windows 2015-10-21 17:28:52 -07:00
Ben Gotow 2afbc0a6bd fix(empty-state): Subpixel animation via translate3d 2015-10-21 14:52:50 -07:00
Ben Gotow 05e24838bd Merge pull request #109 from NSHenry/master
feat(onboarding): Optional eas_server_host field for Exchange auth
2015-10-21 14:38:17 -07:00
Ben Gotow 2ec22dda5a fix(account-switcher): Chevron icon was upside-down 2015-10-21 14:12:27 -07:00
Ben Gotow d4a3c1dad9 Merge pull request #113 from agudulin/master
style(*): Add styles for <select> elements, override system defaults
2015-10-21 13:56:16 -07:00
Evan Morikawa 8808a821f8 feat(win32): improve button styles for Win 8.1 spec 2015-10-21 12:17:34 -07:00
Ben Gotow 392ba542b1 fix(category): Consolidate logic around "archive" vs" all" 2015-10-21 11:58:06 -07:00
Ben Gotow b963688455 fix(art): Correct "Trash" icon, naming consistency 2015-10-21 11:58:05 -07:00
Alexander Gudulin 60a8ec96e9 Revert back container width, fix controls align 2015-10-21 21:52:04 +03:00
Evan Morikawa 1fc6dfc38a feat(tooltip): use native tooltip style 2015-10-21 11:27:57 -07:00
Alexander Gudulin d8b18b9adf Setup styles for dropdown (select) control 2015-10-21 21:27:53 +03:00
Ben Gotow 98a2464e0f fix(specs): Unbreak tests for CategoryPicker 2015-10-21 10:57:42 -07:00
Ben Gotow 4f34c8403f feat(trash): Trash for Gmail, and architectural changes for common tasks
Summary:
This diff centralizes logic for creating common tasks for things like moving to trash, archive, etc. TaskFactory exposes a set of convenience methods and hides the whole "and also remove the current label" business from the user.

This diff also formally separates the concept of "moving to trash" and "archiving" so that "remove" isn't used in an unclear way.

I also refactored where selection is managed. Previously you'd fire some action like archiveSelection and it'd clear the selection, but if you selected some items and used another method to archive a few, they were still selected. The selection is now bound to the ModelView as intended, so if items are removed from the modelView, they are removed from it's attached selection. This means that it shouldn't /technically/ be possible to have selected items which are not in view.

I haven't refactored the tests yet. They are likely broken...

Fix next/prev logic

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2157
2015-10-21 10:38:00 -07:00
Ben Gotow f7c6ae0774 fix(toolbars): Cross disolve toolbar items on a one-off basis
Summary:
This diff removes the timeout transition group from the sheet-toolbar, which was causing toolbar items to fade when columns were opened / closed and they were moved from column to column.

Instead, I'm just animating the message toolbar items, which are one of the few sets of toolbar items that really should fade, and do so as an entire set.

I've also renamed the "sheet-toolbar" animation to "opacity-125ms". I think it'd be cool to create a standard set of these animations, but I didn't see any others it would make sense to create generic names for yet. (The others have weird timings or are bound up inside packages).

Resolves Github #90

Test Plan: No new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2159
2015-10-21 10:34:14 -07:00
Evan Morikawa 531118ac5c fix(tasks): don't continue if dependent task fails
Summary:
Fixes T4291

If I made a final edit to a pre-existing draft and sent, we'd queue a
`SyncbackDraftTask` before a `SendDraftTask`. This is important because
since we have a valid draft `server_id`, the `SendDraftTask` will send by
server_id, not by POSTing the whole body.

If the `SyncbackDraftTask` fails, then we had a very serious issue whereby
the `SendDraftTask` would keep on sending. Unfortunately the server never
got the latest changes and sent the wrong version of the draft. This
incorrect version would show up later when the `/send` endpoint returned
the message that got actually sent.

The solution was to make any queued `SendDraftTask` fail if a dependent
`SyncbackDraftTask` failed.

This meant we needed to make the requirements for `shouldWaitForTask`
stricter, and block if tasks failed.

Unfortunatley there was no infrastructure in place to do this.

The first change was to change `shouldWaitForTask` to `isDependentTask`.
If we're going to fail when a dependent task fails, I wanted the method
name to reflect this.

Now, if a dependent task fails, we recursively check the dependency tree
(and check for cycles) and `dequeue` anything that needed that to succeed.

I chose `dequeue` as the default action because it seemed as though all
current uses of `shouldWaitForTask` really should bail if their
dependencies fail. It's possible you don't want your task dequeued in this
dependency case. You can return the special `Task.DO_NOT_DEQUEUE_ME`
constant from the `onDependentTaskError` method.

When a task gets dequeued because of the reason above, the
`onDependentTaskError` callback gets fired. This gives tasks like the
`SendDraftTask` a chance to notify the user that it bailed. Not all tasks
need to notify.

The next big issue was a better way to determine if a task truely errored
to the point that we need to dequeue dependencies. In the Developer Status
area we were showing tasks that had errored as "Green" because we caught
the error and resolved with `Task.Status.Finished`. This used to be fine
since nothing life-or-death cared if a task errored or not. Now that it
might cause abortions down the line, we needed a more robust method then
this.

For one I changed `Task.Status.Finished` to a variety of finish types
including `Task.Status.Success`. The way you "error" out is to `throw` or
`Promise.reject` an `Error` object from the `performRemote` method. This
allows us to propagate API errors up, and acts as a safety net that can
catch any malformed code or unexpected responses.

The developer bar now shows a much richer set of statuses instead of a
binary one, which was REALLY helpful in debugging this. We also record
when a Task got dequeued because of the conditions introduced here.

Once all this was working we still had an issue of sending old drafts.

If after a `SyncbackDraftTask` failed, now we'd block the send and notify
the users as such. However, if we tried to send again, there was a
separate issue whereby we wouldn't queue another `SyncbackDraftTask` to
update the server with the latest information. Since our changes were
persisted to the DB, we thought we had no changes, and therefore didn't
need to queue a `SyncbackDraftTask`.

The fix to this is to always force the creation of a `SyncbackDraftTask`
before send regardless of the state of the `DraftStoreProxy`.

Test Plan: new tests. Lots of manual testing

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg

Maniphest Tasks: T4291

Differential Revision: https://phab.nylas.com/D2156
2015-10-21 10:33:43 -07:00
Nate Henry 3d8bf1e199 Added eas_server_host field
eas_server_host field added to allow for specifying the Exchange server
if necessary.
2015-10-21 11:33:11 -04:00
Ben Gotow 8c2f27c103 fix(thread-list): stop thread-icons from shrinking, justify participants explicitly 2015-10-14 18:05:29 -07:00
Ben Gotow aca9de07d9 fix(config): new mail sounds on by default, change config keypath
unread-notifications.sounds => core.notifications.sounds
2015-10-14 17:11:36 -07:00
Ben Gotow 87bb79fcc2 fix(sidebar): Prevent white top border in all scenarios 2015-10-12 11:14:44 -07:00
Ben Gotow 12382e1c41 fix(sidebar): Remove top margin causing white border 2015-10-12 11:04:27 -07:00
Ben Gotow 2d53d65959 fix(feedback): Make button slightly smaller, less obtrusive 2015-10-12 11:04:27 -07:00
Ben Gotow b1c3ab2e10 fix(thread-list): Enable drag and drop in narrow view 2015-10-12 11:04:27 -07:00
Ben Gotow 20204bf377 fix(intercom): Badge the intercom button, don't use safe-ipc 2015-10-09 16:12:52 -07:00
Evan Morikawa 8755786d90 fix(theme): more consistent styles for dark-mode theme 2015-10-09 16:05:26 -07:00
Ben Gotow 83f9f0e4ff fix(specs): ContactStore spec fixes for new contact ranking support 2015-10-09 13:42:24 -07:00
Drew Regitsky 0332d7264e fix(contacts): move contact rank fetching to sync workers, refactor
Summary:
Fixes bug where contact ranking was not being fetched, and refactors the refreshing
of contact ranks. Moves periodic refreshing of the database-stored ranks to the sync
workers so it occurs in the background, once per account. Refactors JSON cache code
accordingly.

Test Plan: manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2137
2015-10-09 12:40:36 -07:00
Evan Morikawa eb0a915bc2 Fix scrollability in expanded activity sidebar
Summary:
If your screen is narrow or you are syncing a lot of stuff, the expanded
activity sidebar had no scroll affordance

Test Plan: manual

Reviewers: drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2135
2015-10-09 09:31:37 -07:00
Ben Gotow 215fa0e4cb fix(initial-sync): When an error is encountered, do not start fetching from zero again
Summary:
Previously, when an error was encountered during initial mailbox sync we just started it
over after a retry delay. Recent API uptime issues mean that this was happening often and lots of
people were seeing sync retry many times. This is bad because the app is less performant while
it's syncing mail, and also generates unnecessary load as the app re-fetches threads it already has.

In this diff, there are new specs and functionality in nylas-sync-worker to start fetching
where we left off. This is typically going to be OK because the default sort ordering of the
threads endpoint is newest->oldest, so if new items have arrived since we started fetching
and page boundaries have changed, we'll get duplicate data rather than missing data. Connceting
to the streaming API as soon as we start the sync also ensures that we roll up any changes to
data we've already paginated over.

Test Plan: Run tests

Reviewers: drew, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2132
2015-10-08 19:02:54 -07:00
Evan Morikawa b0e7769e94 fix(developer): visual improvements to developer bar
Summary: Make ETIMEDOUT red

Test Plan: manual

Reviewers: bengotow, dillon

Reviewed By: dillon

Differential Revision: https://phab.nylas.com/D2126
2015-10-07 17:28:45 -07:00
Drew Regitsky 09b91a0a28 feature(feedback): move feedback to a package, indicator for new msgs
Summary: Move all Intercom feedback code to a package. Change the appearance of the lower right question mark icon when a new intercom message is received (red, with repeating CSS bounce animation). New messages are detected by keeping the intercom window open (after the first time it's opened by the user), and listening for DOM mutations of particular classes.

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: evan

Differential Revision: https://phab.nylas.com/D2125
2015-10-07 13:55:54 -07:00
Ben Gotow 5a2ddb67d5 fix(auth): Resize the auth window after an update to the token status 2015-10-06 17:58:07 -07:00
Drew Regitsky 62fb708797 fix(onboarding): fix error handling for invalid account data from server
Summary:
Change `addAccountFromJSON` in `AccountStore` to throw an exception when it encounters
invalid data, instead of calling `atom.emitError()`. Just calling `emitError` doesn't
throw an exception, so the code proceeds as if an account has been added. Instead, call
`emitError` from AccountSettingsPage, and display an error message to the user.

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: evan

Differential Revision: https://phab.nylas.com/D2116
2015-10-05 17:31:29 -07:00
Ben Gotow b38ca54b45 fix(specs): Clean up spec failures due to hot fixes prior to launch 2015-10-05 16:45:30 -07:00
Michael Grinich 1772a43878 actually no more gh-pages 2015-10-05 05:08:53 -07:00
Ben Gotow 90db758863 fix(auth): Rename edgehill.token => invitationCode in config 2015-10-05 03:34:11 -07:00
Ben Gotow 0a891ba8c6 fix(auth): Merge but temporarily disable encrpytion during Gmail Oauth 2015-10-05 03:27:28 -07:00
Ben Gotow c1b4596bbe fix(onboarding): Packages => plugins, at least in the text 2015-10-05 02:07:10 -07:00
Evan Morikawa d09d292382 fix(styles): padding fixes 2015-10-05 00:38:48 -07:00
Ben Gotow cef0933d0c disable(events): Turn off the events package until it can be polished 2015-10-04 16:57:43 -07:00
Ben Gotow b139556409 fix(lint): Indentation causing linter failures 2015-10-04 16:53:39 -07:00
Ben Gotow 467955dc2c fix(onboarding): Invitation code system, just in case
commit 64938016f6ffbf366a220e7abd9af6f7a4cb478b
Author: Ben Gotow <bengotow@gmail.com>
Date:   Sun Oct 4 16:42:38 2015 -0700

    Don't allow people to double click the token check button, make requests take at least 400msec

commit e548f3ee449c676a813c5630f1624963872ed6e6
Merge: 3350b91 e4b4933
Author: Ben Gotow <bengotow@gmail.com>
Date:   Sun Oct 4 16:39:56 2015 -0700

    Merge branch 'token-auth' of github.com:nylas/N1 into token-auth

    # Conflicts:
    #	internal_packages/onboarding/lib/token-auth-page.cjsx

commit 3350b917449c29299fa078d59a4a5a9339fdf29b
Author: Ben Gotow <bengotow@gmail.com>
Date:   Sun Oct 4 16:38:52 2015 -0700

    Improve a few error states, adding "checking" state when checking token

commit e4b49334cbf59145d9bdd955d35636f16a7c4924
Author: EthanBlackburn <ethan@nylas.com>
Date:   Sun Oct 4 16:21:39 2015 -0700

    Correct retry behavior

commit 11cd9a75b2a1ca0f4347160df93815743909ccea
Author: EthanBlackburn <ethan@nylas.com>
Date:   Sat Oct 3 18:06:55 2015 -0700

    Removed old auth token variable

commit afe451cd70de528def3443d8b373fd24f4aa5cde
Author: EthanBlackburn <ethan@nylas.com>
Date:   Sat Oct 3 16:08:12 2015 -0700

    Added token auth page
2015-10-04 16:49:41 -07:00
Ben Gotow 155af462a9 fix(timeouts): Wait 5 mintues before hanging up /send 2015-10-04 00:54:07 -07:00
Ben Gotow fe06835540 fix(notifications): Add a purple tint color for developer notification 2015-10-04 00:22:59 -07:00
Ben Gotow 4539cf2e24 fix(account-switcher): Switcher should not be part of the scroll region in the sidebar 2015-10-04 00:19:29 -07:00
Ben Gotow 308c70f53d fix(sync): Request all labels / folders to avoid paging and missing inbox 2015-10-03 23:53:59 -07:00
Ben Gotow 84c8e2f99d fix(icons): New artwork for a few initial packages, labels 2015-10-03 23:34:43 -07:00
Ben Gotow c25a3c7ea0 fix(sidebar): Make the sidebar labels slightly smaller 2015-10-03 23:00:34 -07:00
Ben Gotow 8a2d10d3bd fix(feedback): Change default window position, move handling to main window, hide close buttons in Intercom 2015-10-03 22:22:12 -07:00
Eben Freeman 01652ffb24 feat(feedback): intercom for feedback
Summary:
Caveat: If you submit feedback from one account, and then switch accounts and
submit feedback again, the data from the old account still gets passed. It
looks like that was true with the previous compose-a-draft-with-feedback action
too. Maybe you know how to fix this? I couldn't figure it out.

Test Plan: Try it out! Not sure how to usefully write specs.

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2106
2015-10-03 22:05:20 -07:00
Ben Gotow b79680f9cc fix(install-package): Point to the examples directory by default 2015-10-03 19:31:31 -07:00
Ben Gotow 31c7a330bf feat(dev-mode): Toggle dev mode, sticky through restarts 2015-10-03 19:04:19 -07:00
Ben Gotow cff7f8834e feat(plugins): Restore the plugins sidebar view 2015-10-03 18:11:36 -07:00
Ben Gotow 0a1ebd7d30 feat(templates): Final examples package is in - templates! 2015-10-03 14:05:47 -07:00
Evan Morikawa 9e41843fa4 fix(styles): fix fonts in settings and iframe 2015-10-02 17:48:36 -07:00
Evan Morikawa 71e90d2a61 fix(composer): composer doesn't jump with attachments
Summary: Fixes T3778

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Projects: #edgehill

Maniphest Tasks: T3778

Differential Revision: https://phab.nylas.com/D2102
2015-10-02 17:14:00 -07:00
Evan Morikawa 609b6107f9 feat(auth): add disabled state to forms when submitting
Summary: Fixes T3773

Test Plan: manual

Reviewers: drew, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3773

Differential Revision: https://phab.nylas.com/D2105
2015-10-02 17:10:49 -07:00
Evan Morikawa 39266026d1 fix(sounds): make sounds listen to config options
Summary: Fixes T3887

Test Plan: new specs

Reviewers: bengotow

Reviewed By: bengotow

Projects: #edgehill

Maniphest Tasks: T3887

Differential Revision: https://phab.nylas.com/D2104
2015-10-02 17:04:15 -07:00
Drew Regitsky 27c594f13f fix(onboarding): fix chrome render bug on startup 2015-10-02 16:52:00 -07:00
Drew Regitsky 1a3294f100 feat(onboarding): add hotmail as a provider
Summary:
Adds a button for hotmail/outlook as a provider. Username field is not
shown is set to the email address for submitting to Nylas.

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: evan

Differential Revision: https://phab.nylas.com/D2095
2015-10-02 16:12:08 -07:00
Drew Regitsky 05ed20e539 fix(welcome): small ui tweaks in welcome/onboarding
Summary: Change the white logo to have an inner shadow, and set to PreserveContent. Fix typo in welcome page. Tweak some text opacity for readability.

Test Plan: manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Subscribers: bengotow

Differential Revision: https://phab.nylas.com/D2090
2015-10-02 15:34:56 -07:00
Drew Regitsky 7d799b64e8 fix(onboarding): fix IMAP port fields, enter key behavior
Summary:
Fix issue where ports were being stored as strings - add a format field for
account settings that turns on casting to int when set to `integer`.

Change behavior of pressing enter - rather than always submitting, have it
move to the next page on multi-page account settings.

Test Plan: manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Subscribers: bengotow

Differential Revision: https://phab.nylas.com/D2094
2015-10-02 15:32:59 -07:00
Ben Gotow 88fdfd9a77 fix(specs): Fix specs for environment config 2015-10-02 15:31:05 -07:00
Ben Gotow d5a5cdd4eb switch(env): Move N1 to Nylas production API 2015-10-02 15:01:31 -07:00
Evan Morikawa 137e09eb51 refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
Evan Morikawa 339ce4395a feat(sounds): add new sound registry 2015-10-01 19:24:06 -07:00
Evan Morikawa 85eb94b90f fix(fonts): update fonts and styles 2015-10-01 17:55:11 -07:00
Ben Gotow e1d337ddd4 fix(send): Don't put a tooltip on the very obvious send button 2015-10-01 16:20:48 -07:00
Evan Morikawa ae69790024 feat(archive): shows trash for non-archive accounts
Summary:
Fixes T3570
Fixes T3737

Rename ArchiveThreadHelper to RemoveThreadHelper

Rename of `getRemovalTask`

Remove unarchive from `RemoveThreadHelper`. Pass in mailviewfilter

Rename actions

Rename archive action

renmaing

support trash and archive folders in RemoveThreadHelper

Move everything over to trash

add tests

Hide trash and archive

Test Plan: new tests

Reviewers: dillon, bengotow

Reviewed By: dillon, bengotow

Maniphest Tasks: T3570, T3737

Differential Revision: https://phab.nylas.com/D2089
2015-09-30 19:51:48 -07:00
Ben Gotow 4db5307c5f perf(toolbar): Remove rather than hide message toolbar items (incl. category picker) 2015-09-30 15:00:49 -07:00
Drew Regitsky d931862bcd fix(composer): Change text color of collapsed recipients
Change the color to be regular text, instead of the same color as
placeholder text.
2015-09-30 14:41:01 -07:00
Ben Gotow 44a235eb6f fix(account-switcher): Add Account > Manage Accounts 2015-09-30 12:29:56 -07:00
Ben Gotow ff9b25220e fix(category-picker): Better styles for long labels/folders 2015-09-30 12:07:00 -07:00
Ben Gotow 56374a6966 fix(auth): Allow enter/return to submit account settings form, animate button 2015-09-30 11:58:40 -07:00
Ben Gotow 93e29d01d8 fix(initial-packages): Pull from examples directory, include in ci builds 2015-09-30 11:43:06 -07:00
Evan Morikawa fccdb8792e feat(sync): request a smaller page size initially
Summary:
Check out:
https://docs.google.com/a/nylas.com/spreadsheets/d/1XdhBYi83cyRSLM1GYwPFp0neOl4jN_5BmDm5lWH77q0/edit?usp=sharing

Also work window loads immediately after we have account credentials

Test Plan: new tests

Reviewers: dillon, bengotow

Reviewed By: dillon, bengotow

Differential Revision: https://phab.nylas.com/D2083
2015-09-30 10:47:33 -07:00
Ben Gotow f44f84a583 fix(task-counts): In the activity box, show "Moving to folder... (4) = threads not task counts
Test Plan: Run tests

Reviewers: dillon, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2087
2015-09-30 09:54:14 -07:00
Ben Gotow 4e300015b5 fix(react-keys): ActivitySidebar had a few missing component keys 2015-09-30 00:35:45 -07:00
Ben Gotow 76cb33b3f6 feat(post-auth): Initial prefs + packages screens, welcome copy changes
Summary:
Package names must match directory names

Not going to use new Swithc component, but might as well be part of component kit

Move APMWrapper into core so it can be used from anywhere

Move manual package install coe to package-manager

Gray out window titles when in the background

Do not allow multiple onboarding windows at the same time

Finalize styling f initial-prefs and initial-packages, make it work (only github package atm)

Other nits

Change the welcome copy:

- Call it easy to extend vs easy to use
- Remove the subtitle from the first screen which doesn't really fit
- Make the second page emphasize that its created /for/ developers and easy to extend with Javascript.
- Explain what the sync engine is rather than saying it's "faster and more extensible" (??)

Test Plan: Run tests

Reviewers: evan, dillon

Reviewed By: evan

Maniphest Tasks: T3346

Differential Revision: https://phab.nylas.com/D2079
2015-09-29 23:58:30 -07:00
Ben Gotow e9879a5495 feat(feedback): Add blue feedback button in bottom left, remove dead code from DeveloperBarStore
Summary: Adds a prominent blue button to email us feedback

Test Plan: Run tests

Reviewers: dillon, evan

Reviewed By: dillon, evan

Differential Revision: https://phab.nylas.com/D2081
2015-09-29 23:20:23 -07:00
Ben Gotow ddb19420fa fix(composer): Do not unregister composer hot windows when a composer is closed 2015-09-29 10:15:37 -07:00
Ben Gotow 1a0292a37e fix(docs): Replace docs references to Edgehill with N1 2015-09-29 09:45:02 -07:00
Ben Gotow 1d9a34f5ea rename(Nylas Mail): Replace Nylas Mail > N1 2015-09-29 09:44:30 -07:00
Ben Gotow e00eda6e16 fix(lint): Bad 0px in onboarding.less 2015-09-28 10:26:58 -07:00
Evan Morikawa 0a788a187e fix(composer): fix to tabbing field with test
Summary: Fixes in tabbing and css updates in composer

Test Plan: new tests

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2075
2015-09-28 12:55:45 -04:00
Ben Gotow 4bdbba4b67 fix(toolbar-style): Tiny adjustmnts to better match Mac OS X Yosemite 2015-09-28 03:00:20 -07:00
Ben Gotow e7adc2d198 fix(thread-list): Focused / selected threads appear gray when window is blurred 2015-09-28 02:43:46 -07:00
Ben Gotow b18ef78239 fix(onboarding): Cleanup for recent commits to onboarding workflow. See description
- rm dead addAccount code that came back in a merge

- use command everywhere to open onboarding

- centralize close vs. quit logic in an OnboardingAction

- fix issue where the window size is calculated improperly because we have a padding value which is a fraction of height. In fact, remove no-top / padding-top 10% for good.
2015-09-28 02:12:35 -07:00
Ben Gotow b56769bbde fix(onboarding): Page content should remain centered when transitioning smaller 2015-09-28 01:52:55 -07:00
Ben Gotow aab2726caf fix(compression-priority): Make message list the flex column by giving it the largest max-width 2015-09-28 01:44:36 -07:00
Ben Gotow 7041ec1764 fix(delta-activity): Make the loading spinner slightly smaller 2015-09-28 01:37:25 -07:00
Ben Gotow 41b455d33e fix(developer-bar): Critical fixes to curl display
- Do not sort and then reverse the request history every time it's requested
- Do not allow the request history to grow forever (cap at 200)
- Do not stringify tasks until they're clicked
2015-09-27 23:43:59 -07:00
Eben Freeman 3f709b8b9c (fix)onboarding: Must pass approval_prompt=force for Google OAuth
Otherwise, if you've ever previously authorized your account against Edgehill's
Google client ID but need to reconnect it, the consent page is bypassed and no
refresh token is returned to the callback URL, breaking the rest of the flow.
2015-09-26 19:56:10 -07:00
Evan Morikawa 5e9b1612b6 feat(onboarding): improve onboarding flow
Summary:
Now with more CSS

Also fixed flow for when you're just adding an account

Fixes T3805

Test Plan: manual :(

Reviewers: drew, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3805

Differential Revision: https://phab.nylas.com/D2071
2015-09-25 20:43:36 -04:00
Evan Morikawa 8760de1b0e fix(composer): don't blur when adding a link
Summary:
Refactor focusing behavior in floating toolbar controller

Fixes T3781
Fixes T3791

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T3791, T3781

Differential Revision: https://phab.nylas.com/D2073
2015-09-25 16:14:01 -04:00
Evan Morikawa fc83f3cfab fix(gravatar): CSS fixes to gravatar 2015-09-25 11:32:42 -04:00
Ben Gotow db0ce9e63e polish(account-dropdown): Use CSS (vs styles) to hide/show switcher, animate with CSS 2015-09-24 19:07:50 -07:00
Ben Gotow 42ad243824 fix(message-sidebar): New ContactCard injectable role, updated FocusedContactStore
- The FocusedContactStore was triggering too often, and leaving it up to the FullcontactStore to fetch the full Contact model for the focused contact (pulled from thread.)

The FocusedContactStore triggers more responsibly, and registering for the role "MessageListSidebar:ContactCard" now gives you the focused contact as a full database model. The whole ContactCard region also fades in and out.
2015-09-24 18:58:53 -07:00
Ben Gotow c73bc940b9 fix(activity-sidebar): Minor style tweaks - CSS selectors for a few things were not in use 2015-09-24 15:32:23 -07:00
Ben Gotow 297320df94 fix(onboarding): Lots of changes to account management, dead code cleanup
Summary:
Better error handling in the account settings page and a loading spinner

Add Account... replaces "Link External Account", and it works

Clean dead code from onboarding pages, remove base class component

Always show the account switcher

rm dead EdgehillAPI code, AccountStore now manages accounts and credentials in config, not in database

Fix specs

Test Plan: Run tests

Reviewers: dillon, evan

Reviewed By: evan

Projects: #edgehill

Differential Revision: https://phab.nylas.com/D2059
2015-09-24 14:51:15 -07:00
Ben Gotow f85b5d60ac fix(debug-data): Do not include curl history in the feedback email 2015-09-24 12:18:37 -07:00
Evan Morikawa 17c6fd6e78 feat(sync): expanded details on sync status
Summary: Fixes T3574

Test Plan: manual

Reviewers: dillon, bengotow

Reviewed By: dillon, bengotow

Maniphest Tasks: T3574

Differential Revision: https://phab.nylas.com/D2058
2015-09-24 11:03:11 -07:00
Ben Gotow 899ce2a27a fix(window-serialization): Restore window size, remove cruft from atom.coffee
Summary: Simplify the default window size, restore window size when the main window is loaded, fix serialization of packages in beforeunload.

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2061
2015-09-24 10:40:38 -07:00
Ben Gotow f62fe26524 fix(thread-list): Use hasAttachments flag, fix bug where attachments icon did not appear in search results 2015-09-23 15:48:03 -07:00
Ben Gotow 3c26f1cba0 fix(thread-list): Pad the right edge of the thread list for the scrollbar 2015-09-23 15:47:21 -07:00
Evan Morikawa 1f4902660b fix(inbox): refetch labels and folders if the "inbox" label missing
Summary: Fixes T3559

Test Plan: new tests

Reviewers: bengotow, dillon

Reviewed By: dillon

Maniphest Tasks: T3559

Differential Revision: https://phab.nylas.com/D2052
2015-09-23 10:46:07 -07:00
Ben Gotow 213bbde692 fix(onboarding): Tweaks, styles, etc. for new onboarding experience
Summary:
Remove logout menu item and buttons, turn Link External Account to Add Account

Onboarding window starts hidden, is shown when react component is mounted and sized

Use get/setBounds to animate position and size at the same time smoothly

Fix specs, change 401 notice

Delay bouncing to Gmail to show users the Gmail screen momentarily

Make the animated resizing code defer so it doesn't run in a hard loop, and other animations can run at the same time

Bring back crossfade between screens, remove left/right shift on welcome screens

Test Plan: Run tests

Reviewers: drew, evan

Reviewed By: evan

Maniphest Tasks: T3529

Differential Revision: https://phab.nylas.com/D2054
2015-09-23 09:59:34 -07:00
Ben Gotow cbd90e78ab fix(onboarding): Remove dead login specs 2015-09-22 21:09:49 -07:00
Ben Gotow 75f1bbf259 feat(packages): "Developer > Install package..." runs apm install and copies to packages dir 2015-09-22 21:09:40 -07:00
Drew Regitsky 5533755b03 New onboarding flow, uses new Nylas auth
Summary:
Depends on D2049
This change replaces the onboarding flow to include new graphics, copy, and
support for the new Nylas auth flow. New account choosing UI presents a list
of account types, rather than guessing based on an entered email. Pages before
and after introduce the user to different features of the client.

Known issue: Polling for gmail account connection works, but continues even if
you leave the page.

Test Plan: Manual testing.

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2050
2015-09-22 20:11:51 -07:00
Evan Morikawa 0a89980fce fix(composer): fix bluring in contenteditable 2015-09-22 20:00:49 -07:00
Ben Gotow 7fd7db8aac fix(participants): replacemehts => replacements 2015-09-22 19:56:06 -07:00
Ben Gotow fd516d93c3 feat(events): Sync events during initial sync, request event deltas 2015-09-22 19:02:34 -07:00
Ben Gotow ff2b225d91 fix(thread-list-participants): Add a new failing test case + fix to the thread list participants
I had to make this less functional so that the token generation function could modify data in the output as it was created. Bust :(
2015-09-22 19:02:33 -07:00
Ben Gotow 7b391ec4f0 fix(package-template): Dependencies should be a hash 2015-09-22 19:02:33 -07:00
Evan Morikawa 2486bedafd fix(toolbar): state to toolbar visible 2015-09-22 18:50:25 -07:00
Evan Morikawa 091a100760 fix(specs): fix contenteditable and contact search specs 2015-09-22 16:40:33 -07:00
Evan Morikawa 3eba41b8d8 refactor(composer): update contenteditable functionality
Summary:
Fixes T3510
Fixes T3509
Fixes T3508
Fixes T3549

Extracted clipboard service

Remove unused style prop

Begin extracting quoted text from composer. Spec for clipboard service

Fix contenteditable specs

Begin to extract floating toolbar

Extract out DOMUtils and further extract floating toolbar

Further extracting domutils and floating toolbar

composer floating toolbar extracted

Fixes to hover and link states

Collapse adjacent ul lists

Fix outdent when deleting on a bulleted list

Fix bullet controls

Fixes to list creation and deletion

Add underline keyboard shortcut

Test Plan: manual :(

Reviewers: dillon, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3508, T3509, T3510, T3549

Differential Revision: https://phab.nylas.com/D2036
2015-09-22 16:02:44 -07:00
Evan Morikawa b3fc080f43 fix(contact): fix contacts completion in popout composers
Summary:
Fixes T3568

The composer windows had the wrong cache in their `ContactStore`s. Since
it's VERY expensive to repopulate a ContactStore's cache, we now have a
`WindowBridge` that allow you to, with a Promise, invoke methods on the
main window instead.

(Still need to fix some tests)

Test Plan: Fixed tests

Reviewers: dillon, bengotow

Reviewed By: dillon, bengotow

Maniphest Tasks: T3568

Differential Revision: https://phab.nylas.com/D2045
2015-09-22 15:32:27 -07:00
Ben Gotow a316518326 feat(account-sidebar): Ability to add custom items to the sidebar 2015-09-22 14:43:17 -07:00
dillon 3d84c41625 fix(activity-sidebar): render correct copy on only correct moments
Summary:
fixes T3725

changes:
- show the sync mail activity only if number of deltas received is greater than 10
- make the sync mail activity notification persist for longer, since large deltas (>1k) come in intervals of about 25 seconds, which was greater than our previous timeout interval of 15 seconds
- change to clearer copy
- minor style changes to match new copy

Test Plan: tested manually

Reviewers: bengotow

Maniphest Tasks: T3725

Differential Revision: https://phab.nylas.com/D2051
2015-09-22 14:05:26 -07:00
Drew Regitsky 48bf2183ed change styles to center injected thread icons on rows 2015-09-21 18:17:05 -07:00
Ben Gotow cb165bc91b feat(thread-list): Create custom icon components via role: ThreadListIcon 2015-09-21 16:21:57 -07:00
Ben Gotow 52e11c8768 fix(sidebar): Turn sheet support back on 2015-09-21 14:24:17 -07:00
Ben Gotow 2312bb60a4 fix(thread-list-actions): Fix bad return [] 2015-09-21 14:15:57 -07:00
dillon 6608b21da9 fix(NUX): show when initial sync is taking place
Summary:
fixes T3563

todo
[x] check with @bengotow and @evan -- does this solution make sense to you?
[x] decide on the actual visual cue to the user -- @bengotow you suggested a loader or spinner, but i was thinking that actual copy should be used so it doesn't look like an unhelpful spinner which goes indefinitely. what do you think of the copy here?
[ ] implement spinner similar to sending a draft
[ ] write tests
[ ] verify that we're showing progress in a helpful way

problem
- new users would see nothing in edgehill after they log in, with no indication on why they can't see any of their mail
- in actuality, our backend is actively pulling all their mail to serve it to edgehill
- new users think edgehill is broken because they're unaware of the work that our backend was doing

solution
- when the backend sends deltas to edgehill, we show a message in the activity bar saying that we're trying to get their mail
- we'll show the sync progress

Test Plan: still need to add tests. all previous tests still green.

Reviewers: bengotow, evan

Subscribers: sdw, bengotow, evan

Maniphest Tasks: T3563

Differential Revision: https://phab.nylas.com/D2032
2015-09-18 16:15:15 -07:00
Evan Morikawa 314ebc37c7 fix(quick-actions): change styles and only archie/trash
Summary: Fixes T2875

Test Plan: manual

Reviewers: bengotow, dillon

Reviewed By: dillon

Maniphest Tasks: T2875

Differential Revision: https://phab.nylas.com/D2041
2015-09-18 17:43:49 -04:00
Ben Gotow c7ba9c32bb fix(networking): Don't include entire response body in didMakeAPIRequest
Summary: Fixes T3625

Test Plan: Easy to test by opening/closing reply options dropdown as a large image attachment is downloaded

Reviewers: evan, dillon

Reviewed By: dillon

Maniphest Tasks: T3625

Differential Revision: https://phab.nylas.com/D2034
2015-09-18 11:18:26 -07:00
dillon 267a719016 fix(toolbar): swap mark-as-unread and archive buttons
Summary:
fixes T3628

problem
- mark-as-read button was in most prominent location
- archive button is most used button, but unfortunately in less prominent location
- user is annoyed at inconvenient real estate allocation

Test Plan: tested manually for regressions. all previous tests still green.

Reviewers: bengotow

Maniphest Tasks: T3628

Differential Revision: https://phab.nylas.com/D2033
2015-09-16 17:48:56 -07:00
Evan Morikawa 36de6075f9 fix(database): add DatabaseStore.atomically to handle read/write issues
Summary:
Fixes T3566
Fixes T3567

Test Plan: new tests

Reviewers: dillon, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3566, T3567

Differential Revision: https://phab.nylas.com/D2025
2015-09-15 20:27:52 -04:00
dillon 4e6b4f4c9c feat(toggle-unread): threads can now toggle their unread status. fixes T3483.
Summary:
still WIP, but functionality is there.

TODO:
[x] write tests
[x] swap out the current markasread icon for the correct markasread icon that @sdw is making
[x] figure out how to address this point by @bengotow: https://phab.nylas.com/D2024?id=19139#inline-12168

Test Plan: tested manually. still need to write tests though.

Reviewers: evan, bengotow

Reviewed By: bengotow

Subscribers: sdw

Maniphest Tasks: T3483

Differential Revision: https://phab.nylas.com/D2024
2015-09-15 16:49:16 -07:00
dillon 9c7259227d feat(account-sidebar): move account switcher from the side to the top of the account sidebar. fixes T3546.
Summary: ready for final code review! @evan @bengotow

Test Plan: added some tests for the account switcher

Reviewers: evan, bengotow

Reviewed By: evan, bengotow

Maniphest Tasks: T3546

Differential Revision: https://phab.nylas.com/D2016
2015-09-14 15:05:33 -07:00
Ben Gotow 4274753271 fix(sync-worker): Never paginate faster than 1 page per 1.5sec
This should prevent us from flooding the app with contacts (/contacts responds very quickly). Fixes T3475
2015-09-14 13:30:51 -07:00
Evan Morikawa b761afe960 fix(reply): better coverge for reply-all participants
Summary:
Fixes: T3550
Fixes: T3504

Test Plan: many of them

Reviewers: dillon, bengotow

Reviewed By: dillon, bengotow

Subscribers: mg

Differential Revision: https://phab.nylas.com/D2017
2015-09-14 16:18:55 -04:00
Evan Morikawa 91ccc940a6 fix(composer): fix popout composer and add spec 2015-09-14 16:12:28 -04:00
dillon 00839e37aa feat(account-sidebar): mail activity box now transitions in and out. fixes T3519.
Test Plan: tested manually, all tests still green

Reviewers: evan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3572, T3519

Differential Revision: https://phab.nylas.com/D2014
2015-09-14 11:04:24 -07:00
Evan Morikawa c03a63b9ea feat(composer): participants collapse
Summary:
Participants now collapse Gmail style in the composer field.

New, more declarative system for how we deal with "focusedFields" on the
composer.

Extracted a `CollapsedParticipants` and `ExpandedParticipants` component.

Test Plan: TODO

Reviewers: dillon, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2013
2015-09-14 10:37:00 -04:00
Ben Gotow 9bce73fb48 fix(toolbar): Don't close the floating toolbar when clicking in the link input
This is a bit of a quick and dirty fix, but fixes T3511
2015-09-11 16:10:20 -07:00
Ben Gotow 525e1419e3 fix(offline): /Generally/ a timeout is a temporary error code. Only SendDraftTask should bail and tell the user the draft failed to send 2015-09-11 15:14:52 -07:00
Ben Gotow be103b22bf tweak(win32): Hide the app menu on Windows, show in a right-side button instead 2015-09-11 14:49:26 -07:00
Ben Gotow dc19680440 fix(spellcheck): Remove premature optimizations and avoid spellcheck on word being typed
Fixes T3537
2015-09-11 11:12:25 -07:00
Ben Gotow 79d80464f3 tweak(event-card): Use 12-hour time rather than 24-hour time 2015-09-10 19:00:33 -07:00
Ben Gotow 1d21666382 tweak(tooltip): Fix Sentry 2938 2015-09-10 18:37:15 -07:00
Ben Gotow ee7266ffb5 fix(spellcheck): On Windows, right clicking a word doesn't select it
Summary: Minor tweaks so that the word is selected and spellcheck / replacement works

Test Plan: No test coverage at the moment - need to think about ways to test selection

Reviewers: evan, dillon

Reviewed By: dillon

Differential Revision: https://phab.nylas.com/D2006
2015-09-10 10:53:27 -07:00
dillon be7b52cb98 feat(categories): enable creating new labels and folders. addresses T3351.
Summary:
write tests for adding/removing existing labels and popover closing

add more tests

address code review comments

fix the tests

add test for creating label

add test for creating label and queueing change label task

add test for creating a folder

add syncback category task spec

make the rest of the tests pass

remove unnecessary parens

add a few more tests

add last test

Test Plan: added some tests. all tests green

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2010
2015-09-10 10:34:09 -07:00
Evan Morikawa 1a5dd2003f refactor(package): remove old, unused, or private package. Adds examples
Moved to git@github.com:nylas/N1-private-packages.git

Also started an "examples" folder at the root level with an example Github
package
2015-09-10 12:57:40 -04:00
Ben Gotow cac8c4ec7a fix(thread-list-store): Preserve selection through moveThreads
Summary: Small change that resets focus and keyboard selection after moving threads

Test Plan: Run existing tests, plan to overhaul this whole class so no additioanl tests atm

Reviewers: dillon, evan

Reviewed By: evan

Maniphest Tasks: T3382

Differential Revision: https://phab.nylas.com/D1996
2015-09-09 16:09:51 -07:00
Evan Morikawa 5fdafcb899 fix(search): fix UI issues with search and add test
Summary:
Fixes:
- Search bar dropdown doesn’t go away if you focus into a message
- If a search times out, it continues to display nothing
- Clicked “Inbox” from a search and it didn’t clear the search box

Test Plan: edgehill --test

Reviewers: dillon, bengotow

Reviewed By: dillon, bengotow

Differential Revision: https://phab.nylas.com/D2000
2015-09-09 16:04:13 -07:00
Ben Gotow 5535ec43d1 fix(message-toolbar): Handle scenario where toolbar items rapidly removed (Sentry 2861) 2015-09-09 15:27:42 -07:00
Ben Gotow 97442b9bcb tweak(category-picker): Be slightly more robust against missing inbox 2015-09-09 15:20:34 -07:00
Ben Gotow 1dd0237717 perf(delta-sync): Don't update work UI when window is hidden, don't save config as often (synchronous IPC) 2015-09-09 15:03:40 -07:00
Ben Gotow ac3ca9d8f8 fix(thread-list): Depressed+active state needs to be different for immediate click feedback 2015-09-09 14:05:03 -07:00
Ben Gotow 0b282f1d3d tweak(empty-state): Hellen only has one L 2015-09-09 14:05:03 -07:00
Ben Gotow c3cf1d1c12 tweak(prefs): Remove the font size option until it's implemented 2015-09-09 14:05:03 -07:00
Ben Gotow 1bf220f1a6 fix(draft-list-store): Upgrade draft list store to NylasStore, fix issue where @_view is null 2015-09-08 18:39:00 -07:00
Ben Gotow 53252fcb97 fix(composer): Show "No Guesses Found" for misspellings without corrections, invalidate cache when learning spelling 2015-09-08 17:52:26 -07:00
EthanBlackburn f5792aae2e Archive button no longer appears in sent folder
Summary: Archive button doesnt appear in sent folder

Test Plan: tested manually

Reviewers: evan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3428

Differential Revision: https://phab.nylas.com/D1987
2015-09-08 14:16:51 -07:00
Evan Morikawa 6c881f4f64 fix(draft-list): draft list removes draft when the message sends
Summary:
This started when I noticed that drafts weren't dissapearing from the
draft list after send. This was a pretty big bug because if you ever
clicked on one again and tried to re-send it would throw a 400 error
saying the draft id doesn't exist.

This uncovered a few fundamental issues with the DB.

First of all, the reason the draft list wasn't updating was because the DB
trigger that happened when we got in a new message, was being ignored
since the diff contained no drafts (it's now a message).

The bigger issue was that if you had a draft with only a clientId, gave it
a serverId, and tried to call "save", the REPLACE INTO method would not
update the old object, but rather create a second duplicate. This is
because the `id` field was being used as the PRIMARY KEY, and in this
case, that `id` field changed! The fix was to change the PRIMARY KEY to be
the `cilent_id` instead of the `id` and use that as the REPLACE INTO
index.

We still need the `id` field; however, because all of our reads depend on
that field usually being the serverId

Fixes T3507

Test Plan: See new and updated tests

Reviewers: dillon, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3507

Differential Revision: https://phab.nylas.com/D1992
2015-09-08 13:11:34 -07:00
Ben Gotow 910f272076 feat(important): Improtant flags you can enable optionally for Gmail accounts
Summary: Fixes T3477

Test Plan: Tests are forthcoming

Reviewers: dillon, evan

Reviewed By: evan

Maniphest Tasks: T3477

Differential Revision: https://phab.nylas.com/D1990
2015-09-08 10:53:07 -07:00
dillon c597a72c28 fix(account-sidebar): fall back on provider icon if fetching user gravatar fails. fixes T3497.
Summary: simple markup & styles fix

Test Plan: tested manually. all tests still green.

Reviewers: bengotow

Maniphest Tasks: T3497

Differential Revision: https://phab.nylas.com/D1993
2015-09-08 10:48:02 -07:00
dillon 433b143005 fix(composer-view): always show subject, unless replyToMessageId exists. fixes T3495.
Summary: add showing subject when replyToMessageId exists

Test Plan: added test. all previous tests remain green.

Reviewers: bengotow, evan

Reviewed By: evan

Maniphest Tasks: T3495

Differential Revision: https://phab.nylas.com/D1989
2015-09-08 10:27:50 -07:00
Ben Gotow 692291364a fix(search): Fix for broken search display 2015-09-04 15:31:03 -07:00
dillon b61cdc6f32 fix(mode-toggle): mode toggler now toggles the sidebar rather than the list/split view. fixes T3462.
Summary:
add functioning toggling

add correct hide/show behavior for toggler

remove old hide/show button

add padding to make buttons prettier

Test Plan: tested manually. all tests remain green.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T3462

Differential Revision: https://phab.nylas.com/D1980
2015-09-04 12:32:19 -07:00
dillon 032c8a7c66 fix(thread-list): set min-width to threadlist. fixes T3435.
Summary: fix whitespace

Test Plan: added more test coverage

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T3435

Differential Revision: https://phab.nylas.com/D1982
2015-09-04 12:27:05 -07:00
Ben Gotow 1339ef19d3 feat(starred): Replace FocusedContentStore with FocusedMailViewStore, allows for starred
Summary:
This diff fixes T3389 and makes it possible to define mail views which are not based on a category and focus them in the app.

I think that we need to create a new index on the starred attribute to make sure the query runs fast.

More tests WIP

Test Plan: Run tests, more coming soon!

Reviewers: dillon, evan

Reviewed By: evan

Maniphest Tasks: T3389

Differential Revision: https://phab.nylas.com/D1979
2015-09-04 12:23:15 -07:00
Evan Morikawa ee41722891 fix(composer): much better specs for composer & quoted text
Summary: Fixed a bug bug with the quoted text clearing the bodies on replies

Test Plan: all the tests

Reviewers: dillon, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1981
2015-09-03 19:41:56 -07:00
Evan Morikawa 2aebd5f43b feat(draft): drafts that fail to send throw better errors
Summary: Also enhancements to the developer toolbar

Test Plan: edgehill --test

Reviewers: dillon, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1976
2015-09-03 16:29:33 -07:00
Evan Morikawa bc3d6dc297 fix(quoted): if whole message is quoted text, then show it
Summary: Fixes T3476

Test Plan: New test

Reviewers: dillon, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3476

Differential Revision: https://phab.nylas.com/D1974
2015-09-02 18:26:58 -07:00
Ben Gotow 9c0eccd387 fix(notifications): Switch account when necessary to display notification, avoid using CategoryStore which may not be ready
Fixes T2318 and fixes T3448
2015-09-02 16:31:50 -07:00
Ben Gotow 502bb7c0b8 feat(spellcheck): Custom spellcheck powered by our DraftStore extensions API
Summary: New draft store extension that highlights misspelled words.

Test Plan: No test coverage yet

Reviewers: evan, dillon

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1972
2015-09-02 13:20:01 -07:00
Evan Morikawa 442bcd99d1 test(api): add specs for nylas api
Summary: Specs for nylas api

Test Plan: edgehill --test

Reviewers: dillon, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1973
2015-09-02 12:22:20 -07:00
dillon d7c2ce6319 fix(composer): hide participant email and show only name. fixes T3404.
Test Plan: manually tested. all tests remain green.

Reviewers: evan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3404

Differential Revision: https://phab.nylas.com/D1968
2015-09-01 16:44:07 -07:00
Ben Gotow 7826ed99f8 fix(iframe-resize): Subscribe to iframe window resize, adjust container height
Summary: Fixes T2095, iFrames resize when images load, when container is resized, etc.

Test Plan: Run tests

Reviewers: dillon, evan

Reviewed By: dillon, evan

Maniphest Tasks: T2095

Differential Revision: https://phab.nylas.com/D1964
2015-09-01 16:23:29 -07:00
Evan Morikawa 3773083908 fix(iframe): give each message a proper doctype 2015-09-01 14:57:58 -07:00
dillon 629ed5f7b2 fix(thread): thread.sortLabels() now ignores 'Sent Mail' and other unnecessary labels. fixes T3454.
Summary: NOTE: this ticket and this diff do not address turning the 'Important' label into a more user-friendly chevron. I created T3477 for that.

Test Plan: added more tests. however, seems like somebody merged some tests which are failing.

Reviewers: bengotow, evan

Reviewed By: evan

Maniphest Tasks: T3454

Differential Revision: https://phab.nylas.com/D1963
2015-09-01 14:47:22 -07:00
dillon b44ac1e2db fix(sidebar-contact): wrap long email. fixes T3359.
Summary: add a snippet of css

Test Plan: tested manually

Reviewers: bengotow

Maniphest Tasks: T3359

Differential Revision: https://phab.nylas.com/D1966
2015-09-01 12:40:53 -07:00
dillon b66e2a22b6 fix(draft-list-sidebar-item): draft count renders correctly. fixes T3480.
Summary: I think I might've broken this when I fixed T3402, but I didn't realize it because I had zero drafts at the time, so this component didn't render for me.

Test Plan: tested manually

Reviewers: bengotow

Maniphest Tasks: T3402, T3480

Differential Revision: https://phab.nylas.com/D1965
2015-09-01 12:32:39 -07:00
Evan Morikawa e4a57aaf12 feat(github): add GitHub plugin
Summary:
Adding a simple GitHub plugin that shows a button on the thread view.

If we detect the "open in github" links, then we'll show the button on the
thread.

Test Plan: manual

Reviewers: dillon, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1959
2015-09-01 11:57:06 -07:00
Evan Morikawa 7ffaf6c17f fix(sidebar): fix case when category comes back as null 2015-09-01 06:18:11 -07:00
Evan Morikawa 13629f57dc fix(preferences): add window title to preferences
Fixes T3458 Preferences panel shows up as "Electron" in Window menu
2015-08-31 17:25:33 -07:00
Evan Morikawa 550a7e0a8c refactor(packages): move internal sidebar to own repo
Fixes T3425 Remove Nylas internal admin sidebar from default edgehill
2015-08-31 17:13:52 -07:00
Evan Morikawa 16c4376812 feat(composer): improve tab useage in composer
A `*` as well as a `-` will start a list.

If you tab anywhere in plain text, it will insert a tab character.

If your shift-tab anywhere in plain text, and the character just before
the cursor is a "tab" character, it will delete that last tab character.

Fix a bug whereby shift-tab and tab will indent/outdent from anywhere
inside of a list.

Fixes T3409
2015-08-31 16:55:01 -07:00
Evan Morikawa 93209c9f71 fix(sidebar): remove "Plugins" and consolidate sections
Fixes T3461
2015-08-31 15:38:08 -07:00
Evan Morikawa d56d8daaf2 fix(drafts): fix illegal ID set
Fixes T3468
2015-08-31 15:21:41 -07:00
Evan Morikawa 6ac2a6b1be fix(attachments): set attachment min-width
Fixes T3459
2015-08-31 15:03:17 -07:00
dillon c059b51fe3 fix(account-sidebar): make folder and label names wrap elegantly. fixes T3402.
Summary:
WIP: changing the rest of items to make them look correct

fix last draft item in sidebar

add more padding

Test Plan: tested manually. all tests remain green.

Reviewers: evan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3402

Differential Revision: https://phab.nylas.com/D1943
2015-08-31 10:47:25 -07:00
Evan Morikawa a0307d4d88 fix(uploads): no more from picker & uploads use correct accountId
Test Plan: edgehill --test

Reviewers: dillon, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1955
2015-08-28 20:35:43 -04:00
Evan Morikawa e639afae1e fix(undo): properly scope composer keymappings for undo/redo
Summary: Properly scopes undo & redo key bindings to the composer

Test Plan: manual

Reviewers: dillon, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3446

Differential Revision: https://phab.nylas.com/D1951
2015-08-28 18:59:00 -04:00
Evan Morikawa 3908ba402d feat(sync): Resume sync worker action from sidebar 2015-08-28 16:24:39 -04:00
Ben Gotow 08da848c34 fix(message-list): Use clientIds within the message-list for scrolling, etc. since IDs may change 2015-08-28 12:25:48 -07:00
Evan Morikawa a0e64bf580 refactor(packages): Remove Edgeforce 2015-08-28 15:16:32 -04:00
Ben Gotow 7190ca69f7 refactor(db): change ID system to have clientIDs and serverIDs
Summary: Major ID refactor

Test Plan: edgehill --test

Reviewers: bengotow, dillon

Differential Revision: https://phab.nylas.com/D1946
2015-08-28 11:24:29 -07:00
Ben Gotow 1a576d92dc feat(work): Create the "Work" window, move TaskQueue, Nylas sync workers
Summary:
Move sync workers and Edgehill token checks to work window

Move the task queue and database setup to the work window

Move ContactStore background refresh to work window

Store the task queue in the database

WIP

The TaskQueue now puts tasks in the database instead of in a file, which also means it can be observed

Move all delta sync and initial sync to a package, make NylasSyncStore which exposes read-only sync state

DraftStore no longer reads task status. Once you set the "sending" bit on a draft, it never gets unset. But that's fine actually.

If your package lists windowTypes, you *only* get loaded in those windowTypes. If you specify no windowTypes, you get loaded in the root window.

This means that onboarding, worker-ui, worker-sync, etc. no longer get loaded into the main window

ActivitySidebar has a special little store that observes the task queue since it's no longer in the window

Move "toggle component regions" / "toggle react remote" to the Developer menu

Move sync worker specs, update draft store specs to not rely on TaskQueue at all

Test Plan: Run existing tests, all pass

Reviewers: dillon, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1936
2015-08-27 16:39:40 -07:00
Ben Gotow 41a3529f16 fix(perf): Apply accountId to more queries, always run query plans in dev mode to flag SCANs 2015-08-26 14:10:28 -07:00
Ben Gotow 1b67728033 fix(draft-list): Only parse the first 400 characters of HTML to create plaintext snippet
It's possible that 400 characters isn't enough to get any plaintext (if the body begins with a style tag, for example.) Until we get a better solution in place, we need to do this to avoid parsing the king james bible in my draft.
2015-08-25 16:08:16 -07:00
Ben Gotow e65c078cf3 fix(composer): Show From: when replyToMessageId is null 2015-08-25 12:23:48 -07:00
Ben Gotow 2c6e3c4db5 fix(sentry-2518): Better debugging information for when token is not found 2015-08-25 11:49:51 -07:00
Ben Gotow 9dd04223d9 fix(less): Put pointer back on composer toolbar 2015-08-25 11:35:37 -07:00
Evan Morikawa 462e7e1dae fix(composer): display tooltip controls 2015-08-25 14:01:24 -04:00
Ben Gotow 7aedb9d22a downgrade(electron): Also fix less issue on Linux 2015-08-24 18:55:40 -07:00
Ben Gotow 7c09e77305 temp(composer): Do not allow user to switch accounts if files have been attached to draft 2015-08-24 17:39:41 -07:00
Ben Gotow 0c57108ff2 fix(object-serialization): Constrain use of __constructorName, fix infinite recursion, remove hackiness 2015-08-21 16:08:24 -07:00
Ben Gotow 81d2edcaf9 feat(accounts): Kill namespaces, long live accounts
Summary:
This diff replaces the Namespace object with the Account object, and changes all references to namespace_id => account_id, etc. The endpoints are now `/threads` instead of `/n/<id>/threads`.

This diff also adds preliminary support for multiple accounts. When you log in, we now log you in to all the attached accounts on edgehill server. From the preferences panel, you can auth with / unlink additional accounts. Shockingly, this all seems to pretty much work.

When replying to a thread, you cannot switch from addresses. However, when creating a new message in a popout composer, you can change the from address and the SaveDraftTask will delete/re-root the draft on the new account.

Search bar doesn't need to do full refresh on clear if it never committed

Allow drafts to be switched to a different account when not in reply to an existing thread

Fix edge case where ChangeMailTask throws exception if no models are modified during performLocal

Show many dots for many accounts in long polling status bar

add/remove accounts from prefs

Spec fixes!

Test Plan: Run tests, none broken!

Reviewers: evan, dillon

Reviewed By: evan, dillon

Differential Revision: https://phab.nylas.com/D1928
2015-08-21 15:29:58 -07:00
Evan Morikawa 23c8466fe0 fix(message): update MessageBodyProcess to key on message version 2015-08-20 16:44:13 -07:00
Evan Morikawa e2af724fa2 fix(thread): fix bug whereby thread list blows up if no "from" 2015-08-20 16:21:47 -07:00
dillon 9285e47b96 fix(message-list): collapsed message participants no longer looks broken. fixes T3377.
Summary: moved non-view logic outside of the render function, which also helped for testing purposes

Test Plan: added a test, but this also leaves the window open for testing the other use cases beyond T3377. not sure whether we should add tests for this patch or for another ticket.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T3377

Differential Revision: https://phab.nylas.com/D1916
2015-08-19 17:39:16 -07:00
dillon 0c14146c78 fix(message-timestamp): call @_formattedDate with correct params. fixes T3388.
Summary: small fix

Test Plan: I didn't add any tests, but this should probably be tested. Not sure the best way to test though. Would love to discuss with somebody!

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T3388

Differential Revision: https://phab.nylas.com/D1919
2015-08-19 15:50:10 -07:00
Evan Morikawa 51288b261a fix(specs): fix contenteditable specs 2015-08-19 13:35:12 -07:00
Evan Morikawa e018d6a8ec feat(composer): add bullets, numbered lists, and tab controls
Summary: Adding bullets, numbered lists, and tabbing indenting and outdenting

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1917
2015-08-19 13:26:11 -07:00
Ben Gotow fd08bf87b0 fix(keymaps): JSON => CSON during cibuild final phase 2015-08-18 14:50:53 -07:00
Ben Gotow a309d72fa0 fix(lint): Fix linter issues with preferences 2015-08-18 11:13:47 -07:00
Ben Gotow f883732522 bump(version): 0.2.5
Features:
- Preferences! You can now change all kinds of things from Menu > Preferences, including:
  + Key binding sets (Gmail, Outlook, Mail.app)
  + Theme (light or dark)
  + Mark-as-read delay
  + Attachment downloading policy
  + Sounds and notifications
  + Default reply behavior
- Layout and theme are now remembered when you re-launch Nylas Mail
- You can now star the message under the keyboard cursor by pressing 'S'

Performance:
- Creating drafts is now much faster on long threads

Fixes:
- "Hover and Archive" is now displayed correctly
- Signing in with an email with capitalization ("BEN@Nylas.com") no longer breaks subtle things
- Messages sent yesterday are now shown with relative time (2:31PM, 12 hours ago)
- NylasSyncWorker now backs off when it encounters network failure
- On Windows, the database is deleted properly when you log out
- Archiving now properly sends mail to All Mail in Gmail
- Images inside some emails now render without becoming distorted
- Mailto link handling is now case-insensitive
2015-08-18 10:57:37 -07:00
Ben Gotow dff1fd1487 fix(*): A few patches for minor sentry errors
Summary:
Fix edge cases where _getRangeInScope is null, fix logic errors

fix(1932) Edge case where we can't find a container for the message Id we're asked to scroll to

Check view exists before trying to perform actions. Will be fixed once keybindings are a React container

Test Plan: Run specs

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1906
2015-08-18 10:31:18 -07:00
dillon db407abbde add more test coverage and refactor checking if a contact is the current user. fixes T3360.
Summary: @evan -- would love to get your opinion on this approach!

Test Plan: add new tests

Reviewers: evan

Reviewed By: evan

Subscribers: evan

Maniphest Tasks: T3360

Differential Revision: https://phab.nylas.com/D1904
2015-08-18 10:18:30 -07:00
Ben Gotow 3e43f45401 perf(drafts): Cache results of running Autolinker, avoid props.children for EmailFrame, fix special case for new draft
Summary:
"results.length" not "result.length".

Eventually I want MessageBodyProcessor to be the public interface to another process which asynchronously runs message body parsing? At the very least, caching the results means that miscelaneous refreshes to the message list don't incur significant string processing cost.

Test Plan: No new tests here

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1898
2015-08-17 16:23:12 -07:00
Ben Gotow 19f543e20c fix(sentry-archive): Import Actions into ThreadListQuickActions 2015-08-17 14:51:03 -07:00
Ben Gotow d7337f2b10 fix(packages): Wait for package-store to be used before using APM to load the packages 2015-08-17 12:03:35 -07:00
Ben Gotow e7fce1f120 fix(preferences): Display multiple keybindings when available 2015-08-14 16:41:52 -07:00
Ben Gotow 94372f22c8 fix(preferences): Windows / Linux styling and adjustments 2015-08-14 16:24:53 -07:00
Ben Gotow ed2a5c90d9 feat(preferences): WIP Preferences panel
Summary:
Things still to come:
- General tab
- Signatures tab (potentially remove and land)

Adding emacs things to gitignore

Adding progress. iterating on html/css is incredibly painful

Added layout for accounts page.

Adding layout for appearance page

layout for shortcuts preferences page

adding layount for notifications menu

Adding signatures layout

WIP

WIP - tab switching, accounts tab

WIP ALL THE THINGS

Keymap template support (Gmail / outlook, etc.)

Test Plan: No tests atm

Reviewers: evan

Differential Revision: https://phab.nylas.com/D1890
2015-08-14 15:40:11 -07:00
dillon d8a77826aa WIP: adding a test for review
Summary: Desired functionality works, and passing test cases added. Ready for code review for real now! @evan @bengotow

Test Plan: Added extra tests to cover recipient-only cases.

Reviewers: evan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T2239

Differential Revision: https://phab.nylas.com/D1889
2015-08-14 14:17:15 -07:00
dillon 56012ca1ef fix(thread-list): toggling select for an unread thread doesn't affect bolding anymore -- fixes T3219
Summary: Some CSS logic tweaks and simplifications.

Test Plan: Tested manually. No automated test unfortunately.

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T3219

Differential Revision: https://phab.nylas.com/D1882
2015-08-14 13:47:25 -07:00
EthanBlackburn 8b108c78de Quick actions fix
Summary: Fixes T2345.

Test Plan: Tested manually

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2345

Differential Revision: https://phab.nylas.com/D1886
2015-08-13 14:56:22 -07:00
Ben Gotow afda3c6030 fix(curl): If a curl URL a "&" in it, we need to wrap the url in quotes 2015-08-13 11:20:19 -07:00
dillon 24b94a25df fix(message-list): show relative time if email is less than 22 hours ago. fixes T2308.
Summary: refactored existing code and rewrite come tests to make the logic simpler

Test Plan: new tests to test final outcome rather than intermediate formats, which i figured was more useful

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T3219, T2308

Differential Revision: https://phab.nylas.com/D1876
2015-08-12 14:52:03 -07:00
dillon 2c011c703f fix(message-list): allow starring messages by pressing 's'. Fixes T2430.
Summary: Although this code works as desired, I think the code itself could use some work. Also, I didn't know how I should test this. Any ideas? @bengotow

Test Plan: I'm all ears

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: bengotow

Maniphest Tasks: T2430

Differential Revision: https://phab.nylas.com/D1877
2015-08-12 14:36:44 -07:00
dillon 262eb71c0b add a fix, TODO: refactor
Summary: fix(service): Remove redundant tail newline when hiding previous in compose view. Fixes T2467.

Test Plan: Added a test to verify that all tail newlines are removed except one. Added another to verify that non-tail newlines aren't removed. Tweaked an existing test to make it pass.

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2467

Differential Revision: https://phab.nylas.com/D1864
2015-08-11 11:35:33 -07:00
Ben Gotow 804b00cf74 fix(thread-list): Unread gem hover state should override "star"
Fixes T3216
2015-08-11 10:01:40 -07:00
Ben Gotow 48574ddffa fix(multiselect-list): Only show loading dots when list source is empty
Fixes T1118
2015-08-10 15:09:53 -07:00
Ben Gotow a5f05f52fd fix(composer): Remove unnecessary zIndex rules, fix wrapping around Cc/Bcc/Subject icons
Previously, we were adding 160px of padding to the entire To field. Now the buttons in the top right are floating inside the container and only impact the first line of participants.

I also stripped out a lot of zIndex rules on the participant fields, subject, body that I think were only necessary because "once you've started adding zindexes you need them everywhere".

Also changed the hover state of the buttons to be consistent.
2015-08-10 14:47:47 -07:00
dillon f5172bd1b2 fix(composer): default warning is now 'Send Anyway' instead of 'Cancel'
Summary: Fixes T2433

Test Plan: Updated composer specs

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2433

Differential Revision: https://phab.nylas.com/D1861
2015-08-10 12:19:40 -07:00
dillon 0dc3f6f883 fix(message-list): side-bar button shouldn't be selectable
Summary: fixes T2852

Test Plan: tested manually

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2852

Differential Revision: https://phab.nylas.com/D1859
2015-08-10 11:40:19 -07:00
Ben Gotow b2d80d12b5 fix(participant-fragments): Fragment based on name as well as email
Fixes T2880, with a new test
2015-08-06 13:12:24 -07:00
Ben Gotow 58a9d60ce1 fix(specs/keys): Fix broken specs, clean up CJSX 2015-08-06 12:22:06 -07:00
Ben Gotow 574c32438a fix(reply-area): Remove animated height from message list reply-area - looks strange since the removal of a draft is not otherwise animated 2015-08-05 17:41:15 -07:00
Ben Gotow e17c7812a8 fix(drafts): Fix rapid draft creation and deletion issues 2015-08-05 17:40:33 -07:00
Ben Gotow be4af0671b feat(composer): Show blue focus ring around the composer 2015-08-05 17:38:44 -07:00
Ben Gotow 1e6e857f28 perf(*): Add indexes, optimize "shouldAcceptModel", optimize Tasks
Summary:
Consolidate the smarts from ChangeFolderTask into a generic ChangeMailTask

ChangeMailTask:
   - only makes requests for threads / messages that actually changed
   - handles incrementing / decrementing locks
   - writes changes to the database in a single pass, and only writes modified models
   - encapsulates the undo state that was built into ChangeFolderTask

This change means that ChangeLabelsTask enjoys the same "smarts" as ChangeFolderTask. Label changes resulting in no-ops do not create web requests, you can undo label changes and they go back to the correct previous state.

Replace "UpdateThreadsTask" and "UpdateNylasObjectsTask" with subclasses based on the same code used for folder/labels

This means that the naming and parameter sets are consistent for all thread/message changing tasks. It also means that starring/marking as use the same (tested) business logic and starring 999 already-starred threads doesn't create 999 requests.
Go away DraftCountStore - nobody wants you in secondary windows

Add "Debug query plans" option which prints out the steps the database is taking. Look for "SCAN" to now you're having a bad time.

Make "version" field queryable, when we receive deltas/API response, find all versions of existing models in a single query without loading or parsing the objects

Contact: Add index for lookup by email

Label: add index for lookup by name

Message: Add index for message body join table

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1840
2015-08-05 15:53:08 -07:00
Evan Morikawa aeced745f3 fix(spec): Make specs work with new animated pending message 2015-08-05 09:34:56 -07:00
Evan Morikawa a125e79799 fix(message-list): get rid of flicker and add transitions
Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1841
2015-08-04 19:35:56 -07:00
Ben Gotow 7f84917675 fix(lint): Address linter errors 2015-08-03 19:09:08 -07:00
Ben Gotow 0b9b72dce5 fix(draft-scroll): Ignore composer scroll requests while moving to new draft 2015-08-03 18:39:11 -07:00
Ben Gotow 0f76577a15 fix(message-scroll): Remove double overflow:auto to prevent scroll weirdness
Fixes T2357
2015-08-03 18:37:06 -07:00
Evan Morikawa c001cb0be8 fix(spec): fix rename issue 2015-08-03 17:41:18 -07:00
Evan Morikawa 763e42d974 fix(message-list): fix type and change variable name 2015-08-03 17:28:56 -07:00
Evan Morikawa ada9f722f5 feat(message-list): better sending state
Summary:
We now have a `MessageItemContainer` class that handles the logic of
deciding what kind of message to show. We introduce a new `PendingMessage`
(which is just a sublcass of `MessageItem`) that has the spinner and
stuff.

Also tests

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1833
2015-08-03 17:19:07 -07:00
Ben Gotow 9b2f830348 fix(*): Minor performance tweaks and fixes to category picker
Summary:
fix(undo-redo): UndoRedoComponent does not take props

fix(category-picker):

- Use Actions.queueTask like the rest of the app so UndoRedoStore can see it. Can change this in the future but it's currently the only place in the app we directly queue tasks.

- Stop subscribing to the FocusedContentStore / FocusedCategoryStore (which are not used in setState?) since we receive threads as props

- Rename categoryDatum to item because it's not a category. (Was super confused that categories were becoming JSON in `_extendCategoryWithDisplayData`) Give item a category property so that tasks can specify items and not IDs (allows for better descriptions like "Moved one thread to Archive"

Add simple shouldComponentUpdate to retina-img

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1832
2015-08-03 17:05:31 -07:00
Ben Gotow 8884435da0 fix(undo-redo): Minor tweaks to undo/redo based on testing - see description
Summary:
Give UpdateThreadsTask a description method for strings like "Marked as read"

Give ChangeLabelsTask a better description method that returns shorter strings and is specific when possible

Give ChangeFolderTask a more specific description and don't assume folderOrId will always be a folder

Make it so that passive "mark as read" from the message store isn't undoable

Give the base class a description method that names the object

Change UndoRedo component CSS a bit:

- Use "inline-flexbox" with a max-width so that we can define shrinking rules on the label and Undo button (label gets ellipsis, button does not shrink at all)

- Avoid left:39%, since it assumed that the undo-redo element would be 22% of the width of the thread list, which wasn't always true. Instead, make the `undo-redo-manager` container "text-align:center", so the `undo-redo` div is always centered within it.

- Add `cursor:default` so that the user sees the pointer, not the text insertion cursor when hovering over "Undo"

- Add overflow / text-overflow so that if the message is ever too long, the user sees `...` ellipsis properly.

Test Plan: Run a few new tests

Reviewers: evan, ethanb

Reviewed By: ethanb

Differential Revision: https://phab.nylas.com/D1830
2015-08-03 14:46:19 -07:00
Ben Gotow 00bab73fbe fix(thread-list): Add more shouldComponentUpdate to prevent threadlist re-rendering as you move keyboard cursor 2015-08-03 14:09:29 -07:00
Ben Gotow 1dc7c03ebd fix(contact-chips): Contact chips are editable and have much better style
Summary:
The TokenizingTextField has several new optional props, including onEdit, which enables
editing of the tokens and tokenIsInvalid, which allows you to make tokens red, while still
accepting them as tokens.

When you go to send a message with invalid recipients it won't let you until you remove/
edit them.

Hotloading

Edit chips, keymappings not through command registry, 7 new tests for editing chips

Test Plan: Run 7 new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1825
2015-08-03 13:06:28 -07:00
Ben Gotow b2602222bc fix(invariant): Remove event listener with "capture: true"
Fixes https://sentry.nylas.com/sentry/edgehill/group/1831/
2015-08-03 11:38:57 -07:00
Evan Morikawa 9d17b90b93 fix(tooltip): doesn't show on archive either 2015-08-03 10:57:56 -07:00
Ben Gotow 99da4a112a fix(undo-redo): Clear timeout when component unmounts to avoid React errors 2015-08-03 10:21:04 -07:00
EthanBlackburn 11b20f326d Removed old code from thread-list 2015-07-31 14:02:13 -07:00