site-kit-wp
site-kit-wp copied to clipboard
Handle the case where Analytics is disabled via googlesitekit_available_modules.
Summary
Addresses issue:
- #5071
Relevant technical choices
- Removed the Tag Manager dependency on the Analytics JS bundle so the Tag Manager bundle still loads when Analytics is disabled.
- Updated
get_available_modules
to filter out modules which are missing any of the dependencies specified in the module'sdepends_on
list. Practically speaking this means the Optimize module will also be removed if Analytics is disabled, as Optimizedepends_on
Analytics.
PR Author Checklist
- [x] My code is tested and passes existing unit tests.
- [x] My code has an appropriate set of unit tests which all pass.
- [x] My code is backward-compatible with WordPress 4.7 and PHP 5.6.
- [x] My code follows the WordPress coding standards.
- [x] My code has proper inline documentation.
- [x] I have added a QA Brief on the issue linked above.
- [x] I have signed the Contributor License Agreement (see https://cla.developers.google.com/).
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
- [ ] Run the code.
- [ ] Ensure the acceptance criteria are satisfied.
- [ ] Reassess the implementation with the IB.
- [ ] Ensure no unrelated changes are included.
- [ ] Ensure CI checks pass.
- [ ] Check Storybook where applicable.
- [ ] Ensure there is a QA Brief.
Merge Reviewer Checklist
- [ ] Ensure the PR has the correct target branch.
- [ ] Double-check that the PR is okay to be merged.
- [ ] Ensure the corresponding issue has a ZenHub release assigned.
- [ ] Add a changelog message to the issue.
Size Change: +6.62 kB (0%)
Total Size: 1.51 MB
Filename | Size | Change |
---|---|---|
./dist/assets/css/googlesitekit-admin-css-********************.min.css |
48.4 kB | +10 B (0%) |
./dist/assets/js/38-********************.js |
3.12 kB | +1 B (0%) |
./dist/assets/js/googlesitekit-activation-********************.js |
28.3 kB | +33 B (0%) |
./dist/assets/js/googlesitekit-adminbar-********************.js |
36.5 kB | +46 B (0%) |
./dist/assets/js/googlesitekit-api-********************.js |
9.24 kB | +2 B (0%) |
./dist/assets/js/googlesitekit-dashboard-********************.js |
73.9 kB | +1.95 kB (+3%) |
./dist/assets/js/googlesitekit-dashboard-details-********************.js |
64.5 kB | +239 B (0%) |
./dist/assets/js/googlesitekit-dashboard-splash-********************.js |
70.4 kB | +121 B (0%) |
./dist/assets/js/googlesitekit-data-********************.js |
2.12 kB | -6 B (0%) |
./dist/assets/js/googlesitekit-datastore-forms-********************.js |
8.97 kB | -1 B (0%) |
./dist/assets/js/googlesitekit-datastore-location-********************.js |
2.08 kB | +2 B (0%) |
./dist/assets/js/googlesitekit-datastore-site-********************.js |
15 kB | -3 B (0%) |
./dist/assets/js/googlesitekit-datastore-ui-********************.js |
9.07 kB | -1 B (0%) |
./dist/assets/js/googlesitekit-datastore-user-********************.js |
22.7 kB | -11 B (0%) |
./dist/assets/js/googlesitekit-idea-hub-post-list-********************.js |
26.3 kB | +29 B (0%) |
./dist/assets/js/googlesitekit-modules-********************.js |
19.7 kB | +14 B (0%) |
./dist/assets/js/googlesitekit-modules-adsense-********************.js |
68.9 kB | +202 B (0%) |
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js |
19.2 kB | +80 B (0%) |
./dist/assets/js/googlesitekit-modules-analytics-********************.js |
70.5 kB | +176 B (0%) |
./dist/assets/js/googlesitekit-modules-idea-hub-********************.js |
27.9 kB | +7 B (0%) |
./dist/assets/js/googlesitekit-modules-optimize-********************.js |
19.6 kB | -8 B (0%) |
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js |
18.4 kB | -2 B (0%) |
./dist/assets/js/googlesitekit-modules-search-console-********************.js |
38.4 kB | +45 B (0%) |
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js |
32.2 kB | +55 B (0%) |
./dist/assets/js/googlesitekit-modules-thank-with-google-********************.js |
26 kB | +233 B (+1%) |
./dist/assets/js/googlesitekit-settings-********************.js |
50.8 kB | +383 B (+1%) |
./dist/assets/js/googlesitekit-user-input-********************.js |
45.3 kB | +28 B (0%) |
./dist/assets/js/googlesitekit-vendor-********************.js |
331 kB | +3.4 kB (+1%) |
./dist/assets/js/googlesitekit-widgets-********************.js |
16.3 kB | -2 B (0%) |
./dist/assets/js/googlesitekit-wp-dashboard-********************.js |
59.3 kB | -403 B (-1%) |
./dist/assets/js/runtime-********************.js |
1.34 kB | +3 B (0%) |
ℹ️ View Unchanged
Filename | Size |
---|---|
./dist/assets/css/googlesitekit-adminbar-css-********************.min.css |
11.1 kB |
./dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css |
5.97 kB |
./dist/assets/js/31-********************.js |
2.8 kB |
./dist/assets/js/32-********************.js |
2.28 kB |
./dist/assets/js/33-********************.js |
3.72 kB |
./dist/assets/js/34-********************.js |
51.9 kB |
./dist/assets/js/35-********************.js |
16.1 kB |
./dist/assets/js/36-********************.js |
70.9 kB |
./dist/assets/js/37-********************.js |
31.6 kB |
./dist/assets/js/analytics-advanced-tracking-********************.js |
769 B |
./dist/assets/js/googlesitekit-base-********************.js |
1.13 kB |
./dist/assets/js/googlesitekit-i18n-********************.js |
3.92 kB |
./dist/assets/js/googlesitekit-idea-hub-notice-********************.js |
45.1 kB |
./dist/assets/js/googlesitekit-polyfills-********************.js |
379 B |
Hey @aaemnnosttv, I have merged develop
to resolve conflicts and fixed subsequently broken tests.
While fixing up for the AdminBarWidget
component I also spotted an out-of-date story which I have removed.