Skip to content
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

TCF modal display data #3879

Merged
merged 12 commits into from
Aug 7, 2023

Conversation

allisonking
Copy link
Contributor

@allisonking allisonking commented Jul 31, 2023

Closes #3809

Description Of Changes

https://www.loom.com/share/0c8b1c05f6be4f99aab109435d808a8a?sid=ebaa2503-68b3-43ff-aa07-b925982eddb5

Important caveats

Code Changes

  • Display purposes, features, and vendors in tabs
  • Hook up toggles

Steps to Confirm

  • Run nox -s dev in fides to start the backend
  • tcf_enabled needs to be set to True: make a PATCH to /consent-settings and set tcf_enabled: true in the request body
  • Use a VPN to go to an EU location, i.e. France
  • To add purposes, you need a system with at least one data use that belongs to a GVL purpose or special purpose. For example, data_use: "essential.fraud_detection" maps to Special Purpose #1
  • You can do this through the admin-ui: run turbo dev in clients/admin-ui and then visit localhost:3000
  • In clients/privacy-center, run turbo dev. If you have the admin-ui running, this will start the privacy center at localhost:3001
  • Visit localhost:3001/fides-js-demo.html
  • The banner should appear and you should be able to click “Manage preferences” to see the TCF modal
  • To add vendors, attach an integration to a system that has a GVL data use (i.e. set up an amplitude integration with the system from step 5)

Pre-Merge Checklist

@cypress
Copy link

cypress bot commented Jul 31, 2023

Passing run #3460 ↗︎

0 4 0 0 Flakiness 0

Details:

Merge 09e17ac into 58ded79...
Project: fides Commit: d6cd0d4b44 ℹ️
Status: Passed Duration: 01:02 💡
Started: Aug 1, 2023 7:25 PM Ended: Aug 1, 2023 7:26 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@@ -122,41 +122,3 @@ export const NoticeConsentButtons = ({
/>
);
};

interface TcfConsentButtonProps {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved this to its own file

@@ -28,7 +28,7 @@ const Toggle = ({
onChange={() => {
onChange(id);
}}
defaultChecked={checked}
checked={checked}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is kind of a weird thing, but it turns out defaultChecked only provides the initial value. this started not to work when I added the "select all/deselect toggles" which wanted to control other toggles' state. This seems to work well, though I had to update the cypress tests now that the checked prop is a lil different

more info: https://stackoverflow.com/questions/33131413/react-defaultchecked-dont-render-check-attribute-on-second-load

@allisonking allisonking marked this pull request as ready for review August 1, 2023 15:28
@allisonking allisonking mentioned this pull request Aug 1, 2023
7 tasks
@eastandwestwind eastandwestwind merged commit 0829b05 into aking/3809/tcf-modal Aug 7, 2023
@eastandwestwind eastandwestwind deleted the aking/3809/tcf-modal-display branch August 7, 2023 22:22
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