-
Notifications
You must be signed in to change notification settings - Fork 293
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
For 'View Only dashboard' – CTAs that shared users can't use should not appear #5346
Comments
@aaemnnosttv In the Asana task I saw you mentioned that instead of hiding the links we should show an entirely different CTA as the existing one isn't very actionable/usable to a "view-only" dashboard user. In this case I think we ought not to show anything at all, as the wording and info shown will likely be unclear/confusing to a user not familiar with AdSense setup. I think until AdSense is ready it'd be best not to show these CTAs at all rather than creating new CTAs that basically just tell the "view-only" user that their admin needs to complete some AdSense steps. What do you think? |
@tofumatt The problem with not showing anything at all is that you may be sending a view-only user to an empty dashboard if AdSense is the only shared module, in which case we'd need a different empty state 😄 We may still need this depending on how other issues go but having a placeholder widget would probably be the simplest solution here. Alternatively, we could maybe address this on the server side – maybe AdSense should only be considered shareable if it's in a "ready" state? This would also mean that the sharing settings would be unavailable for AdSense until it was ready too. If we knew the account or site isn't in a "blocked" state, we could treat it as a kind of gathering data state e.g. if AdSense is pending approval, etc. I'm not sure how we would handle things if the site wasn't approved though 🤔 Thoughts @felixarntz ? |
@aaemnnosttv @tofumatt We need to differentiate here:
In other words, can we avoid showing the "No ad impressions yet" box for view-only users and instead show a regular zero data state on the main AdSense widget? FWIW, this just makes me think that we should probably change this anyway in light of the Anyway, I think we need to keep some version of what is technically a zero data state showing for view-only users, but not the "Link Analytics and AdSense" one.
What do you mean by "ready" state? Modules can't be shared unless they have their setup completed, no? Again, this CTA is a relic of the AdSense V1 limitations where we didn't really know from the Site Kit side whether the AdSense setup is really ready or not. That is different now with V2 though. |
@felixarntz gotcha, I thought we had previously stored the account/site status before as well. You're saying with the v2 setup, AdSense will never be connected until the account + site statuses are in a ready state? |
@felixarntz the problem with showing the existing Edit: nevermind, I missed the part of your comment about doing away with this custom zero data state 😄 |
The IB here will show a zero/gathering data state for users instead of the "Link AdSense and Analytics" CTA. Given the discussion above, I think it would be better to show nothing for AdSense + Analytics not being linked when a view-only user views AdSense widgets. I think rendering nothing instead of the output here: site-kit-wp/assets/js/modules/adsense/components/dashboard/DashboardTopEarningPagesWidget.js Lines 197 to 206 in 7fe9ecf
Otherwise the above render will likely happen with the IB suggested, and that means view-only users will ALWAYS see this widget in a zero/gathering data state even though we'll never gather data for it since it isn't setup. Let's hide it entirely instead on a view-only dashboard. |
IB ✅ |
Bug Description
CTAs in the dashboard that are intended for admins, without any useful info or actionable links/items when viewed in a shared context, should not be shown to "shared"/view-only Dashboard users.
Instead, we should show a different CTA informing the user that the admin needs to take steps before the module will be useable. Alternatively, we could show the user nothing as there is currently nothing really to show.
Bug bash issue: https://app.asana.com/0/1202258919887896/1202419867342280 please refer to Asana issue for background
Steps to reproduce
Screenshots
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
AdSenseLinkCTA
component should not be shown in a view-only contextImplementation Brief
assets/js/modules/adsense/components/dashboard/DashboardTopEarningPagesWidget.js
:useViewOnly
hook, return theWidgetNull
component if the user has view-only accessAND
Adsense isn't linked.Test Coverage
stories/module-adsense-components.stories.js
, add a story to render theAdSenseLinkCTA
component if it isn't view-only contextAND
Adsense isn't linked.QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: