Commit graph

105 commits

Author SHA1 Message Date
Evan Morikawa 5a2a52ebab perf(sync): don't send message bodies across IPC & limit global IPC
Summary: don't send unnecessary crap over IPC

Test Plan: manual

Reviewers: spang, mark, juan, halla

Reviewed By: juan, halla

Differential Revision: https://phab.nylas.com/D3705
2017-01-16 10:28:49 -08:00
Halla Moore d3482419f1 feat(sync-status): Hide syncback tasks inside the expanded details
Summary:
Except for send tasks, place notifications of syncback tasks inside
the expanded sync details.

Addresses T7458

Test Plan: tested locally

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3693
2017-01-15 15:21:51 -08:00
Evan Morikawa eb6001480c perf(scroll): improve thread list scroll perf
Summary:
Lots of components were rendering when they didn't have to on the very
frequent account sidebar updates

Test Plan: manual

Reviewers: mark, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3691
2017-01-15 15:12:54 -08:00
Evan Morikawa 7210c80c5a fix(subscription): show Nylas Basic subscription with CTA to upgrade
Summary:
Removes references to the N1 ID expring.

Luckily, local-sync Nylas Mail Basic doesn't need the nylas ID to do
pretty much anything, which means we don't need to worry about the "trial"
status of the Nylas ID. The existing trial infrastructure will only kick
into place when someone connects an email account with the Nylas Cloud
Sync servers for the first time.

The one place we do check for the Nylas ID is in the
cloud-api/src/authentication route. Here we hit
https://billing.nylas.com/n1/user and simply expect to get back a Nylas
ID. As long as we return the existence of a Nylas ID (which should ignore
whether or not the old subscription system is "valid"), the API calls will
succeed.

This makes the "Upgrade Now" button go to
billing.nylas.com/dashboard?upgrade_to_pro=true with the auto-sign in
features enabled. This will automatically log the user into the Nylas
billing site with the upgrade_to_pro=true flag set.

There is also a new "Learn More" button which goes to
https://nylas.com/nylas-pro.

@mike, will these urls work?

Test Plan: manual

Reviewers: khamidou, mike, juan

Reviewed By: juan

Subscribers: mike

Differential Revision: https://phab.nylas.com/D3680
2017-01-14 17:40:54 -08:00
Halla Moore 7f956af798 fix(task-labels): Remove ellipses from hardcoded labels and fix css class
The css class was accidentally renamed in another commit. Bring it back and
remove the hard-coded ellipses, since the ellipsis is now part of a css
psuedo element.
2017-01-13 13:42:43 -08:00
Halla Moore fc43bc834a fix(initial-sync-status): Change how we display the sync status
Summary:
This diff takes out the progress bars, since they can appear to
not move for very large mailboxes. Instead, just show an icon that
indicates whether the sync is complete or in progress, and add a
tooltip that displays how far back the folder has been synced to.

Submodule commit is D3662

Test Plan: tested locally

Reviewers: evan, juan

Reviewed By: evan, juan

Differential Revision: https://phab.nylas.com/D3663
2017-01-13 12:07:54 -08:00
Jackie Luo 78a7388318 🎨(rename): Update Nylas N1 to Nylas Mail
Test Plan: Tested locally.

Reviewers: halla, juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D3645
2017-01-12 12:05:44 -08:00
Juan Tejada c40ba0a7f6 fix(notifs) Restore offline notification
Summary: See title

Test Plan: tested locally

Reviewers: evan, halla, jackie

Reviewed By: jackie

Differential Revision: https://phab.nylas.com/D3643
2017-01-11 17:26:27 -08:00
Halla Moore 0b8e8fa6d9 💄(initial-sync): Move "hide" to the top of the expanded progress
Summary: Fixes T7442

Test Plan: tested locally

Reviewers: evan, jackie

Reviewed By: jackie

Maniphest Tasks: T7442

Differential Revision: https://phab.nylas.com/D3640
2017-01-11 15:24:18 -08:00
Halla Moore 9e2f14513e feat(sync-status): Add messaging in other areas when syncing
Summary:
We want users to know that their account is still syncing if they're
looking for a message and end up at the bottom of a thread list.
This diff changes some of the wording around the messaging when
sync isn't complete and also adds a footer at the bottom of the
syncing thread lists. Additionally, we added a "Show Progress"
link that will expand the sync details in the lower left.

Addresses T7354

Test Plan: tested locally

Reviewers: juan, evan, jackie

Reviewed By: jackie

Differential Revision: https://phab.nylas.com/D3551
2017-01-03 13:27:15 -08:00
Juan Tejada a0050a22d5 fix(sync-status):Use weighted percentage avg for sync status progress bar
Summary: Also move calculation to sync store, rename stuff a little bit

