Open felixarntz opened 5 years ago
@felixarntz updated the text. For the "recently created" cases, could we increase the time frame to 2 (or even 3) days? Especially for SC, it's unlikely there will be enough data in 2 days to show something meaningful.
Looks like a good start here @felixarntz - a few questions for you:
isCurrentEntityNew
and isSiteNew
don't appear to be used other than adding the selectors
currentEntityPublishedAt
and oldestEntityPublishedAt
values, then we could use that to implement the same selectors you described.Add
Context::is_site_new()
, which queries posts (of any public post type) to get the oldest post and checks if its creation date is not older than 1 day.
Similar to the needs of hasConnectedAdmins
I think we should implement an option to store this value in so we don't trigger unnecessary DB queries for the oldest post on every Site Kit page load.
The selector should require
accountID
andpropertyID
, as parsing the account ID is not fully correct
propertyID
rather than accountID::propertyID
we could grab it with state.properties[ propertyID ]
. Nevertheless, I understand the accountID
is necessary to make the request to the new datapoint though so I suppose this is okay 👍 Aside from that, this would still result in many widgets on the page rendering the same message in a blue CTA component, would it not? Maybe it would be better to conditionally render the entire widget area rather than specific widgets that are all likely to show the same CTA? Is there a case where some widgets should still be shown in an area which is inherently tied to some data? I don't recall if this was ever discussed in an issue before but I feel like there was a desire to render some alternate layout with less duplication of "no data" in known no data states.
Noting here that it would be great to revisit this as we do get many support topics asking for more details about these messages.
Thanks @bethanylang! Could you share some of the support topics to see what exactly people are confused about? @aaemnnosttv I'm working with Aaron on the zero-state dashboard, but this is still in early UXD stages. In the meantime, it would be great to surface clearer messages. @felixarntz does anything change in terms of widget rendering here given all the refactoring of JS APIs and components that's been completed in the meantime? How big of a lift is this?
@marrrmarrr Sure thing!
As you can see, there seems to be some concern that something is "wrong" based upon the "gathering data" messages, as opposed to this being a message indicating that things are connected, but data is not yet available. Felix mentioned on a meeting yesterday that it might be helpful to provide some more personalized detail here if possible, i.e. "Analytics was successfully connected on DD/MM/YYYY. It takes a few days to collect data for display here. Please check back later."
@felixarntz @marrrmarrr I spotted this ticket in the Backlog column as a P0. I presume this will actually relate to the work we want to complete in the new Zero Data States epic. Should we consider this together rather than progressing with this ticket, and then doing UX on Zero Data States afterwards?
@eclarke1 Good point. The main focus of this issue is to implement logic and provide more specific messaging for why there may not be data available (e.g. Analytics property was just created, site has no content yet etc.).
I'd say it's decoupled from the UX work in the epic, but it does make sense to consider it together. This one would actually be a good candidate for a small PRD and design doc, so I wonder whether we should still treat it as its own epic (e.g. "Tailored zero state messages"), since none of the two parts needs to block the other one at all. Thoughts @marrrmarrr?
We haven't prioritized this for Q3 though, maybe we should look into it for Q4. Technically, this issue has been stalled for a while, so I'll now finally mark it as such.
@felixarntz that's really great o understand thank you. I will create a new epic in Asana and add to the backlog for "Tailored zero state messages" and we can certainly consider it's priority for Q4. Good to know the "Zero data states" epic is separate also, and they do not block each other.
@felixarntz do you mean this would involve changes in the logic of displaying all zero states?
@marrrmarrr Yes, it would be about adding logic to get more helpful messages on why there might be a certain zero state. Instead of just saying "You have no data" it could based on additional logic include notes like:
Feature Description
The blue CTAs for when there's no data for a page should provide more contextual information, partly based on new checks.
This will require both changes in wording and a few new logic bits.
Here is a current screenshot:
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
dashboard-details
) and the page was created in the last day, display: Heading: Search Console gathering data Text: This page was recently created - as soon as people start finding it in Search, you'll see information about clicks and impressions here.dashboard-details
) and the page was created in the last day, display: Heading: Analytics gathering data Text: This page was recently created - as soon as Analytics collects more data about it, you'll see it here.Implementation Brief
Entity::is_new()
in PHP, and expose it incore/site
selectorisCurrentEntityNew
:is_new
data should be set totrue
only for posts that have a creation date which is not older than 1 day, otherwise it should befalse
.core/site
selector calledisSiteNew
. Should be based on a PHP-to-JS provided value:Context::is_site_new()
, which queries posts (of any public post type) to get the oldest post and checks if its creation date is not older than 1 day.WidgetNoDataError
component in thecomponents/common
directory for Search Console and Analytics.CTA
component withtitle
anddescription
per the ACs.modules/analytics/data/property
(which relies on https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtReference/management/webproperties/get), using an updated version of thegetPropertyByID( accountID, propertyID )
selector:accountID
andpropertyID
, as parsing the account ID is not fully correct (actually this is an oversight from #1707).getProperties
from before), should issue the request tomodules/analytics/data/property
.WidgetNoDataError
component inassets/js/googlesitekit/widgets/components
directory:moduleSlug
(required) andchildren
(optional).select( 'core/modules' ).getModule( moduleSlug )
(thename
property).div.googlesitekit-widget-no-data-error
, and inside of it:children
if it is present.CTA
component with today's standard "%s Gathering Data" title and "%s data is not yet available, please check back later." description (using the module name for the placeholder).WidgetNoDataError
component should be made publicly available viagooglesitekit.widgets.components.WidgetNoDataError
, and it should (also internally) be always imported from there (viaWidgets
).withData
HOC, modifyassets/js/components/notifications/nodata.js
:moduleSlug
as new first argument (existing arguments should follow).getNoDataComponent
to work properly.search-console
oranalytics
use the specificWidgetNoDataError
from the module as mentioned above, otherwise it should use the genericWidgetNoDataError
component (hard-coded because only needed for BC).ctaWrapper
call at the end.Changelog entry