-
Notifications
You must be signed in to change notification settings - Fork 295
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
Update view-only Search Funnel widget when Analytics is recoverable #5470
Comments
I noticed a somewhat related issue when investigating the IB for this and have raised a GitHub issue for it: #5505 |
IB ✅ |
QA Update:
|
Thanks for raising this @wpdarren, I can confirm that is indeed the expected behaviour, with the |
QA Update: ✅Verified:
search-funnel.mp4 |
The design looks a bit weird now with GM2+ because the now gray box can appear right on the gray background. This is not a release blocker since dashboard sharing isn't out anyway, but we need to look into a better experience for surfacing these "Data unavailable" messages. See screenshot below |
Feature Description
The Search Funnel widget is unique in that it is primarily a Search Console widget but also includes information from Analytics if it is connected. For view-only users, they will additionally see it only if Analytics is also shared with them.
In #5376, we added a new placeholder for widgets in a recoverable state, but since the Search Funnel widget only declares
search-console
as a module dependency, it still tries to render the Analytics components as usual, even when Analytics is in a recoverable state which results in a state like this:Here the Analytics data is requested in the SF widget and fails because it is attempted to with the current user's credential's instead of the module owner's due to it being in a recoverable state. Of course view-only users have no credentials so it fails.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
RecoverableModules
CTA, the same as if it were a standalone Analytics widgetImplementation Brief
Within
assets/js/modules/search-console/components/dashboard/SearchFunnelWidget/index.js
:showRecoverableAnalytics
, which istrue
whenviewOnly
istrue
and Analytics is recoverable.getRecoverableModules()
selector to retrieve the recoverable modules state.MODULES_ANALYTICS
selector which is conditionally called within the file, addshowRecoverableAnalytics
to the condition so the selector is only called whenshowRecoverableAnalytics
isfalse
.Within
assets/js/modules/search-console/components/dashboard/SearchFunnelWidget/Overview.js
:showRecoverableAnalytics
, or pass it in as a prop from theSearchFunnelWidget
component.MODULES_ANALYTICS
->isGatheringData()
selector, addshowRecoverableAnalytics
to the condition so the selector is only called whenshowRecoverableAnalytics
isfalse
.RecoverableModules
CTA:showAnalytics
boolean istrue
only whenshowRecoverableAnalytics
isfalse
.Cell
containers are rendered whenshowRecoverableAnalytics
isfalse
. In practice this should only mean updating the condition for renderingWidgetReportError
as the others won't render anyway in the scenario whereshowRecoverableAnalytics
will resolve tofalse
.Cell
containing aRecoverableModules
component, rendered whencanViewSharedAnalytics
andanalyticsModuleActiveAndConnected
aretrue
andshowRecoverableAnalytics
istrue
.Storybook
Test Coverage
QA Brief
dashboardSharing
feature flag is enabled in the tester plugin.Search Funnel
module with other roles.Analytics
module.Analytics
module.Analytics
module recoverable.View Only
user.Search Funnel
widget displays a CTA that says:Data Unavailable: Analytics data was previously shared by an admin who no longer has access. Please contact another admin to restore it.
Changelog entry
The text was updated successfully, but these errors were encountered: