Skip to content

Generate the seed schema from the widget registry, so a fresh site can save every element - #1

Merged
lickybuay merged 1 commit into
mainfrom
fix/install-all-block-types
Oct 9, 2026
Merged

lickybuay merged 1 commit into
mainfrom
fix/install-all-block-types

Conversation

@lickybuay

Copy link
Copy Markdown
Owner

What changes

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).

  • src/schema/seed.ts generates the seed fields and one block type per widget from the registry. It is built into seed/ (no runtime dependencies), exported as @lickybuay/builderdash/seed, and used by the installer; an existing block type gets the fields it lacks.
  • CI checks seed/ is up to date, like dist/.
  • README: manual setup prints the generated schema; documents that emdash seed --no-content does not update existing definitions; adds Status & roadmap and Author.

How it was verified

  • pnpm typecheck
  • pnpm test (239 passing, 3 new)
  • pnpm build (dist/ unchanged, seed/ committed)
  • Tried in an EmDash site: created with 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.

…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).
@lickybuay
lickybuay merged commit 9f45e75 into main Oct 9, 2026
1 check passed
@lickybuay
lickybuay deleted the fix/install-all-block-types branch October 9, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant