Commit graph

2197 commits

Author SHA1 Message Date
Ben Gotow
ff42f06b92 bump(changelog): Notes for 0.4.5 2016-02-07 12:39:47 -08:00
Ben Gotow
53266ea408 perf(accounts): Use cached contact objects in accountForEmail
This method is called for every contact on a thread in the thread list, so I figured we should see if one version was faster. I ran this test code:

```
d = Date.now(); for(var ii = 0; ii < 10000; ii ++){ $n.AccountStore.accountForEmail("ben.gotow@gmail.com") }; console.log(Date.now() - d);
```

The other approach which calls meUsingAlias takes `3784ms`, and this version which uses the alias contacts cached in aliases() only takes `264ms`. Confirmed that the tests still pass.
2016-02-07 11:23:19 -08:00
Ben Gotow
dce7573218 fix(threads): Circular include blocking FocusdPerspectiveStore. Sentry #11763 2016-02-07 11:10:48 -08:00
Juan Tejada
2655054e34 🎨(contact): Reuse AccountStore.accountForEmail inside isMe 2016-02-07 01:34:30 -08:00
Ben Gotow
ed0562fe2c fix(categories): Fix Sentry #11613 2016-02-07 01:08:38 -08:00
Juan Tejada
4641fc4938 fix(account-store): Correctly check alias email inside accountForAlias
- Add spec
2016-02-07 00:39:11 -08:00
Ben Gotow
12f4142d84 fix(system-start): Do not continue when checkAvailability returns false 2016-02-06 11:35:01 -08:00
Ben Gotow
3c25434fc8 fix(remove-from-trash): Fixes Sentry #11551 2016-02-06 11:28:14 -08:00
Ben Gotow
0a7f188f7d fix(contacts): Allow for contacts with no emails (Sentry #11535) 2016-02-06 01:38:56 -08:00
Ben Gotow
8cfa6f66ef Merge pull request #1210 from mbilker/fix-remote-undefined
Define the remote variable
2016-02-06 01:21:17 -08:00
mbilker
6165e98243 fix(events): define the remote variable
This code triggers when a window is supposed to close, but this error
causes the DevTools to open and the window not exiting
2016-02-06 01:20:03 -05:00
Ben Gotow
1bd41a84e9 fix(undo): Ensure undo bar dismisses after re-appearing 2016-02-05 19:11:27 -08:00
Ben Gotow
1b3c4cf594 fix(messages): Field label was always "To" 2016-02-05 18:42:29 -08:00
Ben Gotow
7406e2a5a3 feat(perspective): Restore through NylasEnv.savedState 2016-02-05 18:36:48 -08:00
Ben Gotow
0fdeaca744 bump(changelog): Release notes for 0.4.4 2016-02-05 15:45:13 -08:00
Ben Gotow
fc2a179c6c fix(message): Allow height to be 0, remove 150px min height 2016-02-05 15:33:07 -08:00
Ben Gotow
205f3ba6ab fix(tray): Fix accidental conversion to NaN 2016-02-05 14:37:55 -08:00
Juan Tejada
affafc69a8 fix(account-store): Set focused perspective when account removed 2016-02-05 14:30:10 -08:00
Ben Gotow
e6a4718a44 fix(search): Don't show loading dots forever if requests fail 2016-02-05 14:29:02 -08:00
Juan Tejada
78665c5fec fix(sidebar): Handle edge cases for sidebar shortcuts
Summary:
- Update menus and shortcuts correclt when accounts change or focused
  accounts change
- Move menu logic into SidebarCommands to remove duplicated logic
- Make `Window` menu also contain checkboxes

Test Plan: - Manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2534
2016-02-05 14:25:07 -08:00
Ben Gotow
1337b21a0d fix(db): Allow string attributes to be null. Never coerce to ""
- Fixes a bug where reply_to_message_id = "" when we receive drafts from the sever.
- In general behavior should be consistent with API. Since they allow null we should too.
2016-02-05 13:49:18 -08:00
Ben Gotow
b8329a38c8 fix(zoom): Disable "double tap to zoom" behavior 2016-02-05 13:25:54 -08:00
Ben Gotow
b1b48c08f4 fix(toolbar): Don't show the toolbar when rangeInScope is null 2016-02-05 13:11:09 -08:00
Ben Gotow
56c27ff004 fix(labels): Re-order so adding/removing same label does nothing 2016-02-05 12:00:58 -08:00
Ben Gotow
54054bef7b revert(list-selection): Using clientIds had unintended consequences 2016-02-05 10:17:41 -08:00
Juan Tejada
c4749f592e fix(sidebar): Display correct keyboard shortcuts in account switcher
- Fixes #1203
2016-02-05 09:55:27 -08:00
Ben Gotow
938c2de922 lint(outbox): 😞 2016-02-04 20:20:33 -08:00
Ben Gotow
44150fc529 perf(outbox): Only trigger when send draft tasks are present 2016-02-04 20:15:15 -08:00
Ben Gotow
7b05e8883f fix(db): QuerySubscription should trigger if interim changes did not impact result set 2016-02-04 20:14:26 -08:00
Ben Gotow
90336f4f1f perf(threads): Add an index specifically for the "starred" view 2016-02-04 20:13:49 -08:00
Ben Gotow
57cfd07bbe perf(threads): Add shortcut for common case in emailIsEquivalent, avoid RegExp.exec 2016-02-04 20:13:43 -08:00
Ben Gotow
80b70b6e54 perf(threads): Cache aliases to avoid GC thrashing in isMeAccount 2016-02-04 20:13:37 -08:00
Ben Gotow
1b932eb3e5 revert(nylas-env): Moving windowEventHandler init broke menus 2016-02-04 20:12:55 -08:00
Juan Tejada
682bae5e08 fix(styles): Fix less lint error 2016-02-04 18:19:26 -08:00
Juan Tejada
b0ac02058b fix(thread-list): Fix drag and drop to new folders/labels 2016-02-04 18:18:22 -08:00
Juan Tejada
182f6abb25 update(sidebar): Update sidebar design + context menus
Summary:
- Removes account switcher almost entirely
- Update context menu to edit and delete sidebar items
- Gross hardcoded position and size for the switcher icon -- will likely update with later redesign

Test Plan: - Visual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2527
2016-02-04 14:58:47 -08:00
Ben Gotow
8b3f7f0578 feat(outbox): Sending status now appears beside drafts
Summary:
This diff adds an "OutboxStore" which reflects the TaskQueue and
adds a progress bar / cancel button to drafts which are currently sending.

- Sending state is different from things like Send later because drafts
  which are sending shouldn't be editable. You should have to stop them
  from sending before editing. I think we can implement "Send Later"
  indicators, etc. with a simple InjectedComponentSet on the draft list
  rows, but the OutboxStore is woven into the DraftList query subscription
  so every draft has a `uploadTaskId`.

- The TaskQueue now saves periodically (every one second) when there are
  "Processing" tasks. This is not really necessary, but makes it super
  easy for tasks to expose "progress", because they're essentially
  serialized and propagated to all windows every one second with the
  current progress value. Kind of questionable, but super convenient.

- I also cleaned up ListTabular and MultiselectList a bit because they
  applied the className prop to an inner element and not the top one.

- If a DestroyDraft task is created for a draft without a server id, it
  ends with Task.Status.Continue and not Failed.

- The SendDraftTask doesn't delete uploads until the send actually goes
  through, in case the app crashes and it forgets the file IDs it created.

Test Plan: Tests coming soon

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2524
2016-02-04 14:14:24 -08:00
Dakota Nelson
40cb19d122 Disallow Gmail accounts from entering IMAP flow
Summary:
The error message from D2515 is being upgraded to also disable the
continue button so that a user is unable to sync an @gmail.com account
using the IMAP flow.

Test Plan: Tested locally.

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2516
2016-02-04 09:54:01 -08:00
Bernd Verst
f162353ce4 Removes the MessageListNotificationBar editable component in favor of the existing MessageListHeaders
Summary: Removes the MessageListNotificationBar editable component in favor of the existing MessageListHeaders

Test Plan: Manually built N1 and verified the MessageListNotificationBar no longer appears as editable component.

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2523
2016-02-03 18:11:23 -08:00
Jackie Luo
dec0e95dc2 fix(composer-emojis): Fix bugs around null nodes and whitespace
Summary: Corrected the linting errors and changed some of the logic around tracking typed text and triggering properly.

Test Plan: Tested locally.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2522
2016-02-03 18:10:56 -08:00
Ben Gotow
3b49e132ab fix(errors): onerror contains an error.. 2016-02-03 18:03:11 -08:00
Ben Gotow
8f7795b40f fix(send-action): Make dropdown trigger secondary send actions
We can come up with a new UX for this later, but for now this is important for consistency with the Reply/Reply-All/Forward picker and others in the app that perform actions rather than changing selection. Also makes it possible to choose to "Send and Archive" /without/ making it the future default, which will be nice when there are many you may want infrequently.
2016-02-03 16:27:11 -08:00
Ben Gotow
a3cd23b41c 💄(emoji): Add an icon / description to emoji package 2016-02-03 15:43:22 -08:00
Ben Gotow
c18e081af7 fix(draft-store): Don't require plugins to implement finalizeSession 2016-02-03 15:41:28 -08:00
Dakota Nelson
041fc24927 Warn when entering Gmail address in imap settings
Summary:
Users have been configuring their Gmail accounts using the IMAP
authentication method, which causes problems. Attempting to do so will
now create an error message.

Test Plan: Tested locally.

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg, emfree

Maniphest Tasks: T6621

Differential Revision: https://phab.nylas.com/D2515
2016-02-03 15:14:02 -08:00
Evan Morikawa
d4db0737cf feat(error): improve error reporting. Now NylasEnv.reportError
Summary:
The goal is to let us see what plugins are throwing errors on Sentry.

We are using a Sentry `tag` to identify and group plugins and their
errors.

Along the way, I cleaned up the error catching and reporting system. There
was a lot of duplicate error logic (that wasn't always right) and some
legacy Atom error handling.

Now, if you catch an error that we should report (like when handling
extensions), call `NylasEnv.reportError`. This used to be called
`emitError` but I changed it to `reportError` to be consistent with the
ErrorReporter and be a bit more indicative of what it does.

In the production version, the `ErrorLogger` will forward the request to
the `nylas-private-error-reporter` which will report to Sentry.

The `reportError` function also now inspects the stack to determine which
plugin(s) it came from. These are passed along to Sentry.

I also cleaned up the `console.log` and `console.error` code. We were
logging errors multiple times making the console confusing to read. Worse
is that we were logging the `error` object, which would print not the
stack of the actual error, but rather the stack of where the console.error
was logged from. Printing `error.stack` instead shows much more accurate
stack traces.

See changes in the Edgehill repo here: 8c4a86eb7e

Test Plan: Manual

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2509
2016-02-03 18:06:52 -05:00
Jackie Luo
5c6b4adf9a feat(composer-emojis): Add emojis to composer
Summary:
Emojis can now be added in the composer window with colons and the emoji names (referenced by the same names used on Slack/GitHub/etc.).

When using the correct syntax, if there are emojis that match the text typed, they appear in a dropdown floating toolbar.

Selection works with either mouse clicks or arrow keys (plus `Enter`).

Currently, the toolbar won't trigger if the colon is adjacent to a non-whitespace character.

Test Plan: TODO: Will write tests soon!

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2505
2016-02-03 15:05:36 -08:00
Ben Gotow
521e2bdc61 bump(version): 0.4.2 2016-02-03 14:55:48 -08:00
Bernd Verst
90b1a109b0 Use vertical layout for MessageListHeaders, MessageListNotificationBar, Draft:Footer
Test Plan: No new tests. Visual verification.

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2514
2016-02-03 14:51:46 -08:00
Ben Gotow
ee96339fed build(*): Add travis reporting to Slack 2016-02-03 14:36:02 -08:00