Files
co-lite/openspec/changes/add-page-anchor-links/proposal.md
T

1.4 KiB

Why

Landing pages cannot link within themselves. Buttons and rich-text links refuse #anchor, blocks have no id to jump to, and links inside a Custom HTML block do nothing because the sealed frame never scrolls and may not scroll the page. The INS page's "Get My Free Consultation" button therefore cannot take visitors to the sign-up form. Design: docs/superpowers/specs/2026-12-03-page-anchor-links-design.md.

What Changes

  • Each block gets an optional link name, unique on the page, rendered as the block's id.
  • Button and rich-text links accept #name.
  • The Custom HTML frame reports clicks on #name links to the page, which scrolls to the target inside the frame or to the named block.
  • New and changed editor labels in English and Chinese.

Capabilities

New Capabilities

None.

Modified Capabilities

  • landing-pages: same-page links and block link names.

Impact

  • services-counter: CmsBlock gains anchor; CmsBlockValidator checks it and accepts #name links. No DDL: blocks are stored as JSON.
  • mobile-api: none (blocks pass through as maps).
  • Portal: cmsPages.ts (isSafeLink, model), RichTextEditor.tsx, pageHtml.ts, frameHtml.ts (script and message parsing), HtmlFrame.tsx, CmsBlocks.tsx (ids), BlockFields.tsx (field), labels.
  • SQL: sql/01-anchor-labels.sql and sql/99-rollback.sql (labels only).
  • Older releases ignore the new field on read, and a page saved by an older release loses its link names.