Commit graph

31 commits

Author SHA1 Message Date
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
Ben Gotow 041817c589 patch(save): Only save drafts when necessary, avoid sync-engine issues
Summary:
Previously, we have saved drafts back to the user's provider through the sync engine. There are a handful of very serious edge case issues we're working to solve that are creating a bad user experience. (#933, #1175, #1504, #1237)

For now, we're going to change the behavior of N1 to mitagate these issues.

- If you create a draft in N1, we will not sync it to other mail clients while you're working on it.
- If you enable send later, we'll start syncing the draft to the server as before.
- If you created the draft in another client, we'll sync the draft to the server as before.

Fix specs

Test Plan: Run specs

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2706
2016-03-10 11:03:38 -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 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 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
Evan Morikawa a63bc9e4b0 fix(analytics): fix send later and snooze analytics 2016-02-25 14:01:15 -08:00
Evan Morikawa 18be81098e feat(analytics): add analytics to send later, snooze, tracking 2016-02-25 12:34:09 -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 162aac4943 fix(build): Don't delete plugin package.json files, restore ellipsis (@sdw consulted HIG!) 2016-02-24 18:15:55 -08:00
Juan Tejada d6a3abdbe0 fix(lint): Fix lint errors 2016-02-24 17:53:31 -08:00
Drew Regitsky 4c22fa7489 fix(send-later): options text capitalization: title case => sentence case 2016-02-24 17:45:14 -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 f0e76019fd fix(error-handling): handle offline for link tracking & read-receipts
Fix offline error handling of link tracking and read receipts

Fix ellipses for tooltips

Allow you to change the title in the error box
2016-02-24 16:06:08 -08:00
Ben Gotow 5e34c889c6 💄(send-later): Minor draft list styling changes 2016-02-24 13:44:56 -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
Evan Morikawa ada4256dc8 fix(lint): fix less and js linter issues 2016-02-24 12:31:56 -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 e02b924efb 💄 (send-later): Update placeholder copy, again 2016-02-24 11:50:43 -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 d34f30cc3e 💄 (plugins): Clean up constants in plugins
- Fix some eslint issues
2016-02-23 22:55:47 -08:00
Ben Gotow 9315ee3385 fix(metadata-plugins): Add production app ids 2016-02-23 22:29:49 -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 9ef84e476a fix(auth-failure): Warn of disconnect on 403s, fix logic 2016-02-23 18:35:24 -08:00
Ben Gotow 7e96a169a2 💄(plugins): Updated assets and a bit of error handling 2016-02-23 17:51:10 -08:00
Ben Gotow 6eed3ce054 fix(composer): Redo toolbar styling with theme variables + minor fixes 2016-02-23 15:40:44 -08:00
Ben Gotow d674a665fe fix(send-later): Re-order so send later always appears beside send 2016-02-23 14:37:10 -08:00
Ben Gotow 9541343835 💄(send-later): Lots of styling of send-later 2016-02-23 13:52:18 -08:00
Evan Morikawa 6349a1ff0c feat(composer): new composer footer and icon design 2016-02-23 13:42:10 -08:00
Ben Gotow 8ed28f76d1 💄(icon): A delightful seafoam green icon 2016-02-23 10:35:08 -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