feat: Civic cookie banner#16161
Merged
Merged
Conversation
…v2 defaults) (#16128) * basic Civic cookie banner set up & styling overrides * feat: extract cookie consent localized text into separate module * style: add a new color token & update styling for cookie banner * feat: scaffold localized text for all supported cookie banner locales * added another placeholder for optional cookie category * fix formatting/linting issues * feat: scaffold optional cookie categories with functional cookie list * refactor: move cookie control JS files into civic_cookie_control/ folder * docs: add COOKIE_CONTROL_API_KEY to README env vars * feat: populate cookie lists for performance and personalized advertising categories * feat: set gtag Consent Mode v2 defaults to denied before GTM loads * styling fixes * feat: enable consent logging for testing * refactor: remove manual gtag consent callbacks as it will be handled by Civic GTM Template (TP1-3991) * feat: scaffold optional cookie category text for all locales and add ES localized banner text * feat: add FR localized banner text * refactor: reorder text keys to match English structure and document closeLabel usage * feat: add SW localized banner text * feat: add NL localized banner text * feat: add PL localized banner text * feat: add PT localized banner text * fix formatting/linting issues * revert: remove optional cookie categories work (deferred to TP1-4033) * revert: remove optional cookie categories work (deferred to TP1-4033) * feat: add placeholder cookie categories and TODOs for TP1-4033 * chore: add dev-only logging and placeholder cookie categories for PR testing * small fixes * Move console.log to after the config has been loaded * Remove extra code
Updated to reflect the new Pro Multisite licence.
* feat(cookie-control): add CCPA mode detection and ccpaConfig scaffolding * feat(cookie-control): apply CCPA-specific text overrides across all locales * style(cookie-control): move ...CCPA_CONFIG_SHARED to last key in all ccpaConfig blocks * style(cookie-control): fix formatting/linting issues * remove extra line * fix(cookie-control): align ccpaConfig.rejectButton with rejectSettings across all locales * Revert "fix(cookie-control): align ccpaConfig.rejectButton with rejectSettings across all locales" This reverts commit b68c923. * refactor(cookie-control): extract CCPA opt-out label into CCPA_TITLE and align rejectButton with rejectSettings * fix(cookie-control): remove draft prefixes from localized ccpaConfig descriptions * chore(cookie-control): add CCPA_TITLE for nl, note missing OneTrust CCPA text for pl * fix(cookie-control): fall back ca and fy to English until translations are sourced * fix(cookie-control): remove [WIP] placeholders and fall back pl to English - Drop the [WIP] prefix from all localized closeLabel values; a TODO comment is left in place until proper translations are sourced. - Move Polish (pl) out of CCPA_TITLE's inline object and into the English-fallback block alongside ca and fy, mirroring the pattern used for those locales. - Replace the [WIP] Polish ccpaConfig description and name with the English text so the widget is functional rather than broken. * fix(cookie-control): replace misplaced fr ccpaConfig description with correct CCPA intro paragraph The French ccpaConfig.description was set to a single opt-out statement instead of the full cookie policy intro paragraph. Replaced with the correct French CCPA text. Also reformatted the nl ccpaConfig.description to use a separate line for readability (no content change). * fix(cookie-control): wrap CCPA buttons when container is too narrow * chore(cookie-control): remove dev-only cookie reset on page reload * fix(cookie-control): update CCPA_CONFIG_SHARED url and date to Mozilla privacy policy
* feat: add Civic Cookie Control banner to legacy base template * feat: add Civic Cookie Control banner to MozFest base template * Remove redundant code Co-authored-by: Ram <ramon@mozillafoundation.org> * remove extra line --------- Co-authored-by: Ram <ramon@mozillafoundation.org>
* Configure necessary and optional cookie categories * Update categories * Add missing categorie cookie and update labels --------- Co-authored-by: Mavis Ou <mmmavis@users.noreply.github.com>
…#16217) * feat(cookie-control): extract optionalCookies label/description into text.js * feat(cookie-control): resolve optionalCookies text per locale Extracts the static analytics/marketing config (cookies, callbacks) into BASE_OPTIONAL_COOKIES in init.js and adds withOptionalCookiesText to merge in the localized label/description from text.js, mirroring how withCCPATitle already handles the text/ccpaConfig overrides. Adds English placeholder label/description for analytics/marketing to each locale in text.js, matching the closeLabel pattern already used for other untranslated strings. Real translations land in TP1-4033. * style(cookie-control): use single-line strings for optionalCookies descriptions * feat(cookie-control): add real optionalCookies translations for de, es, fr, nl, pl, pt * docs(cookie-control): document OneTrust accept/reject label mismatch Restores and expands the TODO noting that accept/reject button text was copied as-is from OneTrust, where the English copy says "Accept/Reject Analytics Cookies" but non-English copy says a generic "accept/reject all cookies" — the two were already out of sync in the source and need reconciling once optional category names are confirmed. * fix(cookie-control): fix accept/reject button labels to match actual behavior Changes the English notify-banner accept/reject text from "Accept/Reject Analytics Cookies" to "Accept All"/"Reject All", since clicking either button actually toggles both the analytics and marketing optional categories together (verified live — both end up "accepted" or both "revoked"), not just analytics. This also brings English back in line with the other locales, which already used generic "accept/reject all cookies" wording, so the previously-documented OneTrust mismatch no longer applies and that TODO is removed.
* Remove OneTrust CMP from all Mozilla Foundation web properties * Remove obsolete code --------- Co-authored-by: Adalberto Cima <adalbertoc@mozillafoundation.org>
mmmavis
marked this pull request as ready for review
July 15, 2026 22:28
adalcima
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review app: https://foundation-s-feature-co-is8au1.mofostaging.net
Related ticket: Jira TP1-3923