Commit graph

248 commits

Author SHA1 Message Date
Evan Morikawa c616ded318 feat(sidebar): add timestamps to related messages 2016-03-09 16:17:20 -05:00
Ben Gotow 703686d322 fix(sent): Sort sent view by most recent sent message, not received 2016-03-09 11:40:56 -08:00
Juan Tejada e3fc29ee36 remove(popover): Remove Popover in favor of FixedPopover
Summary:
- FixedPopover now correctly adjusts itself when overflowing outside
  window, in all directions
  - Updates styles
  - Adds specs
- Remove Popover and popover.less, and refactor all code that used it in
  favor of the new FixedPopover

Test Plan: Unit tests

Reviewers: drew, evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2697
2016-03-09 10:05:46 -08:00
Juan Tejada 37af2ba42c fix(remove-from-view): Fix logic for delete/remove-from-view behavior:
Summary:
- Separate gmail's remove-from-view and delete behaviors and write logic
  for each of those
  - Remove MailboxPerspective::{canArchiveThreads, canTrashThreads,
    removeThreads} and some unecessary code in TaskFactory
  - Instead, add MailboxPerspective::tasksForRemovingFromPerspective (I
    know its a bit of a mouthful)
  - I initially tried to put all of the logic for each execution path
    inside the TaskFactory by checking perspective types, but it made
    more sense to use the polymorphism already in place for the different
    perspective types.
  - There is a default delete/remove-from-view behavior which is
    configurable via simple ruleset objects. The gmail behavior is
    configured in this way.
- Update swipe css classes based on destination of threads
- Fixes #1460:
  - Update logic to display archive/trash buttons and context menu options correctly
    when selected threads can be archived/trashed (not based on
    perspective)
  - Same for swiping
- Add a bunch of specs
- Convert some code to ES6
- TODO write some docs for new functions

Test Plan: Unit tests

Reviewers: drew, evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2682
2016-03-07 18:16:37 -08:00
Ben Gotow f413386b80 feat(hidden-messages): Filter trash/spam messages. Fixes #1135
Summary:
By default, the messages in a thread are now filtered to exclude
ones moved to trash or spam. You can choose to view those messages by clicking
the new bar in the message list.

When you view your spam or trash, we only show the messages on those threads
that have been marked as spam/trash.

Test Plan: Run a couple new tests

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2662
2016-03-02 10:05:17 -08:00
Ben Gotow 011431f93a fix(threads): Right-align the timestamps in the thread list 2016-02-26 15:00:56 -08:00
Ben Gotow 91a589bd32 bump(version): 0.4.9 and changelog 2016-02-25 14:10:21 -08:00
Juan Tejada f22fdbae49 feat(snooze): Add snooze date label to snooze threads
- Adds a new InjectedComponentSet for the role 'ThreadList:Label'.
- Adds a new label to the thread list indicating the snooze date if the
  thread has been snoozed
- Coerces MailLabel to achieve this. This is a temporary hack, we should
  design a better view to display snooze date information
2016-02-25 13:12:40 -08:00
Ben Gotow a5fe9cdf18 fix(swipe): Make it easier to close snooze-confirm swipe state, fix double-popover issue 2016-02-24 21:01:23 -08:00
Ben Gotow b2074eefc6 fix(star): Bulk star icon has never shown current state(?!) 2016-02-24 20:05:21 -08:00
Juan Tejada 4aecf745ac fix(plugins): Several minor fixes:
- Fixes styling for snooze quick action button when thread selected
- Fixes snooze popover input debouncing
- Other interaction fixes
2016-02-24 17:34:18 -08:00
Ben Gotow 3f23db6002 💄(snooze): Fix swipe-to-snooze animation 2016-02-24 16:44:16 -08:00
Juan Tejada bae079dcc6 fix(snooze): Only allow snooze from inbox 2016-02-24 15:06:06 -08:00
Juan Tejada c0da487e02 fix(snooze): Close all popover types when submitting date with enter 2016-02-24 10:27:16 -08:00
Juan Tejada a5ee197660 feat(snooze): Adds initial design pass and update snooze popover
Summary:
- Add FixedPopover, an absolutely positioned popover component to use for swipe snoozing:
  - This component needs to be finished, as its current behavior is primarily for the snooze plugin
- Updates popover.cjsx to properly render pointer for thesnooze popover for the `down` direction
- Adds new design assets
- Adds date input to snooze popover

Test Plan: - TODO

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2624
2016-02-23 20:03:42 -08:00
Ben Gotow 686a3f4fda 💄(snooze): Quick action styling, draft pencil alignment 2016-02-23 14:37:10 -08:00
Evan Morikawa f76acfa441 fix(inbox-zero): don't show inbox zero when syncing 2016-02-23 14:17:11 -08:00
Evan Morikawa cdd015cfab feat(inbox-zero): add minimal graphic to inbox when no threads 2016-02-23 10:50:08 -08:00
Ben Gotow 549ae38b6c fix(swipe): Better animation, callback for action completion 2016-02-22 16:08:10 -08:00
Ben Gotow b923086c2a fix(drag): Patch for crash on dragging threads 2016-02-22 10:57:22 -08:00
Ben Gotow 840b48c2df 💄: Experimental app icon, fix for merge conflict 2016-02-19 18:52:49 -08:00
Ben Gotow 592374c0dc feat(swipe-to-*): Gesture support and animation in thread list
Summary:
This diff does two things:
- It adds a new SwipeContainer that makes it easy to implement swipe gestures. This is built into listTabular, so you can create a list and define onSwipeLeft/Right to enable gestures.

