Enrich smart-tag metadata for docs & discoverability

Enrich smart-tag metadata for docs & discoverability

#59 in Riparion/riparion-cms — merged 2026-06-04

What & why

SmartTag carried only name/label/description/snippet/props, which forced docs to be hand-duplicated (the embeds.md table drifted from the registry), limited slash-menu search to name+label, and left tags ungrouped. This makes SMART_TAGS the single source of truth for documentation and discoverability.

Changes

  • Richer registrySmartTag gains keywords, group (TagGroup enum + TAG_GROUPS), examples (TagExample), doc (long-form markdown via include_str!), and hidden. Per-component docs live in src/embeds/docs/*.md.
  • Editor discoverability[[/ autocomplete now matches keywords (e.g. hero→splash, list→queryloop); the "+ Smart tag" dropdown is grouped by family.
  • Admin help dialogPropertiesHelpButton renders the long-form doc (live markdown) + copyable examples, lazily inside if open().
  • Registry-generated public docs — a new [[/smarttag_catalog]] embed replaces the hand-written table in the embeds help article, killing drift.
  • New /help/components page — searchable, grouped catalog with copyable snippets; linked from /help, the embeds article, and the admin component list.
  • Guards & cleanup — hidden docs-only tags are excluded from every authoring surface and rejected by validate_global_embed; the clipboard helper is extracted to a shared src/clipboard.rs.

A code review pass was applied: full docs render only in the in-article catalog (the searchable browse page skips per-keystroke markdown parsing), prop_kind_hint is bound once, and the New-component default is hidden-filtered.

Verification

  • cargo check (server-sqlite + wasm), cargo clippy (server-sqlite, server-postgres, wasm), cargo fmt --check — all clean.
  • cargo test — 16/16 pass, incl. new registry-invariant tests.
  • Manual steps recorded locally in TODO_VERIFICATION.md.

🤖 Generated with Claude Code

Last updated 2026-06-05