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 new Purpose header field in TCF Banner #5247

Merged
merged 5 commits into from
Aug 30, 2024

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Aug 29, 2024

Closes PROD-2699

Description Of Changes

  • Add new field in Admin UI > Experiences > TCF Experience > Translations form to support updating the Purpose header on the TCF banner
  • Update fides-tcf.js to consume the translated string
  • Update Cypress tests to include the new header

CleanShot 2024-08-29 at 15 41 17@2x


CleanShot 2024-08-29 at 15 41 41@2x


Code Changes

  • Lots of updates to support this change in Typing, helpers, tests, etc.
  • Additional field in the translations form (TCF only)
  • include translation in FidesJS component

Steps to Confirm

  1. In Admin UI, visit a TCF experience and click the English language to open the translation form
  2. Update or add text to the "Purpose header (optional)" field
  3. Save the translation and then Save the experience
  4. Visit the demo page for the TCF experience (eg. http://localhost:3001/fides-js-demo.html?geolocation=eea)
  5. Ensure that the text typed in appears above the Purpose list in the right column of the TCF banner.

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Backend changes are ready for merging

NOTE: since this will be hotfixed in the current release, no separate entry in the CHANGELOG is needed.

Copy link

vercel bot commented Aug 29, 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 Aug 30, 2024 8:22pm

@gilluminate gilluminate force-pushed the PROD-2699-tcf-banner-subtitle branch 2 times, most recently from c2ba770 to 38f3e1c Compare August 29, 2024 21:59
@@ -162,7 +163,24 @@ export const getTranslationFormFields = (
modal_link_label: { included: true },
};
}
// For TCF overlay / default

if (component === ComponentType.TCF_OVERLAY) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TCF is different enough from default now, that it felt warranted to create its own section like the ones above

Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense 👍

@@ -117,6 +118,7 @@ function extractMessagesFromExperienceConfig(
const locale = experienceConfig.language || DEFAULT_LOCALE;
const messages: Messages = {};
EXPERIENCE_TRANSLATION_FIELDS.forEach((key) => {
// @ts-expect-error EXPERIENCE_TRANSLATION_FIELDS is a const array
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unrelated fix, just to get rid of the error message in VS Code.

Copy link

cypress bot commented Aug 29, 2024

fides    Run #9776

Run Properties:  status check passed Passed #9776  •  git commit 270456d9de ℹ️: Merge 4417a74c8f035cf58ebe6c85802fe6fd1766f0f7 into b7087620898c390a50e29cf7f052...
Project fides
Branch Review refs/pull/5247/merge
Run status status check passed Passed #9776
Run duration 00m 36s
Commit git commit 270456d9de ℹ️: Merge 4417a74c8f035cf58ebe6c85802fe6fd1766f0f7 into b7087620898c390a50e29cf7f052...
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 ↗︎

@gilluminate gilluminate changed the title Support new Purpose header field Support new Purpose header field in TCF Banners Aug 29, 2024
@gilluminate gilluminate changed the title Support new Purpose header field in TCF Banners Support new Purpose header field in TCF Banner Aug 29, 2024
@@ -162,7 +163,24 @@ export const getTranslationFormFields = (
modal_link_label: { included: true },
};
}
// For TCF overlay / default

if (component === ComponentType.TCF_OVERLAY) {
Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense 👍

@pattisdr
Copy link
Contributor

pattisdr commented Aug 30, 2024

Tested locally alongside https://github.com/ethyca/fidesplus/pull/1589, this is looking good.

  • Both VENDOR_COUNT paragraphs are rendering properly
  • Vendor count buttons are working on first load and with other translations, and open the modal
  • Everything is nice and scrollable
  • No issues if there is a description that does not have a VENDOR_COUNT placeholder, as could be the case with customers that have already edited their banners
  • purpose headers rendering fine and present in the admin UI
  • If no purpose, nothing is rendered on the banner

@gilluminate gilluminate merged commit e9174b7 into main Aug 30, 2024
43 checks passed
@gilluminate gilluminate deleted the PROD-2699-tcf-banner-subtitle branch August 30, 2024 20:41
Copy link

cypress bot commented Aug 30, 2024

fides    Run #9778

Run Properties:  status check passed Passed #9778  •  git commit e9174b7711: Support new Purpose header field in TCF Banner (#5247)
Project fides
Branch Review main
Run status status check passed Passed #9778
Run duration 00m 39s
Commit git commit e9174b7711: Support new Purpose header field in TCF Banner (#5247)
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.

3 participants