Commit graph

2530 commits

Author SHA1 Message Date
Juan Tejada 1d4e4612d5 feat(popover): Add subtle ease-in animation when opening popover
- Closes popover on window resize:
  - Re rendering popover on window resize will be a bit more tricky because
    the FixedPopover only receives an origin rect. The one who
    dispatches the action has the responsability of re dispatching when
    the window resizes
- Fixes tiny behavior in send later popover
2016-03-22 13:45:07 -07:00
Ben Gotow df354aa50e fix(readme): Add --enable-logging flag 2016-03-22 12:21:25 -07:00
Juan Tejada 5aa2b24d72 fix(message-list-toolbar): Fix observable for selection & focused thread 2016-03-22 11:28:55 -07:00
Juan Tejada 8f864e76e3 fix(attachments): Update fn name in ImageAttachmentComponent 2016-03-22 11:28:55 -07:00
Ben Gotow 8ff89dbf48 Merge pull request #1790 from mbilker/fix-mistake
Fix my mistake with AutoUpdateManager
2016-03-22 00:56:06 -07:00
Jackie Luo 4afcc0501f 🎨(theme-picker): Fix styling for non-Retina displays 2016-03-21 19:35:47 -07:00
Ben Gotow 9e3dbd3873 fix(template): Rewrite in ES6, add missing windowTypes 2016-03-21 18:25:50 -07:00
Juan Tejada fce1673aac feat(download-all): Adds download-all button + style updates, more ES6
Summary:
- Adds initial version of download all button
- Converts attachments plugin to ES6 and adds updated styling
- Updates quoted text button
- #905, #1712

Test Plan: - Unit + manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2769
2016-03-21 18:23:26 -07:00
Ben Gotow 510e417cb3 fix(tray): Use total count, not unread count, for tray icon 2016-03-21 17:36:18 -07:00
Ben Gotow 4ddbf1faae es6(tasks): Convert all remaining tasks to ES6
Summary: after refactoring some things last week and spending time futsing with coffeescript, I’m pretty convinced it’s worth moving important parts of the app to ES6 to be able to use ESLint as part of our dev workflow

Test Plan: Run existing tests, tested manually. Did not convert the tests in this diff, breaking one part at a time!

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2768
2016-03-21 16:50:10 -07:00
Juan Tejada 687597134d feat(selection): Add new display for selection count + update toolbar
Summary:
- New behavior is that the in split mode, you will perform actions on
  the selection via the MessageListToolbar (the toolbar positioned above
  the message list)
- Refactored and moved around a bunch of code to achieve this:
  - Mostly renaming stuff and moving stuff around and removing some
    duplication
  - Update naming of toolbar role to a single role, and update relevant code
  - Converted and refactored a bunch of code into ES6, specifically to reuse the code for the ThreadActionsToolbar at the 2 locations
  - Deprecated MultiselectActionBar in favor of MultiselectToolbar
  - Deprecated old roles
- Punted the animation for the stackable cards in the selection display for now.
- #370

Test Plan: - Manual and unit tests

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2756
2016-03-21 12:20:11 -07:00
Ben Gotow cc7317d3f7 fix(composer): Refactor header actions, clean up layout
Summary:
WIP

Remove the mode prop from everywhere, use NylasEnv.isComposerWindow() instead

Test Plan: Run updated tests

Reviewers: drew, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2766
2016-03-21 11:32:48 -07:00
mbilker 6c36f54a60 fix(auto-update): mistakenly used remote.dialog
I forgot that the `AutoUpdateManager` is run from the main process
2016-03-18 22:56:08 -04:00
Jackie Luo 38d9c41c0b fix(theme-picker): Add tabIndex to click to dismiss 2016-03-18 18:12:55 -07:00
Ben Gotow a88c7db3a5 Merge pull request #1783 from mbilker/change-dialog-call
Use `remote` exports instead of `remote.require` for dialog
2016-03-18 17:42:31 -07:00
Ben Gotow 8626b006eb bump(version): Notes for 0.4.16 patch, master to 0.4.17 2016-03-18 17:03:27 -07:00
Ben Gotow c849212250 log(sync-state): Send Account State Delta to mixpanel 2016-03-18 15:09:00 -07:00
Juan Tejada ea48721a85 🎨(query-subscription): Update query subscription
Summary:
- Applies code changes that we discussed with @bengotow when debugging
  #1327
- Minor refactoring and reorganization + update specs

Test Plan: - Unit tests

Reviewers: evan, bengotow

Reviewed By: bengotow

Subscribers: bengotow

Differential Revision: https://phab.nylas.com/D2612
2016-03-18 14:33:18 -07:00
Ben Gotow 9aba847a92 fix(onboarding): Focus first field when showing settings #1696 2016-03-18 14:03:37 -07:00
Jackie Luo 815dc58e3a fix(ui-taiga): Remove border-bottom in two-pane mode 2016-03-18 13:48:14 -07:00
Jackie Luo 96186631cd fix(ui-taiga): Show active list item in single-pane mode (#1751) 2016-03-18 13:42:32 -07:00
Ben Gotow d780740187 fix(build): Fix failing linter and account tests 2016-03-18 13:26:03 -07:00
Ben Gotow 47a8823242 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 26c752ba66 typo(counts): Fix duration computation 2016-03-18 10:43:43 -07:00
Ben Gotow 5bc00bd55e fix(quick-schedule): Update to use new APIs, remove leftover docs 2016-03-18 10:43:43 -07:00
Drew Regitsky 3240635b4c 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 2575cecd59 bump(node-emoji): Use 1.2.1 with merged PR 2016-03-18 10:07:56 -07:00
Ben Gotow 1f7716baa6 Merge pull request #1764 from mbilker/expose-keytar
Add atom-keytar for use in extensions
2016-03-18 10:03:05 -07:00
mbilker ea540ebf18 fix(specs): change to use electron.remote.dialog 2016-03-18 01:27:13 -04:00
mbilker 758b1ccd4e fix(require): use the remote common exports to avoid function call 2016-03-18 01:27:05 -04:00
Michael Grinich 5d98595918 Merge pull request #1781 from steelbrain/patch-1
Enhance issue template
2016-03-17 19:28:25 -07:00
Steel Brain 0ede4b7275 🎨 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 868445504f bump(version): 0.4.16 beta 2016-03-17 18:25:00 -07:00
Ben Gotow fe5b75b32a 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 e767c9a89b 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 ccef76326f es6(tasks): send, syncback and specs converted to ES6 2016-03-17 16:23:53 -07:00
Ben Gotow b515a5e0e2 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 2e2ecf0647 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 f5a9bac151 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 a3a03bd086 fix(lint): Actions is defined but never used 2016-03-16 20:04:01 -07:00
Ben Gotow 24933906a7 bump(version): 0.4.15 2016-03-16 19:29:00 -07:00
Ben Gotow 552b66fbaf 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 286043492f 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 6b993d07bc fix(ui-variables): Add correct hexcode for @background-color-success 2016-03-15 20:01:01 -07:00
Jackie Luo 55ed1e2f3c sp(composer-emoji): Correct emojis to emoji 2016-03-15 13:37:54 -07:00
Ben Gotow 1a50a535a9 fix(icon): update assets to fix #1747 2016-03-15 12:46:03 -07:00
Juan Tejada 592e861406 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 030b0b57b4 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 76d478b677 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 5c8b8c721f 🎨(plugins): Fixes switch alignment issue in #1743 2016-03-15 11:09:09 -07:00