Skip to content

Add whitepaper section with gated downloads - #183

Open
iammajid wants to merge 2 commits into
developfrom
feature/whitepaper-landing
Open

Add whitepaper section with gated downloads#183
iammajid wants to merge 2 commits into
developfrom
feature/whitepaper-landing

Conversation

@iammajid

@iammajid iammajid commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Adds a bilingual whitepaper section with an overview page, detail pages with a gated download form, and a nav entry under Resources. The download link will be sent by email; the required backend endpoint and EspoCRM records do not exist yet.

@iammajid
iammajid requested a review from SailReal July 31, 2026 06:04
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds German and English whitepaper metadata, navigation, translations, responsive listing pages, and detail pages. Available whitepapers provide CAPTCHA-protected request forms with success and error states. Coming-soon whitepapers omit the form. Detail pages render covers, related whitepapers, and environment-specific assets. The webinar template now uses the shared inbox hint translation key.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: tobihagemann

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a whitepaper section with gated downloads.
Description check ✅ Passed The description accurately explains the bilingual whitepaper section, gated forms, navigation entry, and pending backend integration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/whitepaper-landing

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@content/whitepaper/zero-knowledge-cloud-encryption.de.html`:
- Around line 7-9: Gate both localized zero-knowledge whitepaper pages on a
valid EspoCRM record ID: in
content/whitepaper/zero-knowledge-cloud-encryption.de.html lines 7-9 and
content/whitepaper/zero-knowledge-cloud-encryption.en.html lines 7-9, populate
espoId before retaining comingsoon: false, or set comingsoon: true until the
corresponding records exist.

In `@layouts/whitepaper/single.html`:
- Line 19: Update the form submit handler using x-ref="form" so CAPTCHA reset
occurs only when the form passes native validation. Gate the existing
apiForm.request() and $refs.captcha.reset() flow with the form’s validity,
preserving the current request behavior while avoiding reset on invalid
submissions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b684048-b8dd-4349-9c34-2a2a2fdc6ad2

📥 Commits

Reviewing files that changed from the base of the PR and between a26f01d and b746dd6.

📒 Files selected for processing (14)
  • content/whitepaper/_index.de.html
  • content/whitepaper/_index.en.html
  • content/whitepaper/gdpr-compliant-cloud-collaboration.de.html
  • content/whitepaper/gdpr-compliant-cloud-collaboration.en.html
  • content/whitepaper/zero-knowledge-cloud-encryption.de.html
  • content/whitepaper/zero-knowledge-cloud-encryption.en.html
  • data/nav.yaml
  • i18n/de.yaml
  • i18n/en.yaml
  • layouts/partials/whitepaper-cover.html
  • layouts/partials/whitepaper-grid.html
  • layouts/webinar/single.html
  • layouts/whitepaper/list.html
  • layouts/whitepaper/single.html

Comment on lines +7 to +9
comingsoon: false
weight: 10
espoId: "" # ID of the CWhitepaper record in EspoCRM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Gate both localized download pages on the EspoCRM record ID.

Both files set comingsoon to false while espoId is empty. layouts/whitepaper/single.html copies that value into submitData.whitepaperId, so both forms submit without a CWhitepaper identifier. Populate the record ID before enabling the pages, or set comingsoon: true until the records exist.

  • content/whitepaper/zero-knowledge-cloud-encryption.de.html#L7-L9: populate espoId before keeping comingsoon: false.
  • content/whitepaper/zero-knowledge-cloud-encryption.en.html#L7-L9: apply the same release gate and record ID.
📍 Affects 2 files
  • content/whitepaper/zero-knowledge-cloud-encryption.de.html#L7-L9 (this comment)
  • content/whitepaper/zero-knowledge-cloud-encryption.en.html#L7-L9
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@content/whitepaper/zero-knowledge-cloud-encryption.de.html` around lines 7 -
9, Gate both localized zero-knowledge whitepaper pages on a valid EspoCRM record
ID: in content/whitepaper/zero-knowledge-cloud-encryption.de.html lines 7-9 and
content/whitepaper/zero-knowledge-cloud-encryption.en.html lines 7-9, populate
espoId before retaining comingsoon: false, or set comingsoon: true until the
corresponding records exist.

<p class="lead mb-10">{{ .Params.abstract }}</p>

{{ if not .Params.comingsoon }}
<form x-ref="form" @submit.prevent="apiForm.request(); $refs.captcha.reset()">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Avoid resetting the CAPTCHA on a plain validation failure.

$refs.captcha.reset() runs on every submit attempt, even when apiForm.request() only fails native form validation and never sends a request. The user then must solve the CAPTCHA again just to fix a missing field.

Gate the reset on native form validity, so the CAPTCHA is only reset when an actual submission attempt is made.

💡 Proposed fix
-<form x-ref="form" `@submit.prevent`="apiForm.request(); $refs.captcha.reset()">
+<form x-ref="form" `@submit.prevent`="if ($refs.form.checkValidity()) { $refs.captcha.reset() }; apiForm.request()">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<form x-ref="form" @submit.prevent="apiForm.request(); $refs.captcha.reset()">
<form x-ref="form" `@submit.prevent`="if ($refs.form.checkValidity()) { $refs.captcha.reset() }; apiForm.request()">
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@layouts/whitepaper/single.html` at line 19, Update the form submit handler
using x-ref="form" so CAPTCHA reset occurs only when the form passes native
validation. Gate the existing apiForm.request() and $refs.captcha.reset() flow
with the form’s validity, preserving the current request behavior while avoiding
reset on invalid submissions.

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.

1 participant