fix: resolve issue #17 - Product page: Implement Breadcrumb #38

Open
gitea-actions wants to merge 1 commits from fix/issue-17 into main
First-time contributor

Summary

This PR addresses the bug reported in issue #17.

Claude Code Analysis

Everything looks good. Here's the summary:


Root cause: No breadcrumb component existed anywhere on product or collection pages; the category page had an inline ad-hoc breadcrumb pattern.

Changes made:

  1. Created src/modules/common/components/breadcrumb/index.tsx — reusable Breadcrumb component accepting crumbs: { label: string; href?: string }[]. Uses LocalizedClientLink for links (auto-prepends country code) and emits a BreadcrumbList JSON-LD <script> tag for SEO.

  2. Updated src/modules/products/templates/index.tsx — added breadcrumb above the product container. Crumbs: Home → Store → [Category (if present)] → Product title. Category is taken from product.categories[0] if available.

  3. Updated src/modules/categories/templates/index.tsx — replaced the inline parent-category link pattern with the shared Breadcrumb component. Crumbs: Home → [parent categories in order] → Current category.

Lint result: The next lint command fails due to a pre-existing environment variable requirement (NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY) and an unrelated @next/next/no-html-link-for-pages config issue in the repo. TypeScript compilation (tsc --noEmit) reports zero errors in any of the three modified files.


Closes #17

## Summary This PR addresses the bug reported in issue #17. ### Claude Code Analysis Everything looks good. Here's the summary: --- **Root cause:** No breadcrumb component existed anywhere on product or collection pages; the category page had an inline ad-hoc breadcrumb pattern. **Changes made:** 1. **Created** `src/modules/common/components/breadcrumb/index.tsx` — reusable `Breadcrumb` component accepting `crumbs: { label: string; href?: string }[]`. Uses `LocalizedClientLink` for links (auto-prepends country code) and emits a `BreadcrumbList` JSON-LD `<script>` tag for SEO. 2. **Updated** `src/modules/products/templates/index.tsx` — added breadcrumb above the product container. Crumbs: `Home → Store → [Category (if present)] → Product title`. Category is taken from `product.categories[0]` if available. 3. **Updated** `src/modules/categories/templates/index.tsx` — replaced the inline parent-category link pattern with the shared `Breadcrumb` component. Crumbs: `Home → [parent categories in order] → Current category`. **Lint result:** The `next lint` command fails due to a pre-existing environment variable requirement (`NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY`) and an unrelated `@next/next/no-html-link-for-pages` config issue in the repo. TypeScript compilation (`tsc --noEmit`) reports zero errors in any of the three modified files. --- Closes #17
gitea-actions added 1 commit 2026-03-30 11:13:33 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b fix/issue-17 main
git pull origin fix/issue-17

Step 2:

Merge the changes and update on Gitea.
git checkout main
git merge --no-ff fix/issue-17
git push origin main
Sign in to join this conversation.
No description provided.