Commit graph

2506 commits

Author SHA1 Message Date
Jackie Luo 7ee762a202 fix(ui-taiga): Remove border-bottom in two-pane mode 2016-03-18 13:48:14 -07:00
Jackie Luo e0fa3d5707 fix(ui-taiga): Show active list item in single-pane mode (#1751) 2016-03-18 13:42:32 -07:00
Ben Gotow 073924ff00 fix(build): Fix failing linter and account tests 2016-03-18 13:26:03 -07:00
Ben Gotow 31706d8890 fix(queue): Delay retries up to 30s when tasks request a retry
Summary:
This is a critical patch that fixes two problems with the task queue:

1. Tasks in Status: Retry are retried the next time processQueue is run,
   which could be pretty much immediately. Certain scenarios lead to tasks
   running in a hard loop forever.

2. Returning Task.Status.Retry set the retry flags on the task but did not
   schedule the queue to be processed again. So if only a single item in the
   queue was present, it might never be retried again until the user performed
   another action.

Test Plan: Where did the specs for TaskQueue go? There aren't many... need to write more.

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2762
2016-03-18 13:25:30 -07:00
Ben Gotow 55c205fe86 typo(counts): Fix duration computation 2016-03-18 10:43:43 -07:00
Ben Gotow 301cc4ad8b fix(quick-schedule): Update to use new APIs, remove leftover docs 2016-03-18 10:43:43 -07:00
Drew Regitsky 3af91d22b6 fix(sync-state): ignore Account.syncState=="stopped" for now
Valid accounts that are syncing properly can reviece a delta for
Account.syncState==stopped currently, due to some quirks in the backend.
Ignore "stopped" until it unabiguously represents an error state.
2016-03-18 10:41:08 -07:00
Jackie Luo e0db484276 bump(node-emoji): Use 1.2.1 with merged PR 2016-03-18 10:07:56 -07:00
Ben Gotow bf22df732e Merge pull request #1764 from mbilker/expose-keytar
Add atom-keytar for use in extensions
2016-03-18 10:03:05 -07:00
Michael Grinich 0d57fc74e3 Merge pull request #1781 from steelbrain/patch-1
Enhance issue template
2016-03-17 19:28:25 -07:00
Steel Brain 0cc4f50510 🎨 Enhance issue template
There were several issues with the last issue template, here are some of them

- Instructions to user that should've been comments were not, they were shown as part of the issue
- Bullets were used instead of heading, the down side is that they weren't gonna be bullets only. Users were supposed to add paragraphs below them, thus breaking the styling.
- There were no separators in place

This commit addresses these issues
2016-03-17 19:25:38 -07:00
Ben Gotow 1e9da4309a bump(version): 0.4.16 beta 2016-03-17 18:25:00 -07:00
Ben Gotow 3b9ba55bbf fix(counts): Switch to simpler SQL-based counters, introduce total counts
Summary:
The old approach we were using to track unread counts by category was really complicated because it involved computing changes to counts in javascript and then syncing them back to the database, from each process that was making queries. Rather than try to fix that, this diff moves us to a new approach where the counts are maintained by executing a query before and after threads are modified to unapply / reapply them from the counters. Doing this in the database in the same transactions as the thread modifications themselves ensures the counts are internally consistent with the Threads table.

This SQL approach is also able to compute initial counts way faster - initializing totals and unreads in a 1GB edgehill.db in about 1 second on my machine.

Test Plan: All old tests removed, new tests coming

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2757
2016-03-17 18:24:27 -07:00
mbilker dfbbda510e fix(exports): rename Keychain to Keytar to reduce confusion
@bengotow requested that the export represent the original module
to prevent confusion and reduce the documentation needed.
2016-03-17 21:11:03 -04:00
Ben Gotow 3c4702d40d es6(tasks): send, syncback and specs converted to ES6 2016-03-17 16:23:53 -07:00
Ben Gotow d58a1aeaf3 feat(dock-icon): Drop files to attach them to new msg
Summary:
Fix specs

Fix responding to mailto, files at launch

It's super important that `window:loaded` is /not/ sent from index.js because `loadSettings.bootstrapScript` is async and nothing is actually loaded yet. This was causing the app to dispatch the mailto:// links into the main window before a DraftStore existed.

I think this was necessary at one point because we had NylasWindows not using a bootstrapScript? Should not be here anymore...

Test Plan: Run a few new tests

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2737
2016-03-17 13:14:55 -07:00
Ben Gotow 9099542643 fix(quoted-text): div vs blockquote, signature cleanup #1746
Summary:
Previously we always created <blockquote class="gmail_quote"> to wrap quoted text. This is not correct.
Gmail uses blockquotes only when it wants visual indentation, and <div>s to wrap other quoted text, like forwarded
messages which are not displayed indented.

This diff updates N1 to match Gmail exactly. Note that for replies, Gmail actually nests a blockquote.gmail_quote
inside a div.gmail_quote.

I also updated signature handling because it turns out the regexp that was removing existing signatures would blow
away any and all divs until it reached a <blockquote> tag.

Test Plan: See updated specs. Manually tested by creating a thread in Google Inbox and then performing fwd and reply in both N1 and Inbox. Results match.

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2750
2016-03-17 13:11:00 -07:00
Juan Tejada 1bb2125c90 fix(tasks): Don't pass null category to task factory
- This was causing:
  https://sentry.nylas.com/sentry/edgehill/group/20965/
2016-03-17 11:14:58 -07:00
Ben Gotow 9794817fb0 fix(lint): Actions is defined but never used 2016-03-16 20:04:01 -07:00
Ben Gotow b4370c1108 bump(version): 0.4.15 2016-03-16 19:29:00 -07:00
Ben Gotow 466bca813b fix(syncback): Bidirectional transforms, ready-to-send saved state
Summary:
This diff replaces "finalizeSessionBeforeSending" with a
plugin hook that is bidirectional and allows us to put the draft in
the "ready to send" state every time we save it, and restore it to
the "ready to edit" state every time a draft session is created to
edit it.

This diff also significantly restructures the draft tasks:

1. SyncbackDraftUploadsTask:
   - ensures that `uploads` are converted to `files` and that any
     existing files on the draft are part of the correct account.

1. SyncbackDraftTask:
   - saves the draft, nothing else.

3. SendDraftTask
   - sends the draft, nothing else.
   - deletes the entire uploads directory for the draft

Test Plan: WIP

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2753
2016-03-16 19:27:12 -07:00
mbilker 210bd2eca8 fix(exports): add atom-keytar for use in extensions
In Cypher, I store the Keybase tokens in `config.cson` currently.
With the recent integration of `atom-keytar`, I can store those
authentication tokens into the system keychain where they are better
protected than `config.cson` just like the account tokens.
2016-03-16 12:15:11 -04:00
Jackie Luo 8b1f443b1a fix(ui-variables): Add correct hexcode for @background-color-success 2016-03-15 20:01:01 -07:00
Jackie Luo e5e474569b sp(composer-emoji): Correct emojis to emoji 2016-03-15 13:37:54 -07:00
Ben Gotow 38b8d03cf2 fix(icon): update assets to fix #1747 2016-03-15 12:46:03 -07:00
Juan Tejada b47c707845 fix(focus): Show drafts in unfocused state when window is blurred
- See #1695
- Update key commands region to clear focus when window blurs
- Dispatch broswer-window-focus/blur as a window event into the renderer
  window
- Update tray icon to listen to window instead of ipc event
2016-03-15 12:12:30 -07:00
Juan Tejada d324a33d4b feat(view-mode): Add option in menu to select view mode
Summary:
Also add minor refactoring
#1710

Test Plan: Manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2745
2016-03-15 11:20:55 -07:00
Jackie Luo c49d523e8f refactor(ui-variables): Clean UI variables for consistency/usage
Summary: Shortens and simplifies UI variables so that unused variables are no longer present.

Test Plan: Tested locally.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2738
2016-03-15 11:18:50 -07:00
Jackie Luo f695c9c8a8 🎨(plugins): Fixes switch alignment issue in #1743 2016-03-15 11:09:09 -07:00
Ben Gotow da47fd4bdb fix(autolinker): Additional phone number parsing specs 2016-03-15 11:04:00 -07:00
Ben Gotow 73afdbb482 fix(autolinker): Add more test cases, improv URL regex 2016-03-15 10:47:14 -07:00
Ben Gotow 1ad2598a50 fix(uploads): Display icon regardless of ext capitalization
Note: In the future we really need to consolidate file-upload.cjsx and attachment-component.cjsx. #1700
2016-03-15 09:31:22 -07:00
Ben Gotow 310b8de2b0 fix(next/prev): Move buttons to correct column #1721 2016-03-15 09:16:28 -07:00
Jackie Luo c68834553d Merge pull request #1731 from jamiewilson/darkside
(darkside) using new toolbar selectors, svgs, etc
2016-03-14 18:50:43 -07:00
Ben Gotow 77b86dd087 fix(unread): counts should exclude items outside all mail
#1726, #1718
2016-03-14 18:33:04 -07:00
Jackie Luo e5c2075d26 🎨(plugins): Add theme-specific icon in plugins tab 2016-03-14 17:55:25 -07:00
Juan Tejada 32a47bcb7a feat(tray): Update to new set of icons and behavior for tray (menubar)
Summary:
- See #1698

Add specs

Test Plan: - Unit tests

Reviewers: bengotow, evan, drew

Reviewed By: drew

Differential Revision: https://phab.nylas.com/D2734
2016-03-14 17:17:11 -07:00
Ben Gotow 8e9d7ff73e fix(signatures): Adds default signature, convert to ES6 2016-03-14 17:05:49 -07:00
Jamie Wilson 913c9d633c using new toolbar selectors, svgs, etc. 2016-03-14 19:02:00 -05:00
Juan Tejada 4f1617550d fix(specs): Remove fdescribe 2016-03-14 15:39:42 -07:00
Juan Tejada 812b64edec fix(snooze): Correctly query and create snooze categories per account
Summary:
- Was not properly updating the references to snoozed categories when
  accounts were added or removed
- Update whenCategoriesReady to make sure we listen until category syncing has concluded (Move inside CategoryStore)
- #1676, #1658

Test Plan: - TODO

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2723
2016-03-14 15:36:39 -07:00
Ben Gotow 4593d0a9b1 fix(config): Move account tokens to system keychain
Summary:
This diff also adds an account version number to the config so that the AccountStore can tell whether it should reload accounts (depending on whether it was the instance making tthe changes.)

This diff also fixes a tiny issue where un-opened composers threw an exception if you changed accounts.

Test Plan: New tests

Reviewers: evan, drew, juan

Reviewed By: juan

Subscribers: juan

Differential Revision: https://phab.nylas.com/D2726
2016-03-14 15:14:08 -07:00
Ben Gotow a1691c10b2 hide(zoom): Remove UI for zoom, move to CONFIG.md 2016-03-14 13:13:32 -07:00
Ben Gotow c76582194a rm(autolinker): Use our own very simple autolinker
Summary:
Autolinker is a great open source project but it attempts to parse HTML with regexp, is quite slow, and hangs on specific emails https://github.com/nylas/N1/issues/1540

This is super bad, and also super unnecessary. I think this should do the trick.

Note: I changed the urlRegex in our Utils to be much more liberal. It now matches anything that looks like a URL, not just things with the http:// and https:// prefixes. It's used in the LinkEditor and onboarding screen (detecting auth errors with urls) and I think it should be ok?

Test Plan: Need to write some tests

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2725
2016-03-14 12:30:54 -07:00
Juan Tejada 1e765a6b62 fix(acct-menu): Add option to add account from context menu 2016-03-14 11:22:52 -07:00
Juan Tejada 938933fc1e fix(specs) 2016-03-14 11:22:42 -07:00
Juan Tejada 1e567973c4 fix(mail-labels): Don't display sent label
Reference #1671
2016-03-14 11:04:45 -07:00
Ben Gotow 96c70368c4 fix(spellcheck): Enables spellcheck menu for basic inputs (#1600)
Summary: Just moves some code so we can easily attach spelling menus to the basic inputs.

Test Plan: Updated existing tests

Reviewers: juan, drew

Reviewed By: drew

Differential Revision: https://phab.nylas.com/D2721
2016-03-14 10:23:57 -07:00
Ben Gotow 53037b9918 Merge pull request #1648 from Eldorado234/patch-2
Fixed text overflow in phishing detection indicator
2016-03-14 10:09:21 -07:00
Michael Grinich a8fe79cdda use bullets instead of checkboxes 2016-03-13 18:03:36 -07:00