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

Add infrastructure for consent banner and link #3191

Merged
merged 61 commits into from May 13, 2023
Merged

Conversation

eastandwestwind
Copy link
Contributor

@eastandwestwind eastandwestwind commented Apr 29, 2023

Closes #3043 and #3051

Code Changes

  • Add consent infrastructure that renders dummy banner and link
  • Uses Preact + TSX
  • Link generation requires an HTML element with the id = 'fides-consent-link' somewhere on the page. We should either surface this info within the experience / notice flow OR make this configurable in privacy experiences

Steps to Confirm

Pre-requisites to test:

  • If you haven't already, install Turborepo globally so that you can use it on the command line npm install turbo --global
  • In clients folder, run npm install.

To test:

  • In clients/privacy-center folder, run turbo run dev, then navigate to http://localhost:3000/fides-js-components-demo.html
  • To test other configuration, you can edit the fidesConfig object passed into Fides.init() in privacy-center/public/fides-js-components-demo.html

Pre-Merge Checklist

Follow-up Tickets

@eastandwestwind eastandwestwind marked this pull request as draft April 29, 2023 02:06
Copy link
Contributor

@NevilleS NevilleS left a comment

Choose a reason for hiding this comment

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

Looking hawt! Couple comments on this WIP

clients/fides-js/.eslintrc.json Outdated Show resolved Hide resolved
clients/fides-js/package.json Outdated Show resolved Hide resolved
clients/fides-js/package.json Outdated Show resolved Hide resolved
clients/fides-js/src/fides-demo.html Outdated Show resolved Hide resolved
clients/fides-js/src/fides.ts Outdated Show resolved Hide resolved
clients/fides-js/src/lib/consent.tsx Outdated Show resolved Hide resolved
clients/privacy-center/cypress/e2e/consent-banner.cy.ts Outdated Show resolved Hide resolved
clients/privacy-center/cypress/e2e/consent-banner.cy.ts Outdated Show resolved Hide resolved
clients/privacy-center/public/fides-consent-demo.html Outdated Show resolved Hide resolved
@cypress
Copy link

cypress bot commented May 1, 2023

Passing run #1946 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge 6920461 into 061d65d...
Project: fides Commit: beb690af0a ℹ️
Status: Passed Duration: 01:13 💡
Started: May 13, 2023 6:07 PM Ended: May 13, 2023 6:09 PM

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

Base automatically changed from 771-turborepo-poc to main May 5, 2023 19:42
Copy link
Contributor

@NevilleS NevilleS left a comment

Choose a reason for hiding this comment

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

Couple comments that I was thinking about recently - I think we can architect this in a super clean and functional way to make this easy to incrementally build, but want your $0.02 on it too

clients/fides-js/src/lib/consent-types.ts Outdated Show resolved Hide resolved
clients/fides-js/src/fides.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@NevilleS NevilleS left a comment

Choose a reason for hiding this comment

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

Couple comments that I was thinking about recently - I think we can architect this in a super clean and functional way to make this easy to incrementally build, but want your $0.02 on it too

Copy link
Contributor

@NevilleS NevilleS left a comment

Choose a reason for hiding this comment

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

Couple comments that I was thinking about recently - I think we can architect this in a super clean and functional way to make this easy to incrementally build, but want your $0.02 on it too

author eastandwestwind <eastandwestwind@gmail.com> 1682459940 -0600
committer eastandwestwind <eastandwestwind@gmail.com> 1683584073 -0400

banner infra- note this does not yet work
Copy link
Contributor

@NevilleS NevilleS left a comment

Choose a reason for hiding this comment

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

OK, looking good so far!

There are some large structural asks in this review- hopefully we're at a point now where we have a solid test harness for all the logic so we can retool this to fit our liking.

Let me know what you think is realistic to achieve for a first version, and what we should split out and ticket as follow-up changes

clients/fides-js/.eslintrc.json Outdated Show resolved Hide resolved
clients/fides-js/package.json Outdated Show resolved Hide resolved
clients/fides-js/package.json Outdated Show resolved Hide resolved
clients/fides-js/rollup.config.mjs Show resolved Hide resolved
clients/fides-js/src/fides.ts Outdated Show resolved Hide resolved
clients/privacy-center/cypress/e2e/consent-banner.cy.ts Outdated Show resolved Hide resolved
clients/privacy-center/cypress/e2e/consent-banner.cy.ts Outdated Show resolved Hide resolved
clients/privacy-center/pages/api/fides-js.ts Show resolved Hide resolved
clients/privacy-center/public/lib/fides.css Outdated Show resolved Hide resolved
Copy link
Contributor

@allisonking allisonking left a comment

Choose a reason for hiding this comment

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

this is a really solid foundation, @eastandwestwind ! I'm going to keep playing with things today, but here are some comments for now. looking forward to building off of this!

clients/fides-js/src/lib/consent-utils.ts Outdated Show resolved Hide resolved
clients/fides-js/__tests__/lib/cookie.test.ts Show resolved Hide resolved
clients/fides-js/src/lib/consent-utils.ts Outdated Show resolved Hide resolved
clients/fides-js/src/lib/cookie.ts Outdated Show resolved Hide resolved
clients/fides-js/src/lib/cookie.ts Outdated Show resolved Hide resolved
clients/fides-js/src/lib/consent.tsx Outdated Show resolved Hide resolved
clients/fides-js/src/lib/consent.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@NevilleS NevilleS left a comment

Choose a reason for hiding this comment

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

Couple more nits and a bug or two but this is super close!

clients/fides-js/package.json Outdated Show resolved Hide resolved
clients/fides-js/src/components/ConsentBanner.tsx Outdated Show resolved Hide resolved
clients/fides-js/src/components/ConsentBanner.tsx Outdated Show resolved Hide resolved
clients/fides-js/src/components/ConsentBanner.tsx Outdated Show resolved Hide resolved
clients/fides-js/src/fides.ts Show resolved Hide resolved
clients/fides-js/src/lib/consent.tsx Outdated Show resolved Hide resolved
clients/fides-js/src/lib/consent.tsx Outdated Show resolved Hide resolved
clients/fides-js/src/lib/consent.tsx Outdated Show resolved Hide resolved
clients/fides-js/src/lib/consent.tsx Show resolved Hide resolved
clients/privacy-center/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@NevilleS NevilleS left a comment

Choose a reason for hiding this comment

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

Couple more nits and a bug or two but this is super close!

Copy link
Contributor

@NevilleS NevilleS left a comment

Choose a reason for hiding this comment

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

OK, ship it!

I still have a bunch of nitpicks but I pushed a few tidy up commits. Let's see if CI still passes!

CHANGELOG.md Outdated Show resolved Hide resolved
clients/fides-js/src/components/App.tsx Outdated Show resolved Hide resolved
clients/fides-js/src/lib/consent.tsx Show resolved Hide resolved
clients/fides-js/src/lib/cookie.ts Show resolved Hide resolved
clients/privacy-center/.gitignore Outdated Show resolved Hide resolved
clients/privacy-center/pages/api/fides-js.ts Show resolved Hide resolved
clients/privacy-center/pages/api/fides-js.ts Show resolved Hide resolved
clients/fides-js/src/components/ConsentBanner.tsx Outdated Show resolved Hide resolved
clients/fides-js/src/lib/consent.tsx Outdated Show resolved Hide resolved
@eastandwestwind eastandwestwind merged commit bbbf319 into main May 13, 2023
11 checks passed
@eastandwestwind eastandwestwind deleted the banner-infra branch May 13, 2023 19:20
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.

Add consent project skeleton in clients folder
5 participants