site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Refactor of Consent Mode js to external file through webpack.

Open benbowler opened this issue 1 year ago • 3 comments

Summary

Addresses issue:

  • #8384

Relevant technical choices

Update and addressed all elements in the IB.

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 5.2 and PHP 7.4.
  • [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

  • [x] Run the code.
  • [x] Ensure the acceptance criteria are satisfied.
  • [x] Reassess the implementation with the IB.
  • [x] Ensure no unrelated changes are included.
  • [x] Ensure CI checks pass.
  • [x] Check Storybook where applicable.
  • [x] 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.

benbowler avatar Jun 18 '24 10:06 benbowler

Build files for a2efa3289eccfe1f5be6b9433a219dec0f50a7b9 are ready:

github-actions[bot] avatar Jul 02 '24 12:07 github-actions[bot]

Size Change: +853 B (+0.05%)

Total Size: 1.57 MB

Filename Size Change
./dist/assets/js/googlesitekit-events-provider-contact-form-7-********************.js 644 B -1 B (-0.16%)
./dist/assets/js/googlesitekit-events-provider-easy-digital-downloads-********************.js 623 B +8 B (+1.3%)
./dist/assets/js/googlesitekit-events-provider-ninja-forms-********************.js 731 B +4 B (+0.55%)
./dist/assets/js/googlesitekit-events-provider-optin-monster-********************.js 674 B +1 B (+0.15%)
./dist/assets/js/googlesitekit-events-provider-woocommerce-********************.js 657 B +5 B (+0.77%)
./dist/assets/js/googlesitekit-consent-mode-********************.js 836 B +836 B (new file) 🆕
ℹ️ View Unchanged
Filename Size
./dist/assets/css/googlesitekit-admin-css-********************.min.css 55.1 kB
./dist/assets/css/googlesitekit-adminbar-css-********************.min.css 11.2 kB
./dist/assets/css/googlesitekit-authorize-application-css-********************.min.css 770 B
./dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 7.47 kB
./dist/assets/js/30-********************.js 2.76 kB
./dist/assets/js/31-********************.js 2.25 kB
./dist/assets/js/32-********************.js 3.64 kB
./dist/assets/js/33-********************.js 935 B
./dist/assets/js/34-********************.js 892 B
./dist/assets/js/35-********************.js 3.12 kB
./dist/assets/js/analytics-advanced-tracking-********************.js 776 B
./dist/assets/js/googlesitekit-activation-********************.js 23.8 kB
./dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 59.4 kB
./dist/assets/js/googlesitekit-adminbar-********************.js 34.7 kB
./dist/assets/js/googlesitekit-api-********************.js 10.1 kB
./dist/assets/js/googlesitekit-components-gm2-********************.js 5.87 kB
./dist/assets/js/googlesitekit-components-gm3-********************.js 10.1 kB
./dist/assets/js/googlesitekit-data-********************.js 2.36 kB
./dist/assets/js/googlesitekit-datastore-forms-********************.js 9.07 kB
./dist/assets/js/googlesitekit-datastore-location-********************.js 2.08 kB
./dist/assets/js/googlesitekit-datastore-site-********************.js 19.8 kB
./dist/assets/js/googlesitekit-datastore-ui-********************.js 10 kB
./dist/assets/js/googlesitekit-datastore-user-********************.js 25.1 kB
./dist/assets/js/googlesitekit-entity-dashboard-********************.js 75.7 kB
./dist/assets/js/googlesitekit-events-provider-mailchimp-********************.js 629 B
./dist/assets/js/googlesitekit-events-provider-popup-maker-********************.js 634 B
./dist/assets/js/googlesitekit-events-provider-wpforms-********************.js 632 B
./dist/assets/js/googlesitekit-i18n-********************.js 3.92 kB
./dist/assets/js/googlesitekit-main-dashboard-********************.js 125 kB
./dist/assets/js/googlesitekit-modules-ads-********************.js 29.5 kB
./dist/assets/js/googlesitekit-modules-adsense-********************.js 113 kB
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js 145 kB
./dist/assets/js/googlesitekit-modules-********************.js 22.1 kB
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 22.7 kB
./dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 11.2 kB
./dist/assets/js/googlesitekit-modules-search-console-********************.js 58.2 kB
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js 31.9 kB
./dist/assets/js/googlesitekit-polyfills-********************.js 377 B
./dist/assets/js/googlesitekit-settings-********************.js 61.6 kB
./dist/assets/js/googlesitekit-splash-********************.js 72.7 kB
./dist/assets/js/googlesitekit-user-input-********************.js 48.1 kB
./dist/assets/js/googlesitekit-vendor-********************.js 320 kB
./dist/assets/js/googlesitekit-widgets-********************.js 62.9 kB
./dist/assets/js/googlesitekit-wp-dashboard-********************.js 61.5 kB
./dist/assets/js/runtime-********************.js 1.3 kB

compressed-size-action

github-actions[bot] avatar Jul 02 '24 12:07 github-actions[bot]

I went through this with @aaemnnosttv, in our 1:1 today and I've updated this PR based on some comments there, notably:

  1. I added the prefix to the conversion event provider files here.
  2. I confirmed the webpack/frontendModules.config.js config does minify the code in production.
  3. I renamed the config to webpack/frontendModules.config.js from webpack/frontendScripts.config.js.

Moving to MR.

benbowler avatar Jul 05 '24 14:07 benbowler