Commit graph

1319 commits

Author SHA1 Message Date
Jackie Luo cff427d710 fix(composer-emoji): Return if no search results are found 2016-03-24 11:57:49 -07:00
Ben Gotow 3544ccf979 fix(selection): Make the clear selection button a button 2016-03-24 10:57:12 -07:00
Jackie Luo dcb8478f97 feat(composer-emoji): Add emoji button to composer
Summary: The emoji picker allows users to insert emoji to their messages on click. A few emoji that don't render properly in Chromium are replaced with PNGs, both in the composer view and the message list view, but only the Unicode characters are sent in the message bodies.

Test Plan: TODO

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2787
2016-03-24 10:45:48 -07:00
Ben Gotow 454082d4c1 fix(undo-redo): Remove initial state check 2016-03-24 10:42:15 -07:00
Ben Gotow 4d65dbf9bf fix(autolinker): Only match top ten tld's when schme not present 2016-03-24 10:14:47 -07:00
Ben Gotow 52e8e57e4a perf(autolinker): Use requestIdleCallback to fix hanging on large bodies 2016-03-23 19:03:21 -07:00
Juan Tejada e40f4c58fd fix(snooze): Correctly display snoozed until label 2016-03-23 18:00:46 -07:00
Juan Tejada 3b3f0c0c81 fix(send-later): Close popover in inline composer when msg scheduled 2016-03-23 17:46:24 -07:00
Juan Tejada 9a800bf4ef fix(styles): Fix styles for attachment and upload items 2016-03-23 17:16:25 -07:00
Jackie Luo be9c616840 fix(composer-emoji): Return null if no matching node is found 2016-03-23 17:01:14 -07:00
Jackie Luo a8e5d9948e fix(composer-emoji): Fix setBaseAndExtent bug 2016-03-23 16:48:35 -07:00
Juan Tejada 5f559d596c fix(signatures): Fix signature switching between accounts in composer 2016-03-23 15:23:13 -07:00
Dakota Nelson c9c81782c3 Add extensibility in composer recipient chips
Summary:
Allow for injection into the composer's list of recipients to indicate
something about each recipient (i.e. for the PGP plugin, allow an
indicator as to whether or not each recipient has a PGP key
available)

Test Plan: Tested locally

Reviewers: juan

Reviewed By: juan

Subscribers: bengotow

Differential Revision: https://phab.nylas.com/D2761
2016-03-22 17:08:54 -07:00
Ben Gotow c265cf0dfa fix(drafts): Formalize draft factory, add reply "behaviors" #1722
Summary:
This diff implements a behavior change described in https://github.com/nylas/N1/issues/1722.

Reply buttons should prefer to focus an existing draft in reply to the same message, if one is pristine, altering it as necessary to switch between reply / reply-all. If no pristine reply is already there, it creates one.

Reply keyboard shortcuts should do the same, but more strictly - the shortcuts should switch between reply / reply-all for an existing draft regardless of whether it's pristine.

This diff also cleans up the DraftStore and moves all the draft creation itself to a new DraftFactory object. This makes it much easier to see what's going on in the DraftStore, and I also refactored away the "newMessageWithContext" method, which was breaking the logic for Reply vs Forward between a bunch of different helper methods and was hard to follow.

Test Plan: They're all wrecked. Will fix after concept is greenlighted

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2776
2016-03-22 15:47:51 -07:00
Juan Tejada 7e6141fb47 🎨(composer): Reduce contenteditable min height 2016-03-22 14:51:38 -07:00
Juan Tejada 0f9e70cde7 fix(tasks): Properly handle DraftNotFoundError in DestroyDraftTask
- Fix reference to actual DestroyDraftTask class inside
  syncback-draft-task
2016-03-22 14:34:09 -07:00
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
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
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
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
Jackie Luo 38d9c41c0b fix(theme-picker): Add tabIndex to click to dismiss 2016-03-18 18:12:55 -07:00
Ben Gotow c849212250 log(sync-state): Send Account State Delta to mixpanel 2016-03-18 15:09:00 -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 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 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
Ben Gotow a3a03bd086 fix(lint): Actions is defined but never used 2016-03-16 20:04:01 -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
Jackie Luo 55ed1e2f3c sp(composer-emoji): Correct emojis to emoji 2016-03-15 13:37:54 -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
Ben Gotow 84b9741fa6 fix(autolinker): Additional phone number parsing specs 2016-03-15 11:04:00 -07:00
Ben Gotow 92e8a2a7d4 fix(autolinker): Add more test cases, improv URL regex 2016-03-15 10:47:14 -07:00
Ben Gotow 7a7496b675 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 2d8bb9d3f7 fix(next/prev): Move buttons to correct column #1721 2016-03-15 09:16:28 -07:00
Jackie Luo 492ae69abe Merge pull request #1731 from jamiewilson/darkside
(darkside) using new toolbar selectors, svgs, etc
2016-03-14 18:50:43 -07:00
Jackie Luo 1869709121 🎨(plugins): Add theme-specific icon in plugins tab 2016-03-14 17:55:25 -07:00
Juan Tejada ded7c20fba 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 cff2f71d18 fix(signatures): Adds default signature, convert to ES6 2016-03-14 17:05:49 -07:00
Jamie Wilson 013898ed02 using new toolbar selectors, svgs, etc. 2016-03-14 19:02:00 -05:00