-
Notifications
You must be signed in to change notification settings - Fork 73
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
Disable GPP stub when initialize=false
is set until Fides.init()
is called
#5010
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
2ec6b24
to
6a69e36
Compare
Passing run #8427 ↗︎
Details:
Review all test suite changes for PR #5010 ↗︎ |
isTestMode // let end-to-end tests set the config and initialize as needed | ||
? "" | ||
: ` |
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.
we don't need isTestMode
anymore, now that we have intialize=false
isTestMode // let end-to-end tests set the config and initialize as needed | ||
? "" | ||
: ` | ||
var fidesConfig = ${fidesConfigJSON}; |
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.
no longer prints the config twice
(function () { | ||
if (window.fidesConfig?.experience?.gpp_settings?.enabled) | ||
document.write('<script src="./lib/fides-ext-gpp.js"><\/script>'); | ||
})(); |
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.
handled using query params now that gppEnabled
is on the config object
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.
This is great. Thanks!
Passing run #8428 ↗︎
Details:
Review all test suite changes for PR #5010 ↗︎ |
Closes PROD-2214
Description Of Changes
Initializing GPP without initializing Fides has been known to cause issues, especially in cases where Fides never gets initialized.
initialize=false
, ensure that GPP is not initialized at allFides.init()
is called, ensure that the GPP stub is initialized promptly and is not delayed by any other blocking logic (e.g. API calls, etc.)Code Changes
fides.js
response by not printing config object twice.gppEnabled
as part of the config options object (similar to existingtcfEnabled
)FidesInitializing
event for benefit of GPP initialization and other similar use casesFidesInitializing
to be dispatched before initializing GPP.Steps to Confirm
initialize
set to false (eg./fides-js-demo.html?gpp=true&initialize=false
)__gpp('ping', (data) => {console.log(data)})
__gpp
does not exist yet.window.Fides.init()
__gpp('ping', (data) => {console.log(data)})
Pre-Merge Checklist
CHANGELOG.md