feat(cms): add schema for Container component (side-by-side items)#186
feat(cms): add schema for Container component (side-by-side items)#186Ur-imazing merged 4 commits intomainfrom
Conversation
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
Run ID: 📒 Files selected for processing (1)
WalkthroughAdds a new Container component system: component JSON schemas for Container and Container Slot, GraphQL types/unions and inputs for container/slots and dynamic-zone content, and registers the container in the Experience content-type dynamic zone. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/cms/src/api/experience/content-types/experience/schema.json`:
- Around line 63-64: The schema enables "sections.container" but the web app
doesn't fetch or render that type; update the GraphQL query in
apps/web/src/lib/content.ts to add an inline fragment for ... on
ComponentSectionsContainer (include the fields needed by the renderer) and
update the renderer switch in apps/web/src/components/sections/index.tsx to
handle the ComponentSectionsContainer/sections.container case (returning the
appropriate SectionsContainer component or mapping its children to existing
section renderers). Ensure you reference the same type name
(ComponentSectionsContainer) and the sections renderer entry point in index.tsx
when adding the new case.
In `@apps/cms/src/components/sections/container-slot.json`:
- Line 6: Update the slot description so it matches the actual allowed
dynamic-zone components: either change the descriptive examples in the
"description" field to only reference components permitted by the
"sections.media-collection" dynamic zone, or expand the dynamic-zone
("sections.media-collection") to include the referenced components (e.g., text,
carousel, BibleQuotesCarousel); modify the "description" string in
container-slot.json to accurately list the allowed components or adjust the
dynamic-zone component list so the examples in the description are valid.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled
You can enable these sources in your CodeRabbit configuration.
Run ID: cacfc770-5c5e-43fa-b6fc-8b0ac4e03369
📒 Files selected for processing (5)
apps/cms/schema.graphqlapps/cms/src/api/experience/content-types/experience/schema.jsonapps/cms/src/components/sections/container-slot.jsonapps/cms/src/components/sections/container.jsonpackages/graphql/src/graphql-env.d.ts
|
Re: CodeRabbit major (web consumption not in place) Web fetch/render for Container is intentionally out of scope for this PR. Epic #175 is CMS-only ("no web UI changes in this epic"); web implementation is tracked in #153 (feat(web): add Container component). No change to |
Made-with: Cursor
Resolves #143
Summary
Add Container section component with repeatable slots; each slot has
gridSpan(1–12, CSS grid) and a dynamic zone for content (e.g. media-collection now; Text, BibleQuotesCarousel when those schemas exist). Register Container in Experiencesectionsdynamic zone. Schema and codegen updated.Contracts Changed
Regeneration Required
Validation
Made with Cursor
Summary by CodeRabbit