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

Hide translation interface in notice/experience form when translations aren't enabled #4728

Merged
merged 6 commits into from
Mar 20, 2024

Conversation

jpople
Copy link
Contributor

@jpople jpople commented Mar 19, 2024

Closes PROD-1820

Description Of Changes

Removes references to translations in the privacy notice and privacy experience forms when user does not have translations enabled on the backend, replacing them with generic "text editing" forms.

Code Changes

  • Small refactors to privacy notice form and privacy experience form
  • Re-generate OpenAPI types

Steps to Confirm

Use fidesplus backend on branch PROD-1819_surface_translation_config_settings.

As a control to confirm translation interfaces still work as expected when translations are enabled, have the following in .fides/fides.toml in fidesplus:

[consent]
enable_translations = true
enable_oob_translations = true
  • In admin UI, navigate to /consent/privacy-notices
  • Edit or create a new privacy notice
  • Should see interface at bottom of form for adding new languages and switching between languages
  • Should be able to make changes to translations and submit notices
  • In admin UI, navigate to /consent/privacy-experience
  • Edit or create a new privacy experience
  • Should see scrollable list component with languages; should be able to add new translations and edit existing ones
  • Should be able to make changes to translations and submit experience

Replace true with false in the config snippet above, then rerun backend.

  • Navigate to /consent/privacy-notices
  • Edit or create a new privacy notice
  • Should see form titled "Notice text" and no language selection menu:

Screenshot 2024-03-19 at 11 14 33

  • Should be able to make changes to notice text and submit notice
  • Navigate to /consent/privacy-experience
  • Edit or create a new privacy experience
  • Should see button labeled "Edit experience text" and no language selection or "auto detect language" switch
  • Inside text edit form, switch to toggle whether language is default should not be present
  • Should be able to make changes to experience text and submit experience

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Update CHANGELOG.md

Copy link

vercel bot commented Mar 19, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview Mar 20, 2024 2:53pm

Copy link

cypress bot commented Mar 19, 2024

Passing run #6776 ↗︎

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 1886a28 into 8ec8fd9...
Project: fides Commit: 5c504940b8 ℹ️
Status: Passed Duration: 00:35 💡
Started: Mar 20, 2024 3:04 PM Ended: Mar 20, 2024 3:04 PM

Review all test suite changes for PR #4728 ↗︎

Copy link
Contributor

@eastandwestwind eastandwestwind left a comment

Choose a reason for hiding this comment

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

Looks great, and thanks for generating the types again 🌟

@@ -24,4 +25,5 @@ export type ExperienceConfigResponse = {
component: ComponentType;
privacy_notices?: Array<PrivacyNoticeResponse>;
translations?: Array<ExperienceTranslationResponse>;
properties?: Array<MinimalProperty>;
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

@@ -16,6 +16,7 @@ export enum SupportedLanguage {
EL = "el",
EN = "en",
ES = "es",
ES_MX = "es-MX",
Copy link
Contributor

Choose a reason for hiding this comment

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

was this just something we missed before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think there was some uncertainty with whether we would support Mexican Spanish in addition to Castillian, but I guess that got resolved? Not 100% sure, to be honest.

Copy link
Contributor

Choose a reason for hiding this comment

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

This was added later, we originally only had "es" (and we saving mexican spanish translations underneath them)! And then we received castillian translations so we switched them and those were saved under es, and we added new "es-mx" for Spanish (Mexico)!

@jpople jpople merged commit dd1f329 into main Mar 20, 2024
13 checks passed
@jpople jpople deleted the jpople/prod-1820/show-hide-translations branch March 20, 2024 15:08
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