Automattic / vip-cookie-banner

4 stars 0 forks source link

[FEATURE] Reduced unused javascript #23

Closed buchansm closed 1 year ago

buchansm commented 1 year ago

Optimized vip-cookie-banner plugin by removing the @automattic/privacy-toolset dependency, recreating the <CookieBanner /> and <DoNotSellDialog /> components, and lazy loading the components.

Description

Related Ticket URLs

PRS-794

Screenshots

Before: Mobile Score Desktop Score
image image
After: Mobile Score Desktop Score
image image
Component Views: Cookie Banner Customize Cookie Banner "Do Not Sell" Dialogue
image image image

Tested on:

Steps to Test

  1. Visit https://wpvip-valet.go-vip.net/
  2. Verify cookie banner and "do not sell" dialogue are functioning as intended
  3. Verify improved performance scores at: https://pagespeed.web.dev/
chaoticbear commented 1 year ago

@buchansm I realized that most of the problems I mentioned above are because of the extra commits brought in from the site repo. I've isolated your commits into this branch

https://github.com/Automattic/vip-cookie-banner/tree/b/reducing-unused-javascript--prs-794

Take a look and let me know if I missed anything. If it looks good I suggest recreating your PR based on that branch. I'm also going to create PRs for Bowman & Nathan's work that got mixed in there. After that we can put a stop to work on this plugin in the site repo to make things cleaner.

buchansm commented 1 year ago

@joshfleming, sounds good. I'm going to go ahead and close this PR since #26 includes all of the changes from this. I'll work off of that branch to get across the finish line.