Switch breadcrumbs pattern to Yoast SEO's native block (LS-1228 Part 2)#10
Conversation
- Wire ls-plugin/breadcrumbs block into patterns/breadcrumbs.php - Add breadcrumbs template part to page, single, and archive templates - Add Requires Plugins: ls-plugin header to style.css - Update CHANGELOG.md
- Replace ls-plugin/breadcrumbs block reference with yoast-seo/breadcrumbs in patterns/breadcrumbs.php - Change Requires Plugins theme header from ls-plugin to wordpress-seo - Update CHANGELOG.md to describe the Yoast block adoption instead of the removed custom block LS-1228 Part 2 re-approach: drops the custom block in favor of Yoast SEO's own breadcrumbs block, per course-correction plan.
|
Caution Review failedThe pull request is closed. Note
|
| Layer / File(s) | Summary |
|---|---|
Define Yoast breadcrumb pattern patterns/breadcrumbs.php |
The pattern conditionally renders the wp:yoast-seo/breadcrumbs block inside a full-width padded group. |
Wire breadcrumbs into templates templates/page.html, templates/single.html, templates/archive.html, CHANGELOG.md |
The three templates include the breadcrumbs template part after their headers, and the changelog records the integration. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Sequence Diagram(s)
sequenceDiagram
participant PageSingleArchiveTemplate
participant BreadcrumbsTemplatePart
participant YoastSEO
PageSingleArchiveTemplate->>BreadcrumbsTemplatePart: Include breadcrumbs template part
BreadcrumbsTemplatePart->>YoastSEO: Check yoast_breadcrumb
YoastSEO-->>BreadcrumbsTemplatePart: Render breadcrumbs block when available
Suggested reviewers: zaredrogers
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly matches the main change: switching the breadcrumbs pattern to Yoast SEO's native block. |
| 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 docstrings
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
feature/LS-1228-breadcrumbs-part-2
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 @coderabbitai help to get the list of available commands.
|
Tick the box to add this pull request to the merge queue (same as
|
There was a problem hiding this comment.
Code Review
This pull request integrates Yoast SEO's native breadcrumbs block into the Breadcrumbs pattern and includes it as a template part in the page, single, and archive templates. It also declares the plugin dependency in style.css and updates the changelog. The feedback suggests conditionally rendering the breadcrumbs block wrapper in patterns/breadcrumbs.php only when Yoast SEO is active to avoid rendering an empty div with unwanted padding when the plugin is disabled.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
patterns/breadcrumbs.php (1)
2-8: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winAdd the required
@packagetag.PHPCS fails this file because its file comment is missing
@package. Add the theme package identifier, for example:Proposed fix
/** * Title: Breadcrumbs * Slug: ls-theme/breadcrumbs * Categories: breadcrumbs * Block Types: core/template-part/breadcrumbs * Description: A breadcrumb navigation section for the website. + * `@package` ls-theme */🤖 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 `@patterns/breadcrumbs.php` around lines 2 - 8, Add the required `@package` tag to the file-level docblock above the Breadcrumbs pattern metadata, using the theme’s established package identifier and preserving the existing Title, Slug, Categories, Block Types, and Description entries.Source: Pipeline failures
🤖 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 `@style.css`:
- Line 11: Remove the unsupported Requires Plugins header from style.css and
update the corresponding CHANGELOG.md entry to reflect the actual theme
behavior; do not add an admin notice unless enforcing the Yoast SEO dependency
is required.
---
Outside diff comments:
In `@patterns/breadcrumbs.php`:
- Around line 2-8: Add the required `@package` tag to the file-level docblock
above the Breadcrumbs pattern metadata, using the theme’s established package
identifier and preserving the existing Title, Slug, Categories, Block Types, and
Description entries.
🪄 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.yml
Review profile: CHILL
Plan: Pro
Run ID: 78d01d7b-5a4a-4bed-8738-3db71e42fbdb
📒 Files selected for processing (6)
CHANGELOG.mdpatterns/breadcrumbs.phpstyle.csstemplates/archive.htmltemplates/page.htmltemplates/single.html
ZaredRogers
left a comment
There was a problem hiding this comment.
Looks good @brandonmarshal
- style.css: remove `Requires Plugins: wordpress-seo`. WordPress's Plugin Dependencies feature (6.5+) only reads this header from plugins, never from a theme's style.css, so the line was inert metadata that never notified anyone of anything. - CHANGELOG.md: correct the entry to stop claiming a notification behavior that never existed; note the pattern degrades gracefully when Yoast SEO is inactive instead.
Summary
ls-plugin/breadcrumbsblock reference inpatterns/breadcrumbs.phpwith Yoast SEO's nativeyoast-seo/breadcrumbsblock, inside the same group wrapper/padding.Requires Pluginstheme header instyle.cssfromls-plugintowordpress-seo, since the breadcrumbs pattern now depends on Yoast SEO instead of the custom plugin block.CHANGELOG.mdto describe the Yoast block adoption.Background
This supersedes the original LS-1228 Part 2 implementation (previously wired to a custom
ls-plugin/breadcrumbsdynamic block). Testing during Part 1 surfaced a real Yoast breadcrumbs bug; rather than fixing it, a fully custom block was built instead. A course-correction (documented in the LS-1228 comment thread) determined Yoast already ships its own breadcrumbs block, so the custom block was dropped entirely fromls-plugin, and this PR updatesls-themeto reference Yoast's block instead.Out of scope (confirmed, not touched)
templates/page.html,templates/single.html,templates/archive.html— already correctly reference the genericbreadcrumbstemplate-part slug from the prior implementation; no changes needed.parts/breadcrumbs.html— untouched, already correctly named (fixed separately under LS-1227 / PR Fix breadcrumbs part filename typo + align template-part consistency (LS-1227) #9).Test plan
parts/breadcrumbs.html→ls-theme/breadcrumbspattern →yoast-seo/breadcrumbsblockls-plugin/breadcrumbsand.ls-crumbs— zero remaining references to the removed custom block or its stylingphp -lonpatterns/breadcrumbs.php— no syntax errorsCloses LS-1228 (Part 2).
Summary by CodeRabbit
New Features
Documentation