docs: inline Pro badge on Pro-only section headings#192
Conversation
Rolls out the `<span class="badge badge--primary">Pro</span>` marker introduced in the v1.9 refresh to every Pro-only sub-section heading across v1.x docs and i18n translated copies. Where headings carried a " (Pro)" suffix, the suffix is dropped in favor of the badge. Closes #189
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: wcpos/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (47)
✅ Files skipped from review due to trivial changes (27)
📝 WalkthroughWalkthroughAdds inline Pro badges to Pro-only section headings and sets/hides page titles (frontmatter ChangesDocumentation Pro Badge Standardization
Estimated code review effort 🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Applies the inline `<span class="badge badge--primary">Pro</span>` marker to the page-level H1 of pages that are entirely Pro-only (customers, orders, reports, stores, coupons, extensions, products). Uses the `hide_title: true` frontmatter + explicit markdown H1 pattern so JSX can be embedded in the title while preserving the frontmatter title for SEO, sidebar, breadcrumbs, and `<title>` tag. Existing `:::info Pro Feature` admonitions are kept — they still carry the Pro-license link. Propagates the same change to all i18n translations of these pages where they exist (uses the pro-license link as a translation-stable anchor to locate the existing Pro admonition). Refs #189
|
Follow-up commit 3b8954b adds the Pro badge to the page-level H1 on the seven whole-page Pro features ( Mechanism: Verified the rendered H1 in all 11 locales — example: If the double-marking (badge on title + admonition right below) ends up looking heavy, easiest revert is to drop the admonition on those pages and rely on the badge alone — happy to do that as a follow-up if the visual is too loud. |
Summary
<span class="badge badge--primary">Pro</span>to Pro-only sub-section headings acrossversioned_docs/version-1.x/(per the audit in Adopt inline 'Pro' badge on Pro-only section headings across the docs #189), so readers get a fast visual cue without scanning for a Pro Feature admonition.## Coupon Codes <span class="badge badge--primary">Pro</span>).customers/,orders/,reports/,stores/,coupons/,extensions/) are intentionally untouched — they keep their existing:::info Pro Featureadmonition, no double-marking.ar,de,es,fr,hi-IN,it,ja,ko,pt-BR,zh-CN) where the heading exists — Docusaurus anchor IDs ({#anchor}) make the headings easy to identify regardless of translated heading text. Translations stale enough to be missing the section entirely are skipped (notablytemplates/index.mdx#pro-featuresandproducts/index.mdx#cost-of-goods-sold, neither of which has propagated to translations yet).Files touched
English source (8 headings across 7 files):
versioned_docs/version-1.x/products/index.mdx—### Cost of Goods Soldversioned_docs/version-1.x/payment/index.mdx—## Additional Payment Gatewaysversioned_docs/version-1.x/pos/checkout/index.mdx—### Additional Gateways,## Coupon Codesversioned_docs/version-1.x/settings/wp-admin/store-tax-ids.mdx—## Per-store tax IDsversioned_docs/version-1.x/getting-started/index.mdx—## Pro Featuresversioned_docs/version-1.x/templates/index.mdx—## Pro Featuresversioned_docs/version-1.x/extensions/polylang.mdx—## Per-Store LanguagePlus 33 translated files where the same anchors exist.
Test plan
pnpm build— succeeds across all 10 locales + default. Only warnings are the pre-existingvscode-languageserver-typescritical-dependency warning and pre-existing broken anchors on/fr/templates/printer-setup+/de/templates/printer-setup(unrelated).<span class="badge badge--primary">Pro</span>inside the<h2>/<h3>and also in the TOC sidebar entry (Infimabadge--primaryis the built-in Docusaurus class — no custom CSS needed).pnpm start:/ar/) rendering of the badge alongside Arabic heading text looks reasonableCloses #189
Summary by CodeRabbit