Uh oh!
There was an error while loading. Please reload this page.
feat: composite section blocks (section.*) - #6
Merged
Conversation
Approved brainstorming design for an engine-owned section palette under a new Strapi category `section.*`, mirroring the existing press.* injection + type-sync mechanism. v1 ships two flat sections (section.hero, section.cta); sections with nested repeatable components (FeatureGrid, Testimonials) are deferred to a second spec. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Widen packages/web/vitest.config.ts test.include to src/**/*.test.{ts,tsx}
so the new block-renderer.test.tsx (authored with JSX) is discovered by
vitest; prior config only matched *.test.ts.Final-review Minor #7: match the section.hero sibling's citation and the "comments cite Spec §…" convention. Comment-only; no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Composite section blocks (
section.*)Ships an engine-owned palette of composite sections —
section.heroandsection.cta— that are admitted into the pagebodyDynamic Zone automatically,render as semantic HTML branded by the adopter's theme, and are overridable via
BlockRenderer. It mirrors the existingpress.*reference-block mechanism into aseparate
section.*category, preserving the three-palette split(
press.*atoms /section.*sections /custom.*adopter).What's in it
press-cms)section.hero/section.ctaunder a newsectioncategory (deterministicglobalId); admits them statically into the page DZ (page/schema.json).serialize-schemaunchanged.SectionHero/SectionCta+ thePageBodyunion with zero generator change — v1 fields are all flat scalar/media/enum (pinned by a test).press-web)Hero/Ctarenderers (no title → nothing; CTA/button only when both parts present — no dead links). SeparatesectionBlocksregistry;BlockRenderermerges{ ...referenceBlocks, ...sectionBlocks, ...components }so adopters still win last and can override any section.theme.csssection rules are a purevar(--press-*)token consumer — sections are born branded by Site Settings, no override required.minor.Invariants held
press.*andcustom.*untouched;press.herostays removed.PressSchematype-only on both sides; generator references no Strapi/React types.section.*for free onpress upgrade— no host-template change.Verification
pnpm -r test→ cli 21/21, cms 24/24, web 146/146;pnpm -r typecheckclean;pnpm build(incl. cmsstrapi-plugin build+ playground Next build) green.Not yet done (needs the running app): boot
pnpm play, author a Hero + CTA page in the admin, confirm both render branded on:3000, and commit the regeneratedapps/playground/.../generated.tsif the sync changes it. Also eyeball the hero image+content layout (single-columndisplay:grid— addgrid-template-columnsif side-by-side is wanted).🤖 Generated with Claude Code