-
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
Refactor setup success notification to take module-specific copy adjustments from datastore #4171
Comments
IB ✅ |
The ACs here mention Analytics and PageSpeed Insights, but the IB deals with Analytics and Optimize. I totally missed that when reviewing 🤦🏻 I think it should be fine to change to PageSpeed Insights from Optimize, and mentioned as much in my PR review. Is that alright @asvinb? Sorry about that! 😓 |
@tofumatt Actually is there a possibility that the AC is wrong because the If you check the PSI module, it's not there. I completely missed that as well, with me focusing on where the filter is being used and it's used twice, not paying much attention to which modules exactly. What do you think? |
Hmm, that makes sense. From my perspective this code is good-to-go, so I'll assign @felixarntz to do the merge review. If it turns out the ACs here were wrong can you update them @felixarntz and merge this? Just wanna make sure 🙂 |
QA update:
|
Ah, the QA brief here is… well, it's complete in that it doesn't mention needing the Unified Dashboard feature flag enabled, but that's a bit strange for a "Unified Dashboard" epic feature. This issue is about laying the groundwork to do these notifications without filters, which will be used by the Unified Dashboard, but we don't actually have those notifications in the Unified Dashboard yet. So the QA steps outlined here should be done with the Unified Dashboard feature flag disabled. Sorry for the confusion! 😅 |
QA Update: ✅Verified:
|
A
googlesitekit.SetupWinNotification-${ slug }
filter is currently applied to allow other code to replace content in the setup success notification. This should be replaced by a mechanism relying on the respective module's data store.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
modules/analytics
andmodules/optimize
data stores should receive a new selectorgetSetupSuccessContent
that returns an object with the same data that is currently calledwinData
in the two modules' respective usage of thegooglesitekit.SetupWinNotification-${ slug }
filter.googlesitekit.SetupWinNotification-${ slug }
filter, theDashboardSetupAlerts
component should rely on the new selector in the respective module store if it exists, to get that information from there.googlesitekit.SetupWinNotification-${ slug }
filter in the two modules mentioned above should be removed as well.Implementation Brief
assets/js/modules/optimize/datastore/notification.js
which contains thegetSetupSuccessContent
selector. The latter should return an object containing the samewinData
data as inassets/js/modules/optimize/index.js
.addFilter
inassets/js/modules/optimize/index.js
.assets/js/modules/optimize/datastore/index.js
to add the new data store partial usingcombineStores
.assets/js/modules/analytics/datastore/notification.js
which contains thegetSetupSuccessContent
selector. The latter should return an object containing the samewinData
data as inassets/js/modules/analytics-4/index.js
.addFilter
inassets/js/modules/analytics-4/index.js
.assets/js/modules/analytics/datastore/index.js
to add the new data store partial usingcombineStores
.assets/js/components/legacy-notifications/dashboard-setup-alerts.js
, remove the use ofgooglesitekit.SetupWinNotification-${ slug }
, to instead rely on thegetSetupSuccessContent
selector if it exists for the module to get the data.analytics
data store, by checking if thega4setup
feature flag is enabled. Refer toassets/js/modules/analytics-4/index.js
.Test Coverage
getSetupSuccessContent
selectors for both data stores.QA Brief
ga4setup
feature flag off. Check the notification component if it's displayed correctly.ga4setup
feature flag on. Check if the notification component displays correctly, with the text "You’ll only see Universal Analytics data for now. Learn more"Changelog entry
googlesitekit.SetupWinNotification-${ slug }
filter.The text was updated successfully, but these errors were encountered: