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

Adds new FidesPreferenceToggled event #4253

Merged
merged 5 commits into from
Oct 15, 2023

Conversation

eastandwestwind
Copy link
Contributor

@eastandwestwind eastandwestwind commented Oct 11, 2023

Closes https://github.com/ethyca/fidesplus/issues/1121

Description Of Changes

Adds new FidesPreferenceToggled event to track when toggles / user prefs change without being saved.

Code Changes

  • Dispatches FidesPreferenceToggled for both TCF and non-TCF notices
  • Updates e2e tests

Steps to Confirm

  • Use debug mode = true
  • On either TCF or non-TCF, toggle preferences in the consent modal
  • Inspect console to view FidesPreferenceToggled event

Pre-Merge Checklist

@cypress
Copy link

cypress bot commented Oct 11, 2023

Passing run #4631 ↗︎

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 370854c into 84c0f59...
Project: fides Commit: 96549dcffe ℹ️
Status: Passed Duration: 01:07 💡
Started: Oct 13, 2023 5:07 PM Ended: Oct 13, 2023 5:08 PM

Review all test suite changes for PR #4253 ↗︎

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.

love the tests 🤩 I left a comment for how I think we can streamline some of this code, let me know what you think!

clients/fides-js/src/components/notices/NoticeOverlay.tsx Outdated Show resolved Hide resolved
clients/fides-js/src/components/tcf/TcfOverlay.tsx Outdated Show resolved Hide resolved
clients/fides-js/src/components/tcf/TcfTabs.tsx Outdated Show resolved Hide resolved
@@ -68,6 +68,7 @@ Cypress.Commands.add("visitConsentDemo", (options?: FidesConfig) => {
);
win.addEventListener("FidesUpdated", cy.stub().as("FidesUpdated"));
win.addEventListener("FidesUIShown", cy.stub().as("FidesUIShown"));
win.addEventListener("FidesUIChanged", cy.stub().as("FidesUIChanged"));
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm this name is a little weird to me... it sounds like the UI component itself changed. I wonder if it can be something like "FidesPreferenceToggled" ? but eh, I don't feel all that strongly about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@eastandwestwind eastandwestwind changed the title Adds new fidesUIChanged event Adds new FidesPreferenceToggled event Oct 13, 2023
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.

perfect ✨

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Allison King <[email protected]>
@eastandwestwind eastandwestwind merged commit d81caaa into main Oct 15, 2023
10 checks passed
@eastandwestwind eastandwestwind deleted the 1121-new-fidesuichanged-event branch October 15, 2023 20:56
eastandwestwind added a commit that referenced this pull request Oct 18, 2023
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