- It adds support for basic add/remove animations to the thread list. This works by adding a CSS transition to `top` and also leaving removed rows around for a specified time. (these times need to match.) Pretty much just cloned the core idea from TimeoutTransitionGroup.

Test Plan: No tests yet

Reviewers: evan, juan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2581
2016-02-19 18:22:28 -08:00
Evan Morikawa fb4e806afe feat(menu): add right click menu
Summary:
Adds a right click menu to the thread list
Moving to folders and labels #TODO

Test Plan: TODO

Reviewers: bengotow, juan

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2609
2016-02-19 18:35:48 -05:00
Juan Tejada 74bb98b337 fix(draft-list): Display , separated participants list 2016-02-18 12:14:18 -08:00
Juan Tejada a841417011 feat(snooze/send-later): Add snooze and send later plugins
Summary:
- Add initial version of snooze and send later plugins
- Tests are missing since this will probably heavily change before we are done with them

Test Plan: - TODO

Reviewers: drew, bengotow, evan

Reviewed By: bengotow, evan

Differential Revision: https://phab.nylas.com/D2578
2016-02-18 10:06:21 -08:00
Ben Gotow 8f6dff7da8 fix(important): Remove todo, reference to usesImportantFlag. Fixes #1331 2016-02-16 11:41:15 -08:00
Ben Gotow 03a33e5270 🎨: Fixes, labels in narrow thread view, better label wrap 2016-02-11 15:25:24 -08:00
Juan Tejada c0e8dc7ccb fix(styles): Fix less lint error 2016-02-04 18:19:26 -08:00
Ben Gotow 91240f8979 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
Ben Gotow fd9850b74d 💄(thread-list): Correct top border on selected threads. Fixes #1189 2016-02-02 11:12:28 -08:00
Ben Gotow d9c4739f78 fix(contact): Converge on displayName(), don't show account label in ThreadList. Fixes #1157 2016-02-01 19:12:06 -08:00
Ben Gotow aade6a6579 rm(Nilas-contact-elements): Remove unused package 2016-02-01 19:12:06 -08:00
Juan Tejada 617e2aed09 fix(remove-from-view): Update remove from view (shortcut) behavior
Summary:
- Now behaves exactly like in Gmail:
  - If viewing inbox, it will archive or trash, depending on setting
  - If viewing starred, will unstar
  - If viewing trash, will move to inbox
  - If viewing label, will remove label (no folder support)
  - No op otherwise
- Updates TaskFactory helpers and adds some helper methods
- Updates specs

Test Plan: - Manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2492
2016-02-01 17:40:42 -08:00
Juan Tejada a00adca3e5 fix(shortcuts): Add shortcut to mark as spam, fixes #765
- Minor cleanup + docs
2016-02-01 12:21:42 -08:00
Ben Gotow bf0f3828dc fix(thread-list): Remove dup accountIds to avoid extra work 2016-01-30 15:00:20 -08:00
Ben Gotow c8d8bd0aee fix(thread-list): AccountId resolution for items outside loaded range 2016-01-29 17:56:57 -08:00
Ben Gotow 48a64e7fef fix(focus): Don't clear when item is scrolled out of retained range 2016-01-29 12:34:58 -08:00
Ben Gotow 25db6c696d fix(labels): Never show labels UX for threads split across folders 2016-01-28 16:57:24 -08:00
Ben Gotow ef5a8fc8e9 fix(important): Hide important in message column of unified unless Gmail 2016-01-28 16:57:24 -08:00
Ben Gotow e39662983d fix(important): Fix bugs in "important" label categorization 2016-01-28 15:27:03 -08:00
Ben Gotow 52a7a6625f fix(linter): Switching between Coffee + ES6 is hard... 2016-01-28 14:59:17 -08:00
Juan Tejada 79c103ae15 fix(perspective): Update MailboxPerspective.canApplyToThreads
- Checks if the account ids of the threads that want to be applied are
  contained inside the perspectives account ids. E.g.:
  - I can move thread from account A to unified inbox or inbox A, but
    not to inbox B.
  - I can move threads from account A to a folder in account A but not a
    folder in account B
- Update data transferred in drag + other minor updates
2016-01-28 13:30:08 -08:00
Ben Gotow 0ef4911b22 Merge branch 'master' into unified-inbox
# Conflicts:
#	internal_packages/feedback/lib/feedback-button.cjsx
#	internal_packages/thread-list/lib/thread-list.cjsx
#	src/flux/stores/draft-store.coffee
2016-01-25 17:28:29 -08:00
Ben Gotow bb03e52e33 Clean up action bars, random exceptions 2016-01-25 17:08:38 -08:00
Ben Gotow e4553ffb1e Fix drafts 2016-01-25 16:37:34 -08:00
Ben Gotow c9e5b68f16 More database-related spec fixes 2016-01-25 11:35:23 -08:00
Evan Morikawa 5057ad3d20 fix(keymap): the remove and go to prev/next keys were reversed
Fixes #924
2016-01-22 15:33:49 -08:00
Ben Gotow 7458fdd4db TaskFactory now returns N tasks for performing standard actions, undo uses arrays 2016-01-21 13:46:04 -08:00
Ben Gotow 07df74f823 Show the important icon whenever any account in the perspective supports it 2016-01-19 00:00:08 -08:00
Ben Gotow 3ee96b714b Remove current()? references, use Perspectiv.forNothing instead 2016-01-18 01:31:35 -08:00