New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "Gathering data" output to DataBlock component and update Site Kit Dashboard usage #4692
Comments
@tofumatt In the AC, it says:
Turns out we use the DataBlock in many instances, for e.g in the |
@asvinb The "gathering data..." should be displayed on any |
I see twenty files in total where we need to update the usage, so I'm on the fence about creating a new issue for the remaining ones. It'll be easier to QA everything all in one commit (easier for QA to spot a place where it's missing, for instance). Also: the approach will be similar throughout, so I figured it'd be best to do it all in one fell swoop. I think most of the usage is outside the Admin bar—I only see four AdminBar instances, and only four on the WP Dashboard as well. At that rate I think it's better to just combine everything into one issue 🙂 If you still think it's too much for a single issue though, let me know and maybe we can convert just one widget or something to start with, and file a new one for everywhere else. |
@tofumatt My main point is that the way other areas look, how their layout is, how much space there is available etc is quite different from the Site Kit dashboard. I can see how the design we've defined for So I'm just conscious of blocking everything from potential issues in just a part of it. That's why my suggestion would be to update all It's less about the amount of work to do, but more about the implications of the changes, potential problems etc. What do you think? |
Ah I see, sorry I misunderstood! Yes, in that case that makes total sense. Okay, let's do everything except WP Dashboard and Admin Bar in this issue. 👍🏻 (I've updated the ACs here to reflect this approach.) @asvinb Can you write that into the IB? I've filed #4711 to take care of the WP Dashboard and Admin Bar instances of |
Thanks @tofumatt IB updated! |
Looks great @asvinb! IB ✅ Just one thing to note here: the text should use an ellipsis so it's "gathering data…" and not "gathering data…." with four full-stops. (I've added it to the issue as well; it was mentioned in the ACs but kinda subtly.) I think that was a mistake in the Figma docs, but we should go with the ellipsis character. |
Note that I added in the ACs/IB changes below should only happen when the It might be good to actually pass props to |
QA Update: ❌@asvinb I have a number observations and realise they could be because we're still engineering and/or figma design 😄
These issues are possibly out of scope for this ticket but wanted to highlight them so it can be confirmed if we need to create new tickets or if these belong to another ticket still being engineered.
|
@wpdarren Good questions. Kindly find me feedback below:
Let me know if you need any more info. Thanks! |
@asvinb thank you for taking the time to look at the points in my comment, appreciate it. I will make a note of these and move this ticket on since it passes the QAB. |
Feature Description
In the Figma mockups for Zero Data States, all
DataBlock
components show "Gathering data…" text instead of their stat when they are gathering data. In order to allow components to render this, we should add a new propgatheringData
to theDataBlock
component that will render the "gathering data…" text as shown:We should add this functionality to all relevant components at the same time, both to make this easier to test. That will make this issue a bit larger but I think will overall streamline it and make it easier to track.
Note: the Figma designs/screenshots show "gathering data…." (with four full-stops), but they're slightly off. The ACs/IB in this issue use the text "gathering data…" with an ellipsis (
…
) character. The ellipsis version should be used in this issue.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
zeroDataStates
feature flag is enabled; when that flag is not enabled, the component should behave the same as before. Create azeroDataStates
feature flag #4726DataBlock
component should support showing a "gathering data" state by usage of agatheringData
boolean prop. This prop should befalse
by default.gatheringData
prop is set totrue
, the "gathering data…" output as shown in the Figma mocks/screenshot above should be shown instead of any data supplied to the component.SearchFunnelWidget
gathering Search Console data<DataBlock />
instances outside of the WordPress Dashboard (/wp-admin/
) and the Admin Bar to receive thegatheringData
prop from their parent component if the component does/can check forselect( module ).isGatheringData()
andisGatheringData
is true. Related issue Update DataBlock component usage to use the "Gathering data" prop #4711 will deal with the WP Dashboard/Admin Bar instances.Implementation Brief
zeroDataStates
feature flag is enabled.assets/js/components/GatheringDataNotice.js
which exports theGatheringDataNotice
functional component.size
prop which can be eithersmall
ornormal
.noBorder
boolean prop which isfalse
by default.overlay
boolean prop which isfalse
by default.gathering data…
message as per the designs in Figma on both, small and large screens, wrapped within ap
tag, itself wrapped within adiv
having thegooglesitekit-gathering-data-notice
class.assets/sass/components/global/_googlesitekit-gathering-data-notice.scss
.small
size, refer to the styled of the notice displayed in theAcquisition
section.normal
size, the notice should be styled as per the designs. Refer to the notice displayed under "Total impressions"noBorder
prop isfalse
, there should be a bottom border for the notice.overlay
istrue
, the notice should be styled as an overlay. Refer to how it is displayed on top of the graph for the Search Funnel widget.assets/js/components/DataBlock.js
,gatheringData
prop which isfalse
by default.gatheringData
istrue
, render theGatheringDataNotice
and do not render elements having the following selectors:.googlesitekit-data-block__datapoint
.googlesitekit-data-block__change-source-wrapper
.googlesitekit-data-block__sparkline
DataBlock
in the widgets below and check if its parent component does/can check forselect( module ).isGatheringData()
and its value should be passed to thegatheringData
prop. Widgets to look at:SearchFunnelWidget
ModuleOverviewWidget
DashboardOverallPageMetricsWidget
gatheringData
istrue
.Test Coverage
QA Brief
zeroDataStates
feature flag.Analytics
module.DashboardOverallPageMetricsWidget
component is rendering the "gathering data..." message.Changelog entry
The text was updated successfully, but these errors were encountered: