Repository navigation
Generate the seed schema from the widget registry, so a fresh site can save every element - #1
Merged
Merged
Conversation
…n save every element
builderdash-setup declared only builder_container and builder_content_ref, so
on a site installed from the package a heading, text, image, button, divider
or template could be added in the builder but never saved ("block type
builder_heading is unavailable"). The registry was meant to be the single
source of the seed block types, but nothing generated them.
- src/schema/seed.ts builds the fields and one block type per widget from
WIDGETS (colors and URLs stored as strings, select defaults, parent_key).
It is built on its own into seed/ (no runtime dependencies), exported as
@lickybuay/builderdash/seed, and the installer reads it; an existing block
type gets the fields it lacks.
- CI checks seed/ is up to date, like dist/.
- README: the manual setup prints the generated schema, documents that
`emdash seed --no-content` does not update existing definitions, and adds
Status & roadmap and Author sections.
Verified on a site created with create-emdash (starter, pnpm) and the plugin
installed from its packed tarball: a layout with every element type, the
container background included, saves (200).
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.
What changes
builderdash-setupdeclared onlybuilder_containerandbuilder_content_ref, so on a site installed from the package a heading, text, image, button, divider or template could be added in the builder but never saved (block type "builder_heading" is unavailable).src/schema/seed.tsgenerates the seed fields and one block type per widget from the registry. It is built intoseed/(no runtime dependencies), exported as@lickybuay/builderdash/seed, and used by the installer; an existing block type gets the fields it lacks.seed/is up to date, likedist/.emdash seed --no-contentdoes not update existing definitions; adds Status & roadmap and Author.How it was verified
pnpm typecheckpnpm test(239 passing, 3 new)pnpm build(dist/unchanged,seed/committed)create-emdash(starter, pnpm), plugin installed from its packed tarball,builderdash-setup; a layout with every element type, container background included, saves (200).Screenshots
No UI change.