Skip to content

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Jul 7, 2025

Closes ENG-399

Description Of Changes

Updates the GPP logic to handle a specific edge case. When the us_approach is set to ALL, and a user is in a supported US state that has no specific privacy notices, the system will now default to using the US national notices.

Code Changes

  • setsetGppNoticesProvidedFromExperience and setGppOptOutsFromCookieAndExperience to fall back to the US national GPP section (usnat) if the experience's region is a supported US state but has no associated notices.
  • Updated and added a unit test to validate that the GPP string correctly uses national fields when a supported state lacks its own notices.

Steps to Confirm

  1. Enable the combined State by State and US National consent setting
  2. Enable a National notice
  3. Create an experience with a state that is supported by GPP such as Montana or Texas and assign the US national notice to that experience
  4. Go to the demo page and check the GPP API using: __gpp('ping', (data) => {console.log(data)})
  5. Notice that the CMP API returns usnat as the parsed section

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 (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

Copy link

vercel bot commented Jul 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fides-plus-nightly ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2025 4:19pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
fides-privacy-center ⬜️ Ignored (Inspect) Jul 8, 2025 4:19pm

Copy link
Contributor

@eastandwestwind eastandwestwind left a comment

Choose a reason for hiding this comment

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

Looks solid, aside from the DRY follow-ups you've already mentioned.

One other thing: let's eval whether or not there are BE inconsistencies that need to be addressed before we release this code- see https://ethyca.atlassian.net/browse/ENG-399?focusedCommentId=46640

@gilluminate gilluminate merged commit da71bb5 into main Jul 8, 2025
17 checks passed
@gilluminate gilluminate deleted the gill/ENG-399/gpp-cmp-sections branch July 8, 2025 16:21
Copy link

cypress bot commented Jul 8, 2025

fides    Run #13091

Run Properties:  status check passed Passed #13091  •  git commit da71bb5a88: GPP sections default to national when no other notice applies and both State and...
Project fides
Branch Review main
Run status status check passed Passed #13091
Run duration 00m 50s
Commit git commit da71bb5a88: GPP sections default to national when no other notice applies and both State and...
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 5
View all changes introduced in this branch ↗︎

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.

2 participants