Test Plan: Manual :(

Reviewers: evan, jackie, halla

Reviewed By: jackie

Differential Revision: https://phab.nylas.com/D3547
2016-12-21 18:30:54 -05:00
Jackie Luo b5970e1e46 fix(initial-sync-activity): Update correct function name 2016-12-21 12:04:50 -08:00
Juan Tejada b29f46fdae fix(auth): Fix authentication notifications
Summary:
Depends on D3544 (K2 diff)

This commit ensures that auth notifications are showed when the
underlying sync worker fails and are cleared when an account is
successfully reconnected

To achieve this, we manually keep track and update syncStates where
appropriate via `Actions.updateAccount`, given that we have access to
N1's version of the account directly from local-sync.
Initially I was considering account delta stream to the cloud-api and the local-api, but that
just complicated things more than it helped.

This commit also fixes a bug with refreshing the gmail token in which we
we were only attempting a token refresh upon restarting the app

This addresses: T7346, T7305, T7335

Test Plan: Manual

Reviewers: halla, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3545
2016-12-21 07:23:09 -05:00
Halla Moore 78d1b85c7f re-feat(initial-sync-status): Bring the intiial sync progress bar back
Summary:
Adds a UI component to see the progress of initial sync.
(The behavior is sometimes a little strange, but I believe this is
just because of weird behavior in the NylasSyncStatusStore itself.
For instance, it sometimes never populates the `folderSyncProgress`
fields, or it never sets the progress to 1, so the bar stops at 99%)

Test Plan: tested locally

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3536
2016-12-19 12:40:36 -08:00
Juan Tejada d92506d8f1 fix(sync-status): Change old per model status, in favor of per folder
Summary:
Addresses T7275
Previously, we kept track of the sync status of each API model, and the progress
we'd made syncing all available models (e.g. all threads, messages, events, etc)

Given K2's set up, we are now keeping track of sync status per folder, i.e. what
percent of the folder's messages we've synced. This status is now reported from K2
to N1 via folder object deltas, and this commit rewrites the
NylasSyncStatusStore (in ES6) to reflect that.

The new Store keeps the sync state per account, which is the merged state of
per folder sync state, and delta connections state.
We also got rid of `CategoryStore.whenCategoriesReady` in favor of
`whenCategoryListSynced`, which is derived from the fact hat as long as we've
started syncing one folder, we've already synced the entire list of of folders/labels.

There are a couple of TODOs to be addressed in upcoming diffs:
- T7329 Restore the sidebar component to show sync progress, which was previously removed
- T7330 Figure out how to report sync progress per label, specifically, we are interested in knowing how much of the inbox we've synced, which is a label in Gmail. (This might be a non-issue if we sync the inbox very fast, first)

Depends on D3514

Test Plan: Manual

Reviewers: mark, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3515
2016-12-15 11:17:20 -08:00
Evan Morikawa 380f370e7d fix(sync): Support N1Cloud auth errors. Fix LongConnection cleanup 2016-12-01 12:04:37 -05:00
Halla Moore f4357ce166 change(API) Prevent N1 from sending "view" parameters in some API requests
- Threads: N1 always asks for the 'expanded' view, so K2 just always returns
the expanded view. N1 no longer needs to specify this.
- Messages: N1 only needed a 'count' view to display the initial sync progress
We've removed this progress bar and the corresponding request.
2016-11-21 15:16:04 -08:00
Ben Gotow 80b315d708 deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08:00
Jackie Luo 3dbd9b7278 feat(notifications): Allow notifications to be dismissable 2016-11-04 16:30:28 -07:00
Halla Moore afbcfb6853 fix(sidebar-notifs): Set containersRequired on the notifs-wrapper
Switch from manually setting containerRequired to false on each individual
notification to setting it on the InjectedComponentSet within the
notifs-wrapper. This way, people adding new notifications don't need to
remember to manually set it themselves.
2016-11-01 11:46:47 -07:00
Jackie Luo 0d5301c9ce 🎨(notifications): Remove indent and left padding from notifications 2016-10-26 12:19:12 -07:00
Ben Gotow f71686b766 fix(beta): Add notif when on beta channel 2016-10-18 12:39:09 -07:00
Ben Gotow c20238314d lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
Ben Gotow 8df4f6d744 feat(win32): Allow N1 to become the system-wide mailto: handler
Summary: This will address the longstanding concern in #417

Test Plan: No new tests

Reviewers: juan, evan

Reviewed By: juan, evan

Maniphest Tasks: T7065

Differential Revision: https://phab.nylas.com/D3322
2016-10-12 16:05:36 -07:00
Evan Morikawa e48b81d8de refator(notification): move base notification to nylas-component-kit 2016-10-06 10:53:22 -07:00
Juan Tejada de9e627924 fix(lint) 2016-10-04 12:06:43 -07:00
Halla Moore 9e3c3c14cd feat(sidebar-notifs) Create sidebar notifications to replace old bars
Summary:
Move the old bar notifications to the sidebar, and only display one notification
at a time using a priority-rating system. Remove all of the old notification
infrastructure.

Test Plan: Added specs, also reproduced notifications locally

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: juan

Differential Revision: https://phab.nylas.com/D3310
2016-10-04 08:08:23 -07:00
Ben Gotow 2739cc822e fix(identity): Always refresh accounts after identity
This fixes an issue where changing your Nylas ID didn’t refresh your accounts, and N1 would still think they were invalid.
2016-09-28 11:29:26 -07:00
Evan Morikawa a7da53e51e fix(lint): import ui-variables for linter 2016-09-19 21:07:43 -04:00
Ben Gotow 8bc3f04b70 fix(trial): Move”days left” bar to the sidebar, new design 2016-09-19 17:21:55 -07:00
Jackie Luo b6b3512639 fix(subscription): Remove hardcoded trial length 2016-09-14 11:21:48 -07:00
Juan Tejada d383d3e637 fix(build): Fix lint errors 2016-09-14 10:14:50 -07:00
Ben Gotow 7533c7ae81 feat(tutorial): Overlay bubbles that guide you through initial features
Summary:
Add header to show how many trial days remain

More rendering out of Store, consolidate registry and store and expose via new serviceRegistry

WIP

Merge branch 'master' into hallamoore/feature-walkthrough-tutorial

Switch to using observable instead of AbortablePromise

Update submodule

WIP

WIP

Remove annotations

Remove changes

WIP

Test Plan: No tests

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3260
2016-09-13 02:29:38 -04:00
Jackie Luo 50f9a91270 fix(identity): Modify language around subscribing 2016-07-26 15:46:50 -07:00
Ben Gotow 5f13982399 fix(pro): Replace subscriptionRequiredAfter 2016-06-10 14:36:37 -07:00
Evan Morikawa c4753197ee fix(analytics): improved analytics 2016-06-07 13:38:47 -07:00
Ben Gotow 8a71c23bb4 fix(pro): Upgrade buttons go to /payment 2016-05-31 12:24:38 -07:00
Ben Gotow c6354feb41 feat(pro): New Nylas identity provider, onboarding and auth
commit 50d0cfb87c
Author: Ben Gotow <bengotow@gmail.com>
Date:   Fri May 27 14:01:49 2016 -0700

    IdentityStore conveniene methods for subscription state

commit 80c3c7b956
Author: Ben Gotow <bengotow@gmail.com>
Date:   Fri May 27 12:03:53 2016 -0700

    Periodically refresh identity, show expired notice in top bar

commit 5dc39efe98
Merge: 4c4f463 906ea74
Author: Juan Tejada <juans.tejada@gmail.com>
Date:   Thu May 26 15:17:46 2016 -0700

    Merge branch 'bengotow/n1-pro' of github.com:nylas/N1 into bengotow/n1-pro

commit 4c4f463f4b
Author: Juan Tejada <juans.tejada@gmail.com>
Date:   Thu May 26 15:16:48 2016 -0700

    Hijack links inside email that go to billing site and add SSO to them

commit 906ea74807
Author: Ben Gotow <bengotow@gmail.com>
Date:   Thu May 26 12:02:29 2016 -0700

    Add custom welcome page for upgrading users

commit 2ba9aedfe9
Author: Juan Tejada <juans.tejada@gmail.com>
Date:   Wed May 25 17:27:12 2016 -0700

    Add styling to Subscription tab in prefs

commit 384433a338
Author: Ben Gotow <bengotow@gmail.com>
Date:   Wed May 25 16:21:18 2016 -0700

    Add better style reset, more IdentityStore changes

commit c4f9dfb4e4
Author: Ben Gotow <bengotow@gmail.com>
Date:   Wed May 25 15:29:41 2016 -0700

    Add subscription tab

commit bd4c25405a
Author: Ben Gotow <bengotow@gmail.com>
Date:   Wed May 25 14:18:40 2016 -0700

    Point to billing-staging for now

commit 578e808bfc
Author: Ben Gotow <bengotow@gmail.com>
Date:   Wed May 25 13:30:13 2016 -0700

    Rename account helpers > onboarding helpers

commit dfea0a9861
Author: Ben Gotow <bengotow@gmail.com>
Date:   Wed May 25 13:26:46 2016 -0700

    A few minor fixes

commit 7110217fd4
Author: Ben Gotow <bengotow@gmail.com>
Date:   Wed May 25 12:58:21 2016 -0700

    feat(onboarding): Nylas Pro onboarding overhaul

    Summary:
    Rip out all invite-related code

    Enable Templates and Translate by default

    Scrub packages page, unused code in onboarding pkg

    Remove resizing

    New onboarding screens

    IMAP provider list, validation

    Call success with response object as well

    Renaming and tweaks

    Test Plan: No tests yet

    Reviewers: evan, juan, jackie

    Differential Revision: https://phab.nylas.com/D2985

commit dc9ea45ca9
Author: Ben Gotow <bengotow@gmail.com>
Date:   Wed May 25 12:52:39 2016 -0700

    Renaming and tweaks

commit 5ca4cd31ce
Author: Ben Gotow <bengotow@gmail.com>
Date:   Wed May 25 11:03:57 2016 -0700

    Call success with response object as well

commit 45f14f9b00
Author: Ben Gotow <bengotow@gmail.com>
Date:   Tue May 24 18:26:38 2016 -0700

    IMAP provider list, validation

commit c6ca124e6e
Author: Ben Gotow <bengotow@gmail.com>
Date:   Sat May 21 11:14:44 2016 -0700

    New onboarding screens

commit dad918d926
Author: Ben Gotow <bengotow@gmail.com>
Date:   Thu May 19 16:37:31 2016 -0700

    Remove resizing

commit ecb1a569e2
Author: Ben Gotow <bengotow@gmail.com>
Date:   Thu May 19 16:36:04 2016 -0700

    Scrub packages page, unused code in onboarding pkg

commit 3e0a44156c
Author: Ben Gotow <bengotow@gmail.com>
Date:   Thu May 19 16:33:12 2016 -0700

    Enable Templates and Translate by default

commit 0d218bc86f
Author: Ben Gotow <bengotow@gmail.com>
Date:   Thu May 19 16:30:47 2016 -0700

    Rip out all invite-related code
2016-05-27 14:21:19 -07:00
Ben Gotow 17ed847240 fix(401/403): Unify error bars, query /account, improve reconnect flow
Summary: See https://paper.dropbox.com/doc/Sync-disabling-for-N1-URZmjVpSSxWFvjC62TiFI

Test Plan: Tests incoming

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2959
2016-05-13 14:16:54 -07:00
Ben Gotow 42ef0e98a4 fix(lint): Various linter issues 2016-05-06 16:06:16 -07:00
Evan Morikawa 837627aa39 feat(babel6): 1,774 linter errors 2016-05-06 11:55:46 -07:00
Ben Gotow 5220b471e3 fix(db): Counts no longer require Thread table join 2016-04-11 13:51:31 -07:00
Ben Gotow b4b67c65c9 fix(initial-sync): Fix sync sidebar showing all the time 2016-04-11 00:43:06 -07:00
Ben Gotow 227bc81736 fix(sync-errors): Improve display of sync errors and offline status
- Make the retry interval go 2 sec, 3.4s, 6 sec...
- Only show the connection status bar if the interval is > 5 seconds, in case the error was temporary.
- Do not show sync errors in the sidebar. The only available action is "Try Again", and we try again on our own. The error is frustrating and the user can't do anything about it anyway.
2016-04-08 13:52:26 -07:00
Ben Gotow 5989fa7e52 fix(error): Show actual API domain in connection error bar 2016-04-06 12:35:30 -07:00
Ben Gotow e08c7fe9d4 fix(notifs): _.reject does not support dict, Sentry 26699 2016-04-05 13:10:39 -07:00
Ben Gotow 26fe05153c feat(offline-status): Show a bar when not connected to the API
Summary:
The TaskQueue does it's own throttling and has it's own processQueue retry timeout, no need for longPollConnected

Remove dead code (OfflineError)

Rename long connection state to status so we don't ask for `state.state`

Remove long poll actions related to online/offline in favor of exposing connection state through NylasSyncStatusStore

Consoliate notifications and account-error-heaer into a single package and organize files into sidebar vs. header.

Update the DeveloperBarStore to query the sync status store for long poll statuses

Test Plan: All existing tests pass

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2835
2016-04-04 17:11:09 -07:00
Ben Gotow 39768fd9d4 bump(react): 0.13.2 => 0.14.7
Great breakdown of React changes here:
https://github.com/facebook/react/blob/master/CHANGELOG.md#0140-october-7-2015

Due to deprecation warnings, I don't think this will break third-party extensions unless they were doing really bad things.
2016-03-29 01:43:12 -07:00
Jackie Luo c49d523e8f 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
Juan Tejada 812b64edec fix(snooze): Correctly query and create snooze categories per account
Summary:
- Was not properly updating the references to snoozed categories when
  accounts were added or removed
- Update whenCategoriesReady to make sure we listen until category syncing has concluded (Move inside CategoryStore)
- #1676, #1658

Test Plan: - TODO

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2723
2016-03-14 15:36:39 -07:00