feat(content): add video teaser across all layers#65
feat(content): add video teaser across all layers#65stacelKonrad wants to merge 5 commits intomainfrom
Conversation
Add teaserVideo content type with lazy-loading, skeleton and error state. Wires the full stack: Contentful migration, GraphQL fragment, Zod schema, mapper, contract, presentation block, and Storybook story.
Replace hardcoded "Video unavailable" string with next-intl translation key.
| 'en-US': { | ||
| title: 'New in', | ||
| caption: 'Discover the latest trends.', | ||
| link: linkRef, | ||
| }, | ||
| 'de-DE': { | ||
| title: 'Neu eingetroffen', | ||
| caption: 'Entdecke die neuesten Trends.', | ||
| link: linkRef, | ||
| }, | ||
| 'autoplay': true, | ||
| 'controls': false, | ||
| }) |
There was a problem hiding this comment.
Mixed locale keys and non-locale fields, maybe worth to standarize this and pass locale fields some structured way?
There was a problem hiding this comment.
Not sure about some settings in one locale and missing in the second though.
integrations/contentful-migration/migrations/01-02-teasers/01-02-16-video.ts
Show resolved
Hide resolved
apps/presentation/features/content/teasers/teaser-video-block.tsx
Outdated
Show resolved
Hide resolved
apps/presentation/features/content/teasers/teaser-video-block.tsx
Outdated
Show resolved
Hide resolved
Move autoplay/controls into en-US locale object in VIDEO_TEASER data. Replace block-level CmsLink with an absolute overlay to preserve video controls interaction. Add playsInline for autoplay on mobile. Rename migration file to 01-02-16-video and remove redundant brand component migration that was merged into the sequence.
| 'en-US': { | ||
| title: 'New in', | ||
| caption: 'Discover the latest trends.', | ||
| link: linkRef, | ||
| }, | ||
| 'de-DE': { | ||
| title: 'Neu eingetroffen', | ||
| caption: 'Entdecke die neuesten Trends.', | ||
| link: linkRef, | ||
| }, | ||
| 'autoplay': true, | ||
| 'controls': false, | ||
| }) |
There was a problem hiding this comment.
Not sure about some settings in one locale and missing in the second though.
| {link && ( | ||
| <CmsLink | ||
| link={link} | ||
| className='absolute inset-0 z-10' |
There was a problem hiding this comment.
I think now we could have problems for combination of link and controls as it wouldn't be possible to use controls at all due to overlay.
| link={link} | ||
| className='absolute inset-0 z-10' | ||
| aria-label={link.title} | ||
| /> |
There was a problem hiding this comment.
CmsLink falls back to its label if there is no children passed.
| <CmsLink | ||
| link={link} | ||
| className='absolute inset-0 z-10' | ||
| aria-label={link.title} |
There was a problem hiding this comment.
aria-label will be ignored by CmsLink, most likely we need to pass rest props in CmsLink.
Add teaserVideo content type with lazy-loading, skeleton and error state. Wires the full stack: Contentful migration, GraphQL fragment, Zod schema, mapper, contract, presentation block, and Storybook story.