Skip to content

feat(cms): add schema for VideoHero component#180

Merged
Ur-imazing merged 6 commits intomainfrom
feat/142-video-hero
Mar 4, 2026
Merged

feat(cms): add schema for VideoHero component#180
Ur-imazing merged 6 commits intomainfrom
feat/142-video-hero

Conversation

@Ur-imazing
Copy link
Copy Markdown
Contributor

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

Resolves #142

Summary

Add VideoHero section component schema in Strapi and register it on the Experience sections dynamic zone so editors can configure hero sections with video content. GraphQL schema and @forge/graphql client regenerated. No widthPercent (deprecated). Bounded to epic #175 / issue #142.

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
    • Added a Video Hero section component for the CMS: editors can create hero blocks with a required video, optional heading/subheading, and customizable CTA label/link.
    • Video Hero is now available in dynamic page sections and content zones.
    • GraphQL schema and inputs updated to support querying, filtering, and creating Video Hero content.

@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: 30f09eaa-9c73-4a98-a3bd-d5cf07a79c60

📥 Commits

Reviewing files that changed from the base of the PR and between 31d1327 and d020c84.

📒 Files selected for processing (3)
  • apps/cms/schema.graphql
  • apps/cms/src/components/sections/video-hero.json
  • packages/graphql/src/graphql-env.d.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/cms/src/components/sections/video-hero.json

Walkthrough

A new VideoHero component is added to the CMS: component schema created, registered in the Experience content-type dynamic zone, and GraphQL schema updated with the component type, input, and filter types; the component is also added to relevant unions.

Changes

Cohort / File(s) Summary
GraphQL schema & introspection
apps/cms/schema.graphql, packages/graphql/src/graphql-env.d.ts
Added ComponentSectionsVideoHero type plus ComponentSectionsVideoHeroInput and ComponentSectionsVideoHeroFiltersInput. Updated ExperienceSectionsDynamicZone and GenericMorph unions to include the new component.
Component schema
apps/cms/src/components/sections/video-hero.json
Added Video Hero component definition with attributes: video (relation to api::video.video, required), heading, subheading, ctaLink, ctaLabel.
Content-type registration
apps/cms/src/api/experience/content-types/experience/schema.json
Registered sections.video-hero in the sections.components dynamic zone array of the Experience content-type (adjusted array formatting).

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 title clearly and concisely summarizes the main objective: adding a schema for the VideoHero component, which directly corresponds to the primary changes in the PR.
Linked Issues check ✅ Passed All acceptance criteria from issue #142 are met: VideoHero component JSON schema added, registered in Experience sections dynamic zone, and GraphQL schema regenerated with contracts changes.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #142 schema requirements; no client-side rendering or unrelated modifications are present.
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 docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/142-video-hero

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 62-63: The schema enables "sections.video-hero" but the
frontend/mobiles still omit rendering and fetching for it; update the consumer
code to include the new section: add ComponentSectionsVideoHero to the rendering
switch/registry where other sections are mapped (e.g., alongside
ComponentSectionsCta), ensure the content fetching code that builds
queries/selection sets (the function that currently populates section types)
requests the video-hero fields so it's returned to clients, and update
iOS/Android queries to include the video-hero fragment so mobile apps receive
and can render this section.

In `@apps/cms/src/components/sections/video-hero.json`:
- Around line 10-14: The "video" relation in the VideoHero component is optional
and must be made required to prevent incomplete hero entries; update the "video"
attribute (the "video" key in the JSON) to mark it as required (add the required
constraint/property and any necessary validation metadata used by your CMS
schema) so editors cannot save a VideoHero without selecting a related
api::video.video entry, and ensure any admin UI validation messages are
preserved/updated.

ℹ️ 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 91be966 and 31d1327.

📒 Files selected for processing (4)
  • apps/cms/schema.graphql
  • apps/cms/src/api/experience/content-types/experience/schema.json
  • apps/cms/src/components/sections/video-hero.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/video-hero.json
Addresses CodeRabbit review: editors cannot save a VideoHero without
a related video. Regenerated GraphQL schema and codegen.

Made-with: Cursor
@Ur-imazing
Copy link
Copy Markdown
Contributor Author

Re: CodeRabbit suggestion to add VideoHero to web/mobile fetch and render — Client fetching and rendering for VideoHero is out of scope for this PR (issue #142). Per epic #175, this epic is schema-only; no web UI changes. Consumer implementation is tracked in #152 (web) and epic #176.

@Ur-imazing
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 4, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Ur-imazing Ur-imazing merged commit 65e99d7 into main Mar 4, 2026
14 of 15 checks passed
@Ur-imazing Ur-imazing deleted the feat/142-video-hero branch March 4, 2026 03:22
Kneesal pushed a commit to Kneesal/forge that referenced this pull request Mar 9, 2026
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 VideoHero component

1 participant