Skip to content

fix: add TERMS_URL support to survey link footers#7670

Merged
jobenjada merged 2 commits intoformbricks:mainfrom
nielskaspers:fix/issue-7652-terms-url-footer
Apr 10, 2026
Merged

fix: add TERMS_URL support to survey link footers#7670
jobenjada merged 2 commits intoformbricks:mainfrom
nielskaspers:fix/issue-7652-terms-url-footer

Conversation

@nielskaspers
Copy link
Copy Markdown
Contributor

Summary

The TERMS_URL environment variable is documented in docker-compose.yml, defined in lib/constants.ts, and already used in email templates—but it was never threaded through the survey link footer components. This adds TERMS_URL support to the legal footer, matching the existing pattern used by PRIVACY_URL and IMPRINT_URL.

Issue

Fixes #7652

Changes

  • survey-renderer.tsx — Import TERMS_URL from constants, pass to PinScreen and SurveyClientWrapper
  • pin-screen.tsx — Accept and forward TERMS_URL prop
  • survey-client-wrapper.tsx — Accept and forward TERMS_URL prop to LinkSurveyWrapper
  • link-survey-wrapper.tsx — Accept and forward TERMS_URL prop to LegalFooter
  • legal-footer.tsx — Add TERMS_URL to the interface, null-check, and render a "Terms of Service" link with proper separators
  • en-US.json — Add common.terms_of_service translation key

Testing

  • When TERMS_URL is not set, behavior is unchanged (no terms link, no extra separators)
  • When TERMS_URL is set, a "Terms of Service" link appears in the footer between Privacy and Report Survey, with correct | separators

The TERMS_URL environment variable was documented in docker-compose.yml
and defined in constants but never threaded through the survey link
footer components. This adds TERMS_URL prop passing through
survey-renderer, pin-screen, survey-client-wrapper, link-survey-wrapper,
and legal-footer, matching the existing pattern used by PRIVACY_URL and
IMPRINT_URL.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 594489d3-8a4c-49e3-90bc-c5fa73295e32

📥 Commits

Reviewing files that changed from the base of the PR and between b5eaa4c and 3195231.

⛔ Files ignored due to path filters (1)
  • apps/web/locales/en-US.json is excluded by !apps/web/locales/**
📒 Files selected for processing (5)
  • apps/web/modules/survey/link/components/legal-footer.tsx
  • apps/web/modules/survey/link/components/link-survey-wrapper.tsx
  • apps/web/modules/survey/link/components/pin-screen.tsx
  • apps/web/modules/survey/link/components/survey-client-wrapper.tsx
  • apps/web/modules/survey/link/components/survey-renderer.tsx

Walkthrough

This change adds support for a TERMS_URL configuration across the survey link components. The TERMS_URL prop is introduced to five component files in the survey link module and threaded through the component hierarchy: survey-renderer.tsx imports it from constants and passes it to PinScreen and SurveyClientWrapper, which then propagate it through SurveyClientWrapper, LinkSurveyWrapper, and finally to LegalFooter. The LegalFooter component renders a "terms of service" link when TERMS_URL is provided and adjusts its separator rendering logic to handle combinations with other legal links.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding TERMS_URL support to survey link footers, which directly matches the changeset.
Description check ✅ Passed The description covers the summary, issue number, specific changes to each file, and testing approach. However, the 'How should this be tested' checklist section is not fully completed.
Linked Issues check ✅ Passed The PR successfully implements all requirements from issue #7652: TERMS_URL is now imported in survey-renderer.tsx and threaded through pin-screen.tsx, survey-client-wrapper.tsx, link-survey-wrapper.tsx, and legal-footer.tsx to render the terms link with proper separators.
Out of Scope Changes check ✅ Passed All changes are directly related to adding TERMS_URL support to survey link footers. The modifications are scoped to the necessary component files and the translation file for the terms label.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Member

@jobenjada jobenjada left a comment

Choose a reason for hiding this comment

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

works well, thanks!

@jobenjada jobenjada enabled auto-merge April 10, 2026 09:06
@jobenjada jobenjada added this pull request to the merge queue Apr 10, 2026
Merged via the queue into formbricks:main with commit 01687e8 Apr 10, 2026
25 of 28 checks passed
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.

TERMS_URL variable is not used in footers

2 participants