-
Notifications
You must be signed in to change notification settings - Fork 72
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
support new query string initialize=false
#4900
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Passing run #7840 ↗︎
Details:
Review all test suite changes for PR #4900 ↗︎ |
542a15b
to
d7b4b87
Compare
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.
Minor nits, and one suggestion to make it easier to reason about the Fides.config internal variable for our future selves...
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.
Looks great! Do we still need the reinitialize
function? Seems like it's no longer needed as it's the same as init
being called without any arguments.
Since |
Closes PROD-2086
Description Of Changes
Add a
/fides.js?initialize=false
option to the Privacy Center that disables the initialization but still stores the server-side “config” in thewindow.Fides
object that FidesJS can access later viainit()
.Takes advantage of the
window.Fides.config
property thatreinitialize
is using. When that property exists, we use it for the initialization (which in turn simplifies reinitialize since it doesn't need to be passed in as a property every time).Code Changes
fides.ts
andfides-tcf.ts
to take advantage ofwindow.Fides.config
(this.config
), if it exists, when initializing fides.jsreinitialize()
to not pass it in toinit()
now that it's already self aware of that propertyinit()
function if query stringinitialize=false
is present.Steps to Confirm
/fides-js-demo.html?initialize=false
window.Fides.config.options.fidesPrimaryColor = "#008000"
)window.Fides.init()
command.Pre-Merge Checklist
CHANGELOG.md