-
Notifications
You must be signed in to change notification settings - Fork 84
ENG-1532: Add GPC translation fields - Frontend/UI #7137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Required for fides_db_scan CI check to pass.
3c46603 to
e4608a2
Compare
Migration now populates GPC fields for all existing translations, using language-specific values from a hardcoded dict.
8e84566 to
914b1c0
Compare
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.
914b1c0 to
0a3ce61
Compare
1c97b1f to
56d2e14
Compare
|
Removed backend review - some migration code snuck in but that has been cleaned up, this is all FE code now |
|
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. |
lucanovera
left a comment
There was a problem hiding this 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!
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:
ExperienceTranslation,ExperienceTranslationCreate) to include GPC fieldstranslations-form-validations.tshelpers.tsfides-js:
i18n-utils.tsto extract GPC fields from experience config translationsGpcBadge.tsxto use dynamicexp.gpc_labelandexp.gpc_status_*_labelwith static fallbacksConsentContent.tsxto use dynamicexp.gpc_titleandexp.gpc_descriptionwith static fallbacksconsent-types.tsto include GPC fields inExperienceConfigTranslationtypeSteps to Confirm
Run fidesplus (slim on main branch) pointing to fides on this branch, then:
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works