chore: enable localization in breadcrumb localization#3289
chore: enable localization in breadcrumb localization#3289hellofanny merged 4 commits intocanary-v2from
Conversation
WalkthroughThe changes modify two core components: the Breadcrumb component adds localization-aware conditional rendering (span vs. link), and the PDP page simplifies product data merging by removing custom overrides while adding explicit locale awareness to product queries. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
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 `@packages/core/src/pages/`[slug]/p.tsx:
- Line 333: The JSON-LD generation is still using localized breadcrumb URLs even
though UI locale links are disabled; modify the BreadcrumbJsonLd output to guard
against publishing broken URLs by checking that slug localization is available
before mapping breadcrumbList.itemListElement to item.href (or omit the locale
param): wrap the BreadcrumbJsonLd render (or the code that builds
breadcrumbList.itemListElement.item) with a condition that verifies the
locale-enabled slug resolution (the same flag/source that controls { key:
'locale', value: locale }) and if not available, either skip rendering
BreadcrumbJsonLd or construct canonical non-localized URLs instead.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d30682b5-62b6-4274-b887-d54fc42c23a0
📒 Files selected for processing (2)
packages/core/src/components/ui/Breadcrumb/Breadcrumb.tsxpackages/core/src/pages/[slug]/p.tsx
What's the purpose of this pull request?
How to test it?
Starters Deploy Preview
https://github.com/vtex-sites/brandless.store/pull/164
References
task
Summary by CodeRabbit
Bug Fixes
Refactor