Apply overrides during initialization#6157
Merged
gilluminate merged 4 commits intomainfrom May 21, 2025
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
eastandwestwind
requested changes
May 20, 2025
| fides.experience?.non_applicable_privacy_notices, | ||
| fides.experience?.privacy_notices, | ||
| options.fidesConsentFlagType ?? undefined, | ||
| options.fidesConsentNonApplicableFlagMode ?? undefined, |
Contributor
There was a problem hiding this comment.
Can we add a test for ensuring the GTM related flags get initialized correctly? We can probably just add an assertion to existing tests
Contributor
Author
There was a problem hiding this comment.
Those are no longer just for GTM, and the related tests are in the applyOverridesToConsent section of clients/fides-js/__tests__/lib/consent-utils.test.ts. Is there more you think needs to be done there?
Contributor
Author
There was a problem hiding this comment.
Oh, sorry, I think I see what you mean... On the Cypress tests I've added some assertions for checking the window.option values.
eastandwestwind
approved these changes
May 21, 2025
b1ca3a5 to
c542cfe
Compare
fides
|
||||||||||||||||||||||||||||
| Project |
fides
|
| Branch Review |
main
|
| Run status |
|
| Run duration | 00m 49s |
| Commit |
|
| Committer | Jason Gill |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
5
|
| View all changes introduced in this branch ↗︎ | |
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.
Closes ENG-459
Description Of Changes
Fixes issue where
Fides.consentwasn't respectingfidesConsentFlagTypeandfidesConsentNonApplicableFlagModeoverrides until after a consent choice. This update ensures that value applies those overrides during initialization as well.Code Changes
Fides.cookie.consentvalue through theapplyOverridesToConsentmethod before using it to initialize theFides.consentvalue.Steps to Confirm
6senseto system, which will give a handful of notices. Only enable 1 or 2 of the notices and add them to the US Modal Experience and enable it.Fides.consentand press enter to get the initialized value of thewindow.Fides.consentobject. (NOTE: this will be reflected on the demo page under Consent JSON section as well).{ marketing: "not_applicable", analytics: "not_applicable", ... }depending which notices were left disabled in step 1.Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works