System element library: all v1 ContentElements as shortcode templates + sidecars #14
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
The shipped element library (docs/DECISIONS.md D23), each as
layouts/shortcodes/X.html+editor/elements/X.yaml, fully editable through the generated forms and rendering correctly in preview:grid(row + columns with a fixed responsive width set),spacertext,text-media,image,gallery,hero,quote,video-embed(privacy-friendly click-to-load),accordion(nested item shortcodes),page-teasers(lists child pages of a chosen section),html(developer-flagged, hidden from the picker by default)button,iconMarkup is semantic and theme-agnostic (classes only, no inline styles) so themes style it; the basic theme (separate issue) provides the styling.
Acceptance criteria
htmlelement does not appear in the default picker; a sidecar flag exposes itBlocked by
Agent Brief
Category: enhancement
Summary: Ship the complete v1 element library: every system element as a Hugo shortcode template (
layouts/shortcodes/X.html) plus an editor sidecar (editor/elements/X.yaml), with semantic theme-agnostic markup, full editability through the schema-generated forms, round-trip test coverage for every element, and a rendered example of each on the sample site.Dependency note: this issue is hard-blocked by #3 (sidecar schema loading/validation, schemas API, generated forms, canonical save path) — the scheduler handles ordering. #3 ships the schema machinery plus two demonstration elements; this issue fills the library out to the full v1 set using the same sidecar shape and field types, changing the machinery only if a library element genuinely cannot be expressed. The issue body's
docs/DECISIONS.md D23reference points at a file that is not committed — this brief is self-contained.Current behavior:
The content engine round-trips shortcode-based content losslessly (its test corpus already exercises grid/column nesting, accordion with nested items, and a hero containing inline buttons — as syntax fixtures only). Once #3 lands, sidecars in
editor/elements/are discovered, validated, served via the API, and rendered as generated param forms, with canonical save and live preview working end-to-end — but only for the couple of demonstration elements #3 adds. There is no shipped element library: an editor cannot build a real page out of grids, heroes, galleries, accordions, and the rest.Desired behavior:
Every element below exists as a shortcode template plus a sidecar, is fully editable through the generated forms (all params expressible with #3's nine field types), and renders correctly in the live preview.
Structure group:
Content group:
figure/figcaptionmarkup.buttonshortcodes mid-text.blockquote-based semantic markup.details/summary) so the element works unstyled and without JS.htmlelements on a page remain visible and editable regardless.Inline group:
Markup contract. All templates emit semantic, theme-agnostic HTML: meaningful elements, a consistent documented class vocabulary, classes only — no inline styles, no CSS shipped by this issue, no JS except video-embed's minimal consent loader, and no third-party assets anywhere. Accessibility basics are in the markup itself (alt on images, real headings, focusable/labelled interactive parts). The library must look acceptable-but-unstyled on a bare site; making it pretty is the theme's job.
Sidecar contract. Every sidecar provides label, icon identifier, picker group (structure/content/inline), schema version, body policy, and params, using #3's shape and field types. Containers and their items declare placement metadata (what may nest where — grid columns accept block elements, accordion accepts only its items, items name their container, inline elements are body-level); this issue declares the rules so #6 can enforce them. All sidecars must load through #3's validator with zero errors and appear in the schemas API with their group and icon metadata; if #6's picker exists by implementation time, it shows the elements grouped Structure/Content with icons — otherwise grouping is verified through the API.
Tests and demonstration. The content engine's corpus round-trip suite gains at least one canonical fixture per element (covering nesting for grid and accordion and inline button/icon inside bodies), so every element's serialized form is locked in. The sample site gains example pages demonstrating every element, building cleanly and rendering in the preview.
Key interfaces:
Acceptance criteria:
Out of scope:
ce/attrs) partial — the basic theme issue (#15)Closing as superseded: the maintainer has decided on a clean-slate reset of the project (issue #29, PR #30). The v1 implementation this issue builds on is being removed and the plan will be re-drawn from scratch; this spec is retired rather than actioned.