Skip to content

Feat/template editing#351

Closed
kadenbking wants to merge 34 commits into
hunvreus:mainfrom
cornerstone-web:feat/template-editing
Closed

Feat/template editing#351
kadenbking wants to merge 34 commits into
hunvreus:mainfrom
cornerstone-web:feat/template-editing

Conversation

@kadenbking

Copy link
Copy Markdown

No description provided.

kadenbking and others added 30 commits January 22, 2026 15:15
Fixes three interconnected bugs that prevent block fields from working
correctly when using custom blockKey and component references:

1. Filter discriminator from Zod schema (lib/schema.ts)
   When generating Zod validation schemas for blocks, the discriminator
   field is now filtered out before building the block's field schema.
   This prevents z.string() from overwriting z.literal("hero") during
   the merge.

2. Preserve blockKey during component resolution (lib/config.ts)
   The resolveComponent() function now explicitly preserves blockKey
   after merging component definitions.

3. Fix discriminator merge order (lib/schema.ts)
   Changed spread order in deepMap so discriminator value takes
   precedence over any undefined values from processing hidden fields.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tor-handling

fix: block field handling with custom blockKey and component references
- Create BlockPreview component with iframe + postMessage
- Add previewUrl to Config type
- Integrate preview panel into entry-form sidebar
- Watch block values and send updates to preview iframe
- Support expand/minimize preview

The preview system displays live updates as users edit block
content in the CMS. Requires previewUrl in config pointing to
the template site's preview pages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- configSchema.ts: Add template property to ListSchema for list.template
- configSchema.ts: Accept ref:* strings in blocks field validation
- configSchema.ts: Change ConfigSchema to passthrough() for custom props
- config.ts: Resolve ref: references at config normalization time
- entry-editor.tsx: Fetch template defaults for new entries

Enables blocks: ref:blockTypes syntax and list.template for
auto-populating blocks from templates when creating new entries.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
feat: support ref: block references and list.template
New field type that:
- Fetches site-manifest.json from previewUrl
- Shows searchable dropdown of internal pages grouped by collection
- Supports manual entry of external URLs
- Validates URL format (relative or absolute)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Extract useSiteManifest hook for reusable manifest fetching
- Create InlineLinkPicker component for compact link selection
- Update link field to use shared hook
- Integrate link picker into TipTap BubbleMenu for rich-text links

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@kadenbking kadenbking closed this Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant