Fix #24: keep nav menu and Ask AI button in single policy view#26
Fix #24: keep nav menu and Ask AI button in single policy view#26r00bbert wants to merge 3 commits into
Conversation
Extract the nav into a shared partial so the single policy view renders the full menu and Ask AI CTA instead of a brand-only bar. Section links on the policy page point back to the main trust center page.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughA new navigation partial consolidates brand, section links, and Ask AI CTA rendering. The trust-center template builds ChangesShared Navigation and Trust Center Integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@templates/partials/nav.php`:
- Around line 25-29: The img alt for the logo may be empty when $ot_company_name
is not set; update the alt to fall back to the site name (e.g.
get_bloginfo('name')) so screen readers always have an accessible label. In
templates/partials/nav.php change the alt expression for the ot-nav__brand-logo
to use esc_attr( $ot_company_name ?: get_bloginfo('name') ) (or equivalent) so
it never renders an empty alt attribute.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1f700017-4255-472d-a0b0-9232163264c7
📒 Files selected for processing (3)
templates/partials/nav.phptemplates/partials/policy-single.phptemplates/trust-center.php
|
Superseded by #32. This branch predates the namespace rename (#28) and edits files/identifiers that no longer exist on main ( |
Summary
The single policy view rendered a brand-only nav bar — the section menu (Policies, Certifications, …) and the Ask AI CTA were missing, so visitors lost navigation the moment they opened a policy.
Changes
templates/partials/nav.php, used by both the main page and the single policy view.{base}#ot-section) since those sections don't exist on the policy page.data-ot-nav) stays wired only on the main page, where the target sections live.trust-center.phpand shared across both views.Net result: no behaviour change on the main page, consistent nav on the policy page.
Test plan
Closes #24
Summary by CodeRabbit
New Features
Refactor
Documentation