feat(cms): add schema for Section component (background, blur hash, children)#200
feat(cms): add schema for Section component (background, blur hash, children)#200Ur-imazing merged 3 commits intomainfrom
Conversation
Made-with: Cursor
Made-with: Cursor
WalkthroughAdds a new CMS "Section" component with backgroundColor, blurHash, and a dynamic content zone; integrates it into the Experience content type and updates GraphQL and TypeScript schema declarations to expose the new component and related unions/inputs/enums. 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 |
Resolve conflicts: keep Section and Text in Experience sections; include both in graphql-env.d.ts unions; add sections.text to Section content dynamic zone and Experience sections list. Made-with: Cursor
|
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/schema.graphql`:
- Line 483: The new union member ComponentSectionsSection was added but not
handled in the renderer or requested in the watch query; update the
SectionRenderer function to add a case for "ComponentSectionsSection" (import
the corresponding React component or implement a renderer for that variant) so
the switch/if on section.__typename is exhaustive, and update the
GET_WATCH_EXPERIENCE GraphQL selection (used in GET_WATCH_EXPERIENCE in
content.ts) to include the ComponentSectionsSection fragment/fields so the data
shape matches what SectionRenderer expects; ensure types/imports are updated so
type-checking passes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1a3bbb40-86c3-4022-9d07-4424d6a26301
📒 Files selected for processing (4)
apps/cms/schema.graphqlapps/cms/src/api/experience/content-types/experience/schema.jsonapps/cms/src/components/sections/section.jsonpackages/graphql/src/graphql-env.d.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- apps/cms/src/api/experience/content-types/experience/schema.json
- apps/cms/src/components/sections/section.json
|
Re: CodeRabbit critical comment (#discussion_r2886577709) CodeRabbit is correct that We are not addressing this in this PR by design. This PR is scoped to CMS schema and codegen only, as specified in the parent epic #175 and issue #145 ("no web UI changes in this epic" / "Schema and codegen only; no web UI"). Web rendering and query updates for the Section component belong in Epic B (#176) or the related web issue #155 (feat(web): add Section component). Those will add the Tracking: the critical finding will be actioned when the Section web component is implemented in a follow-up PR under #176/#155. |
Resolves #145
Summary
Add Section section component schema with
backgroundColor(enum: default, light, dark, primary),blurHash(string), andcontentdynamic zone. Register in Experiencesectionsdynamic zone. Sectioncontentallows: media-collection, promo-banner, info-blocks, cta (text not on main yet; can be added when #144 merges). GraphQL schema and generated client updated.Contracts Changed
Regeneration Required
Validation
Made with Cursor
Summary by CodeRabbit