Feat/template editing#351
Closed
kadenbking wants to merge 34 commits into
Closed
Conversation
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>
feat: added full page preview
- 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>
Feature/preview
feat: support ref: block references and list.template
fix: build warnings
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>
Feat/link selector component
UI Improvements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.