Skip to content

Describe every slot type in the schema registry - #7

Merged
do-io merged 2 commits into
mainfrom
add-schemas-for-all-slot-types
Oct 11, 2026
Merged

do-io merged 2 commits into
mainfrom
add-schemas-for-all-slot-types

Conversation

@do-io

@do-io do-io commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds schemas for the remaining 21 slot types, so the drag-and-drop editor can edit all 29 (it could edit 8).

  • Each schema follows what the slot's Blade view actually reads; the existing Filament blocks were the reference for labels and placeholders.
  • New tags field type for lists of strings (pricing tier features, data-table headers and cells). The editor shows it as a textarea with one value per line; Filament gets a TagsInput. Schema VERSION is now 2.
  • The Filament blocks of the new types are built by SchemaBlockFactory, so the form and the editor share one description (about 700 lines of hand-written blocks removed).
  • SlotSchemaRegistry::for() now returns a non-null SlotSchema. A test fails if a type is added to the enum without a schema.

Behaviour changes to review

  • order_receipt: the old Filament block saved name/quantity/price/total, but the view reads item/qty/unit_price/grand_total/notes. The schema follows the view, so data stored under the old keys will no longer render.
  • order_receipt.status and rss_feed.feed_url are dropped: no view reads them.
  • New fields exposed that views already read: image URLs on two_column, and advanced style fields such as bg_color.
  • A new Data Table starts with three empty rows (cells has no default).

Test plan

  • vendor/bin/pest (113 tests)
  • npm run test:js (24 tests)
  • vendor/bin/phpstan analyse, vendor/bin/pint --test
  • Workbench demo: palette lists 29 blocks; added Pricing Grid, Data Table, Testimonial and Order Receipt; preview renders with no errors; editing a tags field updates the document and the preview

🤖 Generated with Claude Code

do-io and others added 2 commits October 11, 2026 12:11
Adds schemas for the remaining 21 slot types so the drag-and-drop editor
can edit all 29. Fields follow what each slot's view reads.

- Add the tags field type for lists of strings (pricing features, table
  headers and cells); the editor edits it one value per line.
- Build the Filament blocks of the new types from SchemaBlockFactory, so
  the form and the editor share one description. This also fixes
  order_receipt, whose form saved keys its view never read.
- SlotSchemaRegistry::for() now returns a SlotSchema; schema version is 2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new Data Table started with three empty rows. The row's cells field now
defaults to four placeholder cells, matching the four default columns.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@do-io
do-io merged commit 43eda6d into main Oct 11, 2026
14 checks passed
@do-io
do-io deleted the add-schemas-for-all-slot-types branch October 11, 2026 19:20
do-io added a commit that referenced this pull request Oct 16, 2026
The slot schema section still said only eight types were described.
Since #7 the registry describes all 29, so the editor can edit every one.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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