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

Support Accept/Reject All with minimal TCF #5298

Merged
merged 10 commits into from
Sep 19, 2024

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Sep 18, 2024

Closes PROD-2777

Description Of Changes

Today, the “minimal” TCF banner can display the banner but the “Accept All” and “Reject All” actions are not enabled until the “full” experience is loaded. This can take several seconds to do on a low-speed connection, which creates a window where users can see a banner but are unable to opt-in.

These changes are set up for handling a new scenario in which a minimal version of experience.gvl is provided as part of the minimal TCF experience response.

If no GVL is included, we'll at least show some spinners during the loading of the full experience to not appear "broken" during that time.

Code Changes

  • New Spinner component (very small, css only)
  • Show spinner on the Modal button (Manage Preferences) while the full experience finishes loading
  • Show spinner on Accept/Reject buttons if the gvl object is not included with the minimal experience (for backwards compatibility mostly)
  • Update/create several of the utilites that support "Accept All" from the full experience to also support it from the minimal experience, which only supplies IDs
  • Remove any blockers from letting users Accept/Reject all from the minimal experience

Steps to Confirm

  1. visit the Fides.JS demo site with TCF enabled (eg. http://localhost:3001/fides-js-demo.html?geolocation=eea)
  2. In browser's dev tools, enable throttling in the Network tab to mimic a slow network
  3. Clear any existing cookie and reload the page
  • If the response is slow enough with the throttling, you should see a spinner on the Manage Preferences button until the full experience has loaded
  • If the backend task for including a minimal gvl isn't finished yet, you should see a spinner on all 3 buttons while the full experience loads
  • If you attempt to click Accept All or Reject all before the full experience has loaded (the spinner is still spinning), it should work as expected and close the banner. This behavior should be exactly the same as clicking the respective buttons after the full experience loads. (Cookie set with same fides_string, payload for saving the preference api should be the same, CMP Validator should report the same)

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Relevant Follow-Up Issues Created
  • Update CHANGELOG.md

Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview Sep 19, 2024 7:10pm

Copy link

cypress bot commented Sep 18, 2024

fides    Run #10003

Run Properties:  status check passed Passed #10003  •  git commit 342d3ef672 ℹ️: Merge 7dc504fba4725286b886b294b35a3f2285056459 into 59978cb33e2d6ba234914936f237...
Project fides
Branch Review refs/pull/5298/merge
Run status status check passed Passed #10003
Run duration 00m 39s
Commit git commit 342d3ef672 ℹ️: Merge 7dc504fba4725286b886b294b35a3f2285056459 into 59978cb33e2d6ba234914936f237...
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

@Kelsey-Ethyca
Copy link
Contributor

If the response is slow enough with the throttling, you should see a spinner on the Manage Preferences button until the full experience has loaded

This is working, I see the spinner. We don't want to draw attention to the Manage Preferences button though since we want them opting in. I suggest we only show the spinner if the button is clicked before layer two is loaded.

If the backend task for including a minimal gvl isn't finished yet, you should see a spinner on all 3 buttons while the full experience loads

I was never able to see a spinner on all three?

If you attempt to click Accept All or Reject all before the full experience has loaded (the spinner is still spinning), it should work as expected and close the banner. This behavior should be exactly the same as clicking the respective buttons after the full experience loads.

The spinner was not showing but I could see the network calls had not completed when I clicked accept all, the banner closed, and the ticket was created!

@gilluminate
Copy link
Contributor Author

@Kelsey-Ethyca

I was never able to see a spinner on all three?

Are you using the backend with Dawn's latest changes or not yet?

@gilluminate gilluminate force-pushed the PROD-2777-update-minimal-tcf-banner-to branch from 7c80930 to 0bb4d83 Compare September 19, 2024 16:09
@Kelsey-Ethyca
Copy link
Contributor

@Kelsey-Ethyca

I was never able to see a spinner on all three?

Are you using the backend with Dawn's latest changes or not yet?

I am!

@gilluminate
Copy link
Contributor Author

@Kelsey-Ethyca

I was never able to see a spinner on all three?

Are you using the backend with Dawn's latest changes or not yet?

I am!

Cool. Then you shouldn't see all 3 spinners. That was for backwards compatibility :)

@gilluminate gilluminate force-pushed the PROD-2777-update-minimal-tcf-banner-to branch from 8d7a6cb to d8d48bf Compare September 19, 2024 19:08
Copy link
Contributor

@Kelsey-Ethyca Kelsey-Ethyca left a comment

Choose a reason for hiding this comment

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

Beautiful!

@gilluminate gilluminate merged commit a19d30b into main Sep 19, 2024
13 checks passed
@gilluminate gilluminate deleted the PROD-2777-update-minimal-tcf-banner-to branch September 19, 2024 20:46
Copy link

cypress bot commented Sep 19, 2024

fides    Run #10007

Run Properties:  status check passed Passed #10007  •  git commit a19d30ba57: Support Accept/Reject All with minimal TCF (#5298)
Project fides
Branch Review main
Run status status check passed Passed #10007
Run duration 00m 38s
Commit git commit a19d30ba57: Support Accept/Reject All with minimal TCF (#5298)
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

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