-
Notifications
You must be signed in to change notification settings - Fork 19
ECHO-681 ECHO-698 ECHO-695 ECHO-682 Add per-legal-basis configuration support #466
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
Changes from all commits
fb8a6f3
a1537bb
3cda72a
eeef292
91035bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| { | ||
| "collection": "directus_users", | ||
| "field": "legal_basis", | ||
| "type": "string", | ||
| "meta": { | ||
| "collection": "directus_users", | ||
| "conditions": null, | ||
| "display": "labels", | ||
| "display_options": { | ||
| "choices": [ | ||
| { | ||
| "text": "Client Managed", | ||
| "value": "client-managed" | ||
| }, | ||
| { | ||
| "text": "Consent", | ||
| "value": "consent" | ||
| }, | ||
| { | ||
| "text": "dembrane events ", | ||
| "value": "dembrane-events" | ||
| } | ||
| ] | ||
| }, | ||
| "field": "legal_basis", | ||
| "group": null, | ||
| "hidden": false, | ||
| "interface": "select-dropdown", | ||
| "note": "GDPR legal basis for processing participant data. Affects consent flows in the participant portal.", | ||
| "options": { | ||
| "choices": [ | ||
| { | ||
| "text": "Client Managed", | ||
| "value": "client-managed" | ||
| }, | ||
| { | ||
| "text": "Consent", | ||
| "value": "consent" | ||
| }, | ||
| { | ||
| "text": "dembrane events ", | ||
| "value": "dembrane-events" | ||
| } | ||
| ] | ||
| }, | ||
| "readonly": false, | ||
| "required": false, | ||
| "searchable": true, | ||
| "sort": 6, | ||
| "special": null, | ||
| "translations": null, | ||
| "validation": null, | ||
| "validation_message": null, | ||
| "width": "full" | ||
| }, | ||
| "schema": { | ||
| "name": "legal_basis", | ||
| "table": "directus_users", | ||
| "data_type": "character varying", | ||
| "default_value": "client-managed", | ||
| "max_length": 255, | ||
| "numeric_precision": null, | ||
| "numeric_scale": null, | ||
| "is_nullable": true, | ||
| "is_unique": false, | ||
| "is_indexed": false, | ||
| "is_primary_key": false, | ||
| "is_generated": false, | ||
| "generation_expression": null, | ||
| "has_auto_increment": false, | ||
| "foreign_key_table": null, | ||
| "foreign_key_column": null | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| { | ||
| "collection": "directus_users", | ||
| "field": "privacy_policy_url", | ||
| "type": "string", | ||
| "meta": { | ||
| "collection": "directus_users", | ||
| "conditions": null, | ||
| "display": null, | ||
| "display_options": null, | ||
| "field": "privacy_policy_url", | ||
| "group": null, | ||
| "hidden": false, | ||
| "interface": "input", | ||
| "note": "URL to the organiser's privacy policy. Shown to participants when Legal Basis is 'Consent'.", | ||
| "options": { | ||
| "placeholder": "https://example.com/privacy-policy" | ||
| }, | ||
| "readonly": false, | ||
| "required": false, | ||
| "searchable": true, | ||
| "sort": 7, | ||
| "special": null, | ||
| "translations": null, | ||
| "validation": null, | ||
| "validation_message": null, | ||
| "width": "full" | ||
| }, | ||
| "schema": { | ||
| "name": "privacy_policy_url", | ||
| "table": "directus_users", | ||
| "data_type": "character varying", | ||
| "default_value": null, | ||
| "max_length": 255, | ||
| "numeric_precision": null, | ||
| "numeric_scale": null, | ||
| "is_nullable": true, | ||
| "is_unique": false, | ||
| "is_indexed": false, | ||
| "is_primary_key": false, | ||
| "is_generated": false, | ||
| "generation_expression": null, | ||
| "has_auto_increment": false, | ||
| "foreign_key_table": null, | ||
| "foreign_key_column": null | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,11 @@ export interface LanguageCards { | |
| [language: string]: Section[]; | ||
| } | ||
|
|
||
| const ParticipantOnboardingCards = ({ project }: { project: Project }) => { | ||
| const ParticipantOnboardingCards = ({ | ||
| project, | ||
| }: { | ||
| project: ParticipantProject; | ||
| }) => { | ||
| const [searchParams] = useSearchParams(); | ||
| const skipOnboarding = searchParams.get("skipOnboarding"); | ||
|
|
||
|
|
@@ -74,10 +78,12 @@ const ParticipantOnboardingCards = ({ project }: { project: Project }) => { | |
| const { getSystemCards } = useOnboardingCards(); | ||
|
|
||
| const tutorialSlug = project.default_conversation_tutorial_slug ?? "none"; | ||
| const legalBasis = project.legal_basis ?? "client-managed"; | ||
| const privacyPolicyUrl = project.privacy_policy_url; | ||
|
|
||
| const cards: LanguageCards = { | ||
| "de-DE": [ | ||
| ...getSystemCards("de-DE", tutorialSlug), | ||
| ...getSystemCards("de-DE", tutorialSlug, legalBasis, privacyPolicyUrl), | ||
| { | ||
| section: "Mikrofon-Check", | ||
| slides: [ | ||
|
|
@@ -100,7 +106,7 @@ const ParticipantOnboardingCards = ({ project }: { project: Project }) => { | |
| }, | ||
| ], | ||
| "en-US": [ | ||
| ...getSystemCards("en-US", tutorialSlug), | ||
| ...getSystemCards("en-US", tutorialSlug, legalBasis, privacyPolicyUrl), | ||
| { | ||
| section: "Microphone Check", | ||
| slides: [ | ||
|
|
@@ -123,7 +129,7 @@ const ParticipantOnboardingCards = ({ project }: { project: Project }) => { | |
| }, | ||
| ], | ||
| "es-ES": [ | ||
| ...getSystemCards("es-ES", tutorialSlug), | ||
| ...getSystemCards("es-ES", tutorialSlug, legalBasis, privacyPolicyUrl), | ||
| { | ||
| section: "Verificación del Micrófono", | ||
| slides: [ | ||
|
|
@@ -146,7 +152,7 @@ const ParticipantOnboardingCards = ({ project }: { project: Project }) => { | |
| }, | ||
| ], | ||
| "fr-FR": [ | ||
| ...getSystemCards("fr-FR", tutorialSlug), | ||
| ...getSystemCards("fr-FR", tutorialSlug, legalBasis, privacyPolicyUrl), | ||
| { | ||
| section: "Vérification du Microphone", | ||
| slides: [ | ||
|
|
@@ -169,7 +175,7 @@ const ParticipantOnboardingCards = ({ project }: { project: Project }) => { | |
| }, | ||
| ], | ||
| "it-IT": [ | ||
| ...getSystemCards("it-IT", tutorialSlug), | ||
| ...getSystemCards("it-IT", tutorialSlug, legalBasis, privacyPolicyUrl), | ||
| { | ||
| section: "Controllo Microfono", | ||
| slides: [ | ||
|
|
@@ -192,7 +198,7 @@ const ParticipantOnboardingCards = ({ project }: { project: Project }) => { | |
| }, | ||
| ], | ||
| "nl-NL": [ | ||
| ...getSystemCards("nl-NL", tutorialSlug), | ||
| ...getSystemCards("nl-NL", tutorialSlug, legalBasis, privacyPolicyUrl), | ||
| { | ||
| section: "Microfoon Controle", | ||
| slides: [ | ||
|
|
@@ -330,7 +336,11 @@ const ParticipantOnboardingCards = ({ project }: { project: Project }) => { | |
| )} | ||
|
|
||
| {currentCard.extraHelp && ( | ||
| <Text className="text-sm" ta="left"> | ||
| <Text | ||
| className="text-sm" | ||
| ta="left" | ||
| style={{ whiteSpace: "pre-line" }} | ||
| > | ||
| {currentCard.extraHelp} | ||
| </Text> | ||
| )} | ||
|
|
@@ -371,7 +381,8 @@ const ParticipantOnboardingCards = ({ project }: { project: Project }) => { | |
| label={currentCard.checkbox.label} | ||
| classNames={{ | ||
| body: "items-center", | ||
| label: "text-lg text-gray-700", | ||
| label: | ||
| "text-lg leading-snug pl-4 text-gray-700 text-left pt-0.5", | ||
|
Comment on lines
+384
to
+385
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Use theme variable for checkbox label color instead of
🎯 Proposed adjustment <Checkbox
@@
classNames={{
body: "items-center",
- label:
- "text-lg leading-snug pl-4 text-gray-700 text-left pt-0.5",
+ label: "text-lg leading-snug pl-4 text-left pt-0.5",
root: "items-start",
}}
+ styles={{ label: { color: "var(--app-text)" } }}
{...testId("portal-onboarding-checkbox")}
/>As per coding guidelines: "Keep static utility classes ... move theme-dependent colors to CSS variables" and "Use 🤖 Prompt for AI Agents |
||
| root: "items-start", | ||
| }} | ||
| {...testId("portal-onboarding-checkbox")} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove trailing whitespace in legal basis choice labels
Line 20 and Line 41 use
"dembrane events "with a trailing space. This can cause inconsistent rendering/selection text in Directus UI and exports.Proposed fix
Also applies to: 41-42
🤖 Prompt for AI Agents