Skip to content

feat(cms): add schema for Container component (side-by-side items)#186

Merged
Ur-imazing merged 4 commits intomainfrom
feat/143-container
Mar 4, 2026
Merged

feat(cms): add schema for Container component (side-by-side items)#186
Ur-imazing merged 4 commits intomainfrom
feat/143-container

Conversation

@Ur-imazing
Copy link
Copy Markdown
Contributor

@Ur-imazing Ur-imazing commented Mar 4, 2026

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 Experience sections dynamic zone. Schema and codegen updated.

Contracts Changed

  • yes
  • no

Regeneration Required

  • yes
  • no

Validation

  • Contracts validated
  • Generated code verified (no manual edits)
  • Tests and build passed
  • Terraform plan reviewed (if infra change)

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Introduced a flexible container-based layout with repeatable slots for composing section content.
    • Expanded CTA component with heading, button link, ID and width controls.
    • Added slot-level filtering, pagination and sort support for managing slot content.
    • Enabled media components inside container slots.
    • Experience sections dynamic zones now accept the new container component.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent 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: 8233118b-56b7-4979-a8b6-77508d48d51b

📥 Commits

Reviewing files that changed from the base of the PR and between 4fbc7c0 and 558e3fe.

📒 Files selected for processing (1)
  • apps/cms/src/components/sections/container-slot.json

Walkthrough

Adds 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

Cohort / File(s) Summary
GraphQL schema
apps/cms/schema.graphql
Added ComponentSectionsContainer, ComponentSectionsContainerSlot, related Input/Filters, ContainerSlotContentDynamicZone union and input scalar, extended ExperienceSectionsDynamicZone and GenericMorph, expanded ComponentSectionsCta fields.
CMS component definitions
apps/cms/src/components/sections/container.json, apps/cms/src/components/sections/container-slot.json
New Strapi-like component files: container.json (repeatable slots component) and container-slot.json (attributes: gridSpan, content dynamic zone allowing sections.media-collection).
Experience content-type
apps/cms/src/api/experience/content-types/experience/schema.json
Registered the new sections.container component in the sections dynamic zone components array.
TypeScript GraphQL env
packages/graphql/src/graphql-env.d.ts
Added TypeScript/GraphQL introspection shapes for container, slot, filters/inputs, union mapping updates to include the new types.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately and concisely summarizes the main change: adding a Container component schema to the CMS for side-by-side layout capabilities.
Linked Issues check ✅ Passed The PR implements the core requirements from #143: Container component schema added, repeatable slots created, and GraphQL schema updated; however, the naming uses 'slots' instead of the proposed 'items'.
Out of Scope Changes check ✅ Passed All changes are within scope: CMS schema files, GraphQL definitions, and type definitions. No web UI implementation files (apps/web/src) are included, which aligns with the stated out-of-scope boundary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/143-container

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 65e99d7 and 4fbc7c0.

📒 Files selected for processing (5)
  • apps/cms/schema.graphql
  • apps/cms/src/api/experience/content-types/experience/schema.json
  • apps/cms/src/components/sections/container-slot.json
  • apps/cms/src/components/sections/container.json
  • packages/graphql/src/graphql-env.d.ts

Comment thread apps/cms/src/api/experience/content-types/experience/schema.json
Comment thread apps/cms/src/components/sections/container-slot.json Outdated
@Ur-imazing
Copy link
Copy Markdown
Contributor Author

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 apps/web/src/lib/content.ts or apps/web/src/components/sections/index.tsx in this PR.

@Ur-imazing Ur-imazing merged commit b659348 into main Mar 4, 2026
14 of 15 checks passed
@Ur-imazing Ur-imazing deleted the feat/143-container branch March 4, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cms): add schema for Container component (side-by-side items)

1 participant