Automattic / newspack-plugin

An advanced open-source publishing and revenue-generating platform for news organizations.
https://newspack.com
GNU General Public License v2.0
325 stars 48 forks source link

Fivetran integration Connector statuses #1353

Open iuravic opened 2 years ago

iuravic commented 2 years ago

Describe the issue Not a bug, rather a feature and an improvement request.

Presently when a user authorizes a connector, and when they get redirected back to the Plugin's Conections interface, they don't see any status update on the connector at all: image

Apparently it takes some time for Fivetran to process our requests and create and activate the Connectors. But in the meantime our user which just went through the authorization process, gets the "Status: Not connected" and they see no status update on that very same connector. This is presently tricky as the users don't have a way of understanding the status right now.

To Reproduce Steps to reproduce the behavior:

  1. Go to Connections
  2. Click on 'connect' for any connector, e.g. Google Analytics
  3. Go though authorization
  4. Land back in Plugin's Connections interface and note that the connector status is unchanged

Expected behavior I propose we used pending statuses as a simple way to let the user know they did their part in connector creation and authorization. I propose we should be saving a simple timestamp when the user last got redirected back from a connector authorization, and the connector type, and during the next 5mins we displayed for that particular connector: 1. either the "connected" green status/check if Fivetran returns this status to us, 2. or a yellow/orange "pending" status with "Status: connection is being created".

When selecting how and where to store the timestamps for individual connector types, please also consider that in our next phase we will be onboarding non-Newspack users, too. And those will be using individual WP accounts on newspack.pub/wp-admin (or some other similar Newspack site), so that the statuses can be managed for them in the future in the same way.

adekbadek commented 2 years ago

Closed accidentaly, reopening.