Skip to content

Conversation

@thabofletcher
Copy link
Contributor

@thabofletcher thabofletcher commented Dec 16, 2025

Ticket ENG-1532

Description Of Changes

Adds Global Privacy Control (GPC) translation fields to the Admin UI privacy experience configuration and updates fides-js to use dynamic translations from the database with static fallbacks.

This allows customers to customize all GPC-related text that appears in consent banners and modals, including the GPC label, title, description, and status labels.

Code Changes

Migrations and other changes have already been committed to main on fides and fidesplus, this is only the UI portion of the feature.

  • Admin UI:

    • Added 5 GPC text fields to the translation form for BANNER_AND_MODAL and MODAL experience types
    • Updated TypeScript types (ExperienceTranslation, ExperienceTranslationCreate) to include GPC fields
    • Added validation schema for GPC fields in translations-form-validations.ts
    • Added GPC fields to preview defaults in helpers.ts
  • fides-js:

    • Updated i18n-utils.ts to extract GPC fields from experience config translations
    • Updated GpcBadge.tsx to use dynamic exp.gpc_label and exp.gpc_status_*_label with static fallbacks
    • Updated ConsentContent.tsx to use dynamic exp.gpc_title and exp.gpc_description with static fallbacks
    • Updated consent-types.ts to include GPC fields in ExperienceConfigTranslation type

Steps to Confirm

Run fidesplus (slim on main branch) pointing to fides on this branch, then:

  1. Navigate to Consent > Experiences > Edit a BANNER_AND_MODAL experience
  2. Select a translation (e.g., English)
  3. Verify GPC fields appear: GPC label, GPC title, GPC description, GPC status applied label, GPC status overridden label
  4. Enable the GPC toggle in the preview panel
  5. Verify the preview shows the GPC info section with values from the form
  6. Modify a GPC field and verify the preview updates accordingly
  7. Save and verify the changes persist

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
    • No UX review needed
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created, update public-facing documentation
    • No documentation updates required

- Add 5 GPC columns to ExperienceTranslationBase: gpc_label, gpc_description,
  gpc_title, gpc_status_applied_label, gpc_status_overridden_label
- Migration populates fields from existing fides-js locale JSON files
@vercel
Copy link

vercel bot commented Dec 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
fides-plus-nightly Ready Ready Preview, Comment Dec 18, 2025 8:09pm
1 Skipped Deployment
Project Deployment Review Updated (UTC)
fides-privacy-center Ignored Ignored Dec 18, 2025 8:09pm

Required for fides_db_scan CI check to pass.
Migration now populates GPC fields for all existing translations,
using language-specific values from a hardcoded dict.
thabofletcher and others added 7 commits December 17, 2025 08:55
Admin UI:
- Add GPC text section to translation form for BANNER_AND_MODAL and MODAL types
- Update TypeScript types for GPC fields
- Add validation for GPC fields

fides-js:
- Update i18n-utils to extract GPC fields from experience config
- Update GpcBadge and ConsentContent to use dynamic strings with static fallback
GPC fields were being stripped from the preview because they weren't
in the defaultTranslation object used by translationOrDefault()
Removes the awkward dropdown/collapse and displays GPC fields
inline like the other translation fields.
@thabofletcher thabofletcher marked this pull request as ready for review December 17, 2025 19:19
@thabofletcher thabofletcher requested a review from a team as a code owner December 17, 2025 19:19
@thabofletcher thabofletcher requested review from lucanovera and removed request for a team December 17, 2025 19:19
Base automatically changed from ENG-1532-gpc-dynamic-strings-migration to main December 17, 2025 20:11
@thabofletcher thabofletcher requested a review from a team as a code owner December 17, 2025 20:11
@thabofletcher thabofletcher removed the request for review from a team December 17, 2025 20:11
@thabofletcher thabofletcher removed the request for review from johnewart December 17, 2025 23:21
@thabofletcher
Copy link
Contributor Author

Removed backend review - some migration code snuck in but that has been cleaned up, this is all FE code now

@thabofletcher
Copy link
Contributor Author

I can't really cut down on the number of files that need to be changed - its is required to make the change and have all the tests pass.

@thabofletcher
Copy link
Contributor Author

@greptileai

Copy link
Contributor

@lucanovera lucanovera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Followed steps to reproduce, everything works correctly, even tried it with a different language. Code changes look good. Approved!

@thabofletcher thabofletcher added this pull request to the merge queue Dec 19, 2025
Merged via the queue into main with commit 46c464f Dec 19, 2025
47 of 48 checks passed
@thabofletcher thabofletcher deleted the ENG-1532-gpc-dynamic-strings-ui branch December 19, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants