Skip to content

Cookie Consent: frontend Interactivity module [WOOA7S-1533]#49510

Draft
chihsuan wants to merge 7 commits into
add/cookie-consent-packagefrom
add/cookie-consent-frontend
Draft

Cookie Consent: frontend Interactivity module [WOOA7S-1533]#49510
chihsuan wants to merge 7 commits into
add/cookie-consent-packagefrom
add/cookie-consent-frontend

Conversation

@chihsuan

Copy link
Copy Markdown
Member

🚧 Not ready for review — in-progress draft, part of a 3-PR stack and stacked on #49509. Please don't review yet; I'll mark it ready and ping when it is.

Why

Part of WOOA7S-1533 — migrating CIAB shoppers-privacy into the standalone, plugin-agnostic cookie-consent package. This is PR 2 of 3: the frontend WP Interactivity API script module (TypeScript + SCSS).

Stack

  1. PR1 — scaffold (targets trunk)
  2. PR2 — frontend modulethis PR (targets add/cookie-consent-package)
  3. PR3 — PHP backend + module enqueue (targets PR2)

What this PR does

Ports the upstream frontend sources into src/modules/cookie-consent/ with a verbatim-copy → mechanical-rebrand commit discipline, so the divergence from upstream is reviewable commit-by-commit:

Commit What to review
copy verbatim byte-identical to upstream ciab-next sources (dir rename only) — the clean baseline
rebrand store + config global interactivity store cookie-consentjetpack/cookie-consent; config global wcConsentLoggerConfigjetpackCookieConsentConfig (+ optional eventPrefix)
configurable Tracks prefix tracks-utils.ts reads window.jetpackCookieConsentConfig?.eventPrefix || 'jetpack' (was hardcoded woocommerceanalytics), so consumers can brand their own events
rebrand CSS classes wc-cookie-consent*/wc-ccpa-*/wc-gdpr-*jetpack-cookie-consent*, in SCSS + JS selectors
eslint override + dead-directive cleanup soften jsdoc rules for the ported module (avoids injecting empty doc stubs); drop 6 type-assertion eslint-disable directives that are dead under jetpack's config
wc_consent_idjetpack_cookie_consent_id rebrand the (write-only) localStorage key

Build emits LTR + RTL CSS and the script module; eslint --max-warnings=0 and tsgo --noEmit are clean.

Notes

  • Kept faithful to upstream otherwise (e.g. the unused _stq Window typedef is preserved).
  • PHP wiring that enqueues this module lands in PR3.

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • 🔴 Add testing instructions.
  • 🔴 Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


🔴 Action required: Please include detailed testing steps, explaining how to test your change, like so:

## Testing instructions:

* Go to '..'
*

🔴 Action required: We would recommend that you add a section to the PR description to specify whether this PR includes any changes to data or privacy, like so:

## Does this pull request change what data or activity we track or use?

My PR adds *x* and *y*.

Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Jun 10, 2026
@chihsuan chihsuan force-pushed the add/cookie-consent-frontend branch from 7b27eb6 to ad7eb5f Compare June 10, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Cookie Consent [Status] In Progress [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant