Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Feature Type to Support Both Image and Video Backgrounds #1464

Merged
merged 2 commits into from
Jan 26, 2025

Conversation

siamak
Copy link
Collaborator

@siamak siamak commented Jan 26, 2025

Summary

This PR refactors the Feature type to replace bgVideo with a more flexible background field, supporting both image and video assets for light and dark modes.


Key Changes

  1. Renamed bgVideo to background.
  2. Added type field ("image" or "video") to specify background type.
  3. Introduced image field with support for url and optional metadata (e.g., dimensions, LQIP).
  4. Retained video support via MuxVideo under asset.
  5. Light and dark mode backgrounds are now optional.

Impact

  • Breaking Change: Existing bgVideo usage must be updated to the new background format.
  • Enhanced Flexibility: Supports dynamic content with both images and videos.

Testing

  • Verified correct handling of both image and video types.
  • Ensured optional light and dark modes work as intended.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

vercel bot commented Jan 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
codemod ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 26, 2025 9:52am

Copy link

pkg-pr-new bot commented Jan 26, 2025

Open in Stackblitz

npm i https://pkg.pr.new/codemod@1464

commit: e1217ca

@siamak siamak merged commit 5f3aec7 into main Jan 26, 2025
11 of 12 checks passed
@siamak siamak deleted the feature/feature-section-sanity branch January 26, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants