Mailspring/spec/models
Juan Tejada 0d15c6cea6 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
..
category-spec.coffee fix(remove-from-view): Fix logic for delete/remove-from-view behavior: 2016-03-07 18:16:37 -08:00
contact-spec.coffee fix(contacts): Stop auto-capitalizing phrases and emails. Fixes #1308 2016-02-11 16:30:28 -08:00
event-spec.coffee fix(db): Allow string attributes to be null. Never coerce to "" 2016-02-05 13:49:18 -08:00
file-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
message-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
model-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
model-with-metadata-spec.es6 es6(*): convert 20+ source files used in example packages to ES2016 2016-02-29 18:47:22 -08:00
mutable-query-result-set-spec.coffee DataView => ListDataSource 2016-01-14 12:26:54 -08:00
query-range-spec.coffee New QueryRange specs, fixes 2016-01-14 12:03:06 -08:00
query-spec.coffee More database-related spec fixes 2016-01-25 11:35:23 -08:00
query-subscription-pool-spec.coffee Merging in new observables for thread list 2016-01-08 14:31:33 -08:00
query-subscription-spec.coffee perf(accounts): Cache accountForId - need ordered map... 2016-01-29 00:42:56 -08:00
thread-spec.coffee More database-related spec fixes 2016-01-25 11:35:23 -08:00