Update homepage hero and footer with demo copy and CTAs - #119
Conversation
Add demo-specific content for demo.spreecommerce.org: new hero subtitle, test card instructions, and three CTAs (Shop the Demo, Fork on GitHub, Quickstart Guide). Footer updated with description, test card note, and adoption links. External URLs centralized in getSpreeDemoData() in store.ts. All demo elements marked with "Demo-only: Remove for production". Translations added for all locales (de, es, fr, pl). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughUpdated localization strings (DE/EN/ES/FR/PL) for footer, home, and checkout; replaced hero/CTA copy and added demo-focused CTAs; introduced new external demo links in Footer and home page components; small UI/spacing tweaks; added test-card checkout note and changed default social image path. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/lib/store.ts (1)
110-120: Document the new demo URL env vars in.env.example.
getSpreeDemoData()introduces three newNEXT_PUBLIC_*variables, but they are not documented in the provided.env.examplesnippet. Adding them will prevent setup drift for contributors.Suggested `.env.example` addition
+# Demo external links (optional) +NEXT_PUBLIC_GITHUB_URL=https://github.com/spree/storefront +NEXT_PUBLIC_QUICKSTART_URL=https://spreecommerce.org/docs/developer/storefront/nextjs/quickstart +NEXT_PUBLIC_LEARN_MORE_URL=https://spreecommerce.org🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/lib/store.ts` around lines 110 - 120, Add the three new NEXT_PUBLIC_* env vars used by getSpreeDemoData() to the project's .env.example: document NEXT_PUBLIC_GITHUB_URL, NEXT_PUBLIC_QUICKSTART_URL, and NEXT_PUBLIC_LEARN_MORE_URL with sensible default values or placeholders (matching the defaults in getSpreeDemoData) and brief comments so contributors know their purpose and prevent setup drift.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/lib/store.ts`:
- Around line 110-120: getSpreeDemoData currently returns raw env values for
githubUrl, quickstartUrl, and learnMoreUrl which can be relative if the env
lacks a scheme; update getSpreeDemoData to pass each value through
ensureProtocol() (e.g., ensureProtocol(process.env.NEXT_PUBLIC_GITHUB_URL ||
"https://...")) for githubUrl, quickstartUrl, and learnMoreUrl so returned URLs
are normalized with a protocol.
---
Nitpick comments:
In `@src/lib/store.ts`:
- Around line 110-120: Add the three new NEXT_PUBLIC_* env vars used by
getSpreeDemoData() to the project's .env.example: document
NEXT_PUBLIC_GITHUB_URL, NEXT_PUBLIC_QUICKSTART_URL, and
NEXT_PUBLIC_LEARN_MORE_URL with sensible default values or placeholders
(matching the defaults in getSpreeDemoData) and brief comments so contributors
know their purpose and prevent setup drift.
🪄 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
Run ID: 466c00f2-eb8e-46f1-8869-e08815dd7c1d
📒 Files selected for processing (8)
messages/de.jsonmessages/en.jsonmessages/es.jsonmessages/fr.jsonmessages/pl.jsonsrc/app/[country]/[locale]/(storefront)/page.tsxsrc/components/layout/Footer.tsxsrc/lib/store.ts
Wrap getSpreeDemoData() URLs with ensureProtocol() to handle env values missing a scheme prefix. Add the three NEXT_PUBLIC_* demo env vars to .env.example with defaults and comments. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.env.example:
- Around line 16-17: The two environment keys are out of alphabetical order and
trigger the dotenv-linter UnorderedKey rule; swap the lines so
NEXT_PUBLIC_LEARN_MORE_URL appears before NEXT_PUBLIC_QUICKSTART_URL in
.env.example to satisfy the linter (i.e., reorder the two keys so
NEXT_PUBLIC_LEARN_MORE_URL then NEXT_PUBLIC_QUICKSTART_URL).
In `@src/lib/store.ts`:
- Around line 112-122: Environment variables for githubUrl, quickstartUrl, and
learnMoreUrl are not guarded against whitespace-only values before calling
ensureProtocol, so a value of just spaces will bypass the || fallback and
produce an invalid URL; update the assignments (githubUrl, quickstartUrl,
learnMoreUrl) to trim the corresponding env var (e.g.
process.env.NEXT_PUBLIC_GITHUB_URL?.trim()) and use the trimmed value in the
fallback expression before calling ensureProtocol so whitespace-only strings
fall back to the default URL.
🪄 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
Run ID: fa096785-acc5-4312-b626-dd347ad07e41
📒 Files selected for processing (2)
.env.examplesrc/lib/store.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/layout/Footer.tsx`:
- Around line 10-15: Footer.tsx currently defines local demo URL constants
(githubUrl, quickstartUrl, learnMoreUrl) that duplicate centralized demo links;
replace those locals by pulling the demo URLs from the shared getSpreeDemoData()
source used elsewhere. Modify the Footer component to import and call
getSpreeDemoData() (or consume the exported demo object) and read the
corresponding properties instead of the hardcoded
githubUrl/quickstartUrl/learnMoreUrl, remove the local constants, and keep a
minimal fallback if getSpreeDemoData() returns undefined; ensure references to
those symbols (githubUrl, quickstartUrl, learnMoreUrl, Footer, getSpreeDemoData)
are updated accordingly.
🪄 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
Run ID: 8daa46ba-8bba-478b-bc93-6a22df93d813
📒 Files selected for processing (2)
src/app/[country]/[locale]/(storefront)/page.tsxsrc/components/layout/Footer.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/app/[country]/[locale]/(storefront)/page.tsx
- Remove heroDemoNote/testCardNote from hero, footer, and all locales - Add translated testCardNote to checkout PaymentSection under secure transactions - Hardcode demo URLs directly instead of getSpreeDemoData() - Replace social-image.png with social-image.webp as OG image - Update quickstart URL to /getting-started/quickstart Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.env.example:
- Line 14: Remove the stray empty line that is triggering the ExtraBlankLine
dotenv-linter warning by deleting the single blank line in the .env example so
there are no unnecessary consecutive blank lines; ensure the file still ends
with a single newline character after the last env entry and re-run the
dotenv-linter to confirm the warning is resolved.
In `@messages/de.json`:
- Line 44: Update the German translations to correct grammar: change the value
of the "forkOnGithub" key from "Diesen Storefront auf GitHub forken" to "Diese
Storefront auf GitHub forken", and update the key at the other affected entry
(the hero description key near line 60) to "Eine produktionsreife, quelloffene
Storefront …" (replace its current string with this more natural phrasing).
🪄 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
Run ID: 245eba22-708b-41fb-a9e2-2d8f5e78c8d0
⛔ Files ignored due to path filters (1)
public/social-image.pngis excluded by!**/*.png
📒 Files selected for processing (11)
.env.examplemessages/de.jsonmessages/en.jsonmessages/es.jsonmessages/fr.jsonmessages/pl.jsonpublic/social-image.webpsrc/app/[country]/[locale]/(storefront)/page.tsxsrc/components/checkout/PaymentSection.tsxsrc/components/layout/Footer.tsxsrc/lib/seo.ts
✅ Files skipped from review due to trivial changes (1)
- src/lib/seo.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- src/components/layout/Footer.tsx
- src/app/[country]/[locale]/(storefront)/page.tsx
- messages/fr.json
- messages/es.json
- messages/pl.json
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
getSpreeDemoData()insrc/lib/store.tsFiles changed (8)
messages/en.jsonmessages/de.jsonmessages/es.jsonmessages/fr.jsonmessages/pl.jsonsrc/app/[country]/[locale]/(storefront)/page.tsxsrc/components/layout/Footer.tsxsrc/lib/store.tsgetSpreeDemoData()— centralized demo external URLsTest plan
npx tsc --noEmit— no type errorsnpm run check— Biome passes🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Chore