-
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
Prevent the Analytics 4 module from being displayed unexpectedly in the UI. #6446
Comments
ACs here are good, moving to IB 👍🏻 |
IB ✔️ |
@sashadoes |
Hi @mohitwp, I don't know what is the Recover Module's modal, sorry. |
As mentioned on Slack, the "Recover Modules modal" refers to the Searching for However, these may not specifically cover how to get the Analytics module showing in the alert. This can be achieved as follows:
|
Feature Description
Due to the
shareable
flag being set for the GA4GET:report
datapoint (introduced in #6172), the Analytics 4 module is now determined to be a shareable module and thus displayed in the Dashboard Sharing modal.Note: To enable the GA4
GET:report
datapoint, turn on thega4Reporting
feature flag.We need to prevent the GA4 module from appearing in the Dashboard Sharing modal, while ensuring the Analytics sharing settings also apply to the GA4 module so that the
GET:report
endpoint can be shared.We should also ensure that the GA4 module does not appear in any other unexpected places in the UI, for example the Recover Modules modal.
It might be advisable, rather than taking GA4 as a special case, to make the solution generically applicable to all modules which are flagged as
internal
and are also shareable.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
ga4Reporting
feature enabled:GET:report
endpoint should be shareable when the Analytics module is shareable).internal
and is also shareable.Implementation Brief
assets/js/googlesitekit/modules/datastore/modules.js
, add a new selector,getShareableModules
with the following logic:shareableModules
logic from theDashboardSharingSettings
component and omit thegetID
selector. See:site-kit-wp/assets/js/components/dashboard-sharing/DashboardSharingSettings/index.js
Lines 48 to 57 in fed8b39
internal
along with the existingshareable
condition.filter
function.assets/js/components/dashboard-sharing/DashboardSharingSettings/index.js
, replace theshareableModules
logic with the value returned by the newgetShareableModules
selector.assets/js/googlesitekit/modules/datastore/modules.js
, update the*getRecoverableModules
resolver to check if the module is notinternal
along with the existingrecoverable
condition.Note: We could work on the logic on the server; however, our current codebase checks whether a module is
shareable
orrecoverable
on the client side. So, it's better to keep the logic on the client side.Test Coverage
getRecoverableModules
selector to ensure that theinternal
modules are not returned.getShareableModules
selector.QA Brief
Changelog entry
ga4Reporting
is enabled.The text was updated successfully, but these errors were encountered: