Commit graph

37 commits

Author SHA1 Message Date
Ben Gotow
f706d4d80f fix(sync): Pull down and associate metadata during initial sync
Summary:
Snooze should wait for categories on all accounts

Fix authPlugin to rembmer `plugin+accountId`, not pluginId, add specs

categories() returned [], categories(acctId) returned {}

dry up sync worker, fetch metadata before anything else

Test Plan: Run tests

Reviewers: drew, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2693
2016-03-10 11:06:06 -08:00
Juan Tejada
fcf8fa766c fix(snooze-button): Change div to button 2016-03-09 16:10:15 -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
Juan Tejada
848bb09f84 fix(date-utils): Add localization to date formats
Summary:
- Setting the locale in moment was not sufficient to actually use the
  correct localized formats.
- Moment provides localized format via the formats : 'L', 'LL', 'll',
  etc. See: http://momentjs.com/docs/#/displaying/format/
- Updates to set our date formats based on localized formats:
  - Unfortunately, localized formats always contain the year, so I
    manually removed the year from our short format.
- Actually fixes: #1515
- Fixes bug where setting nextWeek or thisWeekend returned incorrect
  date if the current day was saturday or sunday
- Add specs

Test Plan: Unit tests

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2688
2016-03-07 16:44:54 -08:00
Juan Tejada
1023600c7e fix(lint): Fix linter error in specs 2016-03-03 13:45:28 -08:00
Juan Tejada
0fd2d107b2 test(plugins): Add snooze and send later specs
Summary:
- Also refactors the code a bit for testability and maintainability
- Fixes #1515

Test Plan: - Unit tests

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2651
2016-03-03 12:38:42 -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
Juan Tejada
c5f112f846 fix(snooze): Do not display snooze buttons unless looking at inbox 2016-02-25 14:02:58 -08:00
Evan Morikawa
a63bc9e4b0 fix(analytics): fix send later and snooze analytics 2016-02-25 14:01:15 -08:00
Ben Gotow
1d130e15c8 perf(snooze): Don't wrap snooze label in unsafe container 2016-02-25 13:39:30 -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
Evan Morikawa
18be81098e feat(analytics): add analytics to send later, snooze, tracking 2016-02-25 12:34:09 -08:00
Juan Tejada
164ac49fa5 feat(snooze): Update message in toast when snoozing
- Adds new arg to ChangeLabelTask and ChangeFolderTask to override
  default description
- Adds custom description to task when snoozing
2016-02-25 10:42:21 -08:00
Juan Tejada
7d05523b0f fix(plugins): Add headers for composer popover + Fix in snooze popover 2016-02-25 10:24:29 -08:00
Ben Gotow
0553b7bde3 fix(snooze): A few minor popover adjustments. See desc.
- Rather than have a `showing` prop on the fixed popover, I just remove it and put a span in it's place when it's gone. This means we always get componentDidMount when the popover appears and simplifies when to focus it's content.
- The fixed popover implements esc and blur behaviors itself
- The fixed popover uses the background-secondary color and works in dark mode
- The snooze items have hover and active states
2016-02-24 20:05:21 -08:00
Drew Regitsky
6fe36c72a5 fix(snooze): options text capitalization: title case => sentence case 2016-02-24 17:56:52 -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
Evan Morikawa
cbed789b94 fix(snooze): look at allCategories instead of userCategories 2016-02-24 16:51:34 -08:00
Juan Tejada
3187d2f0d1 fix(snooze): Fix quick action button, remove italic from popover 2016-02-24 15:33:57 -08:00
Juan Tejada
6458a90eda fix(snooze): Close popover on error 2016-02-24 15:11:03 -08:00
Juan Tejada
2eefbc28d3 fix(snooze): Close popover when opening a new one 2016-02-24 15:08:53 -08:00
Juan Tejada
f7b1209b5c fix(fixed-popover): Reposition when overflowing on left direction
- This is a temporary solution
2016-02-24 15:02:42 -08:00
Ben Gotow
030d86e3bd fix(snooze/send-later): Change chrono config to always prefer dates in future 2016-02-24 13:16:53 -08:00
Ben Gotow
90b9570f91 fix(send-later): Resolves a variety of small bugs from QA 2016-02-24 12:26:56 -08:00
Juan Tejada
3f59176380 💄 (popover): Properly apply styles to input inside popover
- Fix tabindex in send later popover
- Update placeholder copy
2016-02-24 11:22:54 -08:00
Juan Tejada
3125d4d2ff 💄 (snooze): Add quotes to popover placeholder 2016-02-24 10:28:08 -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
d34f30cc3e 💄 (plugins): Clean up constants in plugins
- Fix some eslint issues
2016-02-23 22:55:47 -08:00
Juan Tejada
3a55a126b6 fix(snooze): Fix react component warnings 2016-02-23 22:39:18 -08:00
Ben Gotow
9315ee3385 fix(metadata-plugins): Add production app ids 2016-02-23 22:29:49 -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
Drew Regitsky
0237b8cfd2 fix(metadata-plugins): update all appIds and URLs for staging 2016-02-23 19:19:43 -08:00
Ben Gotow
7e96a169a2 💄(plugins): Updated assets and a bit of error handling 2016-02-23 17:51:10 -08:00
Ben Gotow
686a3f4fda 💄(snooze): Quick action styling, draft pencil alignment 2016-02-23 14:37:10 -08:00
Juan Tejada
bb52510c87 fix(snooze): Check if snooze category is defined when creating 2016-02-18 10:44:03 -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