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

Support embedded Youtube Atom in Card #8075

Merged
merged 4 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 36 additions & 22 deletions dotcom-rendering/fixtures/manual/trails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const trails: [
kickerText: 'Kicker',
},
],
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -87,11 +87,25 @@ export const trails: [
design: ArticleDesign.Video,
display: ArticleDisplay.Standard,
},
mediaType: 'Video',
mediaDuration: 378,
dataLinkName: 'news | group-0 | card-@2',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: {
type: 'Video',
elementId: 'abcdef',
videoId: 'abcd',
title: 'some title',
duration: 378,
width: 480,
height: 288,
origin: 'The Guardian',
expired: false,
images: [
{
url: 'https://i.guim.co.uk/img/media/e060e9b7c92433b3dfeccc98b9206778cda8b8e8/0_180_6680_4009/master/6680.jpg?width=600&quality=45&dpr=2&s=none',
width: 600,
},
],
},
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -110,7 +124,7 @@ export const trails: [
kickerText: 'Live',
dataLinkName: 'news | group-0 | card-@3',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -128,7 +142,7 @@ export const trails: [
},
dataLinkName: 'news | group-0 | card-@4',
showQuotedHeadline: true,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -146,7 +160,7 @@ export const trails: [
},
dataLinkName: 'news | group-0 | card-@5',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -165,7 +179,7 @@ export const trails: [
},
dataLinkName: 'news | group-0 | card-@6',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -185,7 +199,7 @@ export const trails: [
},
dataLinkName: 'news | group-0 | card-@7',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -204,7 +218,7 @@ export const trails: [
},
dataLinkName: 'news | group-0 | card-@8',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -225,7 +239,7 @@ export const trails: [
'UK Covid live: England lockdown to be eased in stages, says PM, amid reports of nationwide mass testing',
dataLinkName: 'news | group-0 | card-@9',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -245,7 +259,7 @@ export const trails: [
'UK to infect up to 90 healthy volunteers with Covid in world first trial',
dataLinkName: 'news | group-0 | card-@10',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -265,7 +279,7 @@ export const trails: [
'Scottish government inadequately prepared for Covid, says watchdog',
dataLinkName: 'news | group-0 | card-@11',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -285,7 +299,7 @@ export const trails: [
'‘Encouraging’ signs for Covid vaccine as over-80s deaths fall in England',
dataLinkName: 'news | group-0 | card-@12',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -305,7 +319,7 @@ export const trails: [
'Contact tracing alone has little impact on curbing Covid spread, report finds',
dataLinkName: 'news | group-0 | card-@1',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -325,7 +339,7 @@ export const trails: [
'Ethnicity and poverty are Covid risk factors, new Oxford modelling tool shows',
dataLinkName: 'news | group-0 | card-@13',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -345,7 +359,7 @@ export const trails: [
'UK Covid: 799 more deaths and 10,625 new cases reported; Scottish schools in phased return from Monday – as it happened',
dataLinkName: 'news | group-0 | card-@14',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -365,7 +379,7 @@ export const trails: [
'QCovid: how improved algorithm can identify more higher-risk adults',
dataLinkName: 'news | group-0 | card-@1',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -383,7 +397,7 @@ export const trails: [
},
dataLinkName: 'news | group-0 | card-@15',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -402,7 +416,7 @@ export const trails: [
},
dataLinkName: 'news | group-0 | card-@16',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -421,7 +435,7 @@ export const trails: [
},
dataLinkName: 'news | group-0 | card-@17',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand All @@ -440,7 +454,7 @@ export const trails: [
},
dataLinkName: 'news | group-0 | card-@18',
showQuotedHeadline: false,
showMainVideo: false,
mainMedia: undefined,
isExternalLink: false,
showLivePlayable: false,
},
Expand Down
7 changes: 6 additions & 1 deletion dotcom-rendering/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,12 @@ interface FEKeyEventsRequest {
filterKeyEvents: boolean;
}

type CardImageType = 'mainMedia' | 'avatar' | 'crossword' | 'slideshow';
type CardImageType =
| 'picture'
| 'avatar'
| 'crossword'
| 'slideshow'
| 'video';

type SmallHeadlineSize =
| 'tiny'
Expand Down
1 change: 1 addition & 0 deletions dotcom-rendering/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ gen-schema:
@git add src/model/article-schema.json
@git add src/model/front-schema.json
@git add src/model/block-schema.json
@git add src/model/tag-front-schema.json
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Small refactors since #7752 introduced the new schema


check-stories:
$(call log, "Checking Storybook stories")
Expand Down
Loading