Skip to content
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
3 changes: 3 additions & 0 deletions dotcom-rendering/src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ export type Props = {
headlinePosition?: 'inner' | 'outer';
starRatingSize?: RatingSizeType;
contentSpacing?: 'small' | 'large';
headlineTestUuid?: string;
};

const waveformWrapper = (
Expand Down Expand Up @@ -410,6 +411,7 @@ export const Card = ({
starRatingSize = 'small',
articleMedia,
contentSpacing,
headlineTestUuid,
}: Props) => {
const ab = useAB();
const isInLoopClickTestControl = Boolean(
Expand Down Expand Up @@ -830,6 +832,7 @@ export const Card = ({
isExternalLink={isExternalLink}
isLoopAndInLoopClickTest={isLoopAndInLoopClickTest}
shouldRaiseZIndexForAbTest={false} // The z-index is raised in a new CardLink in the SelfHostedVideo island.
headlineTestUuid={headlineTestUuid}
/>
{headlinePosition === 'outer' && (
<div
Expand Down
10 changes: 10 additions & 0 deletions dotcom-rendering/src/components/Card/components/CardLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,21 @@ type Props = {
* Refers to the AB test with name: fronts-and-curation-loop-click-through
*/
shouldRaiseZIndexForAbTest: boolean;
headlineTestUuid?: string;
};

const InternalLink = ({
linkTo,
headlineText,
dataLinkName,
shouldRaiseZIndexForAbTest,
headlineTestUuid,
}: {
linkTo: string;
headlineText: string;
dataLinkName?: string;
shouldRaiseZIndexForAbTest: boolean;
headlineTestUuid?: string;
}) => {
return (
<a
Expand All @@ -54,6 +57,7 @@ const InternalLink = ({
shouldRaiseZIndexForAbTest ? abTestZIndexStyles : zIndexStyles,
]}
data-link-name={dataLinkName}
data-fronts-test-uuid={headlineTestUuid}
aria-label={headlineText}
/>
);
Expand All @@ -64,11 +68,13 @@ const ExternalLink = ({
headlineText,
dataLinkName,
shouldRaiseZIndexForAbTest,
headlineTestUuid,
}: {
linkTo: string;
headlineText: string;
dataLinkName?: string;
shouldRaiseZIndexForAbTest: boolean;
headlineTestUuid?: string;
}) => {
return (
<a
Expand All @@ -78,6 +84,7 @@ const ExternalLink = ({
shouldRaiseZIndexForAbTest ? abTestZIndexStyles : zIndexStyles,
]}
data-link-name={dataLinkName}
data-fronts-test-uuid={headlineTestUuid}
aria-label={headlineText + ' (opens in new tab)'}
target="_blank"
rel="noreferrer"
Expand All @@ -92,6 +99,7 @@ export const CardLink = ({
isExternalLink,
isLoopAndInLoopClickTest,
shouldRaiseZIndexForAbTest,
headlineTestUuid,
}: Props) => {
/**
* If we are in the loop click through test, we add a unique string to the data link name
Expand All @@ -109,6 +117,7 @@ export const CardLink = ({
headlineText={headlineText}
dataLinkName={clickThroughLinkName}
shouldRaiseZIndexForAbTest={shouldRaiseZIndexForAbTest}
headlineTestUuid={headlineTestUuid}
/>
)}
{!isExternalLink && (
Expand All @@ -117,6 +126,7 @@ export const CardLink = ({
headlineText={headlineText}
dataLinkName={clickThroughLinkName}
shouldRaiseZIndexForAbTest={shouldRaiseZIndexForAbTest}
headlineTestUuid={headlineTestUuid}
/>
)}
</>
Expand Down
6 changes: 6 additions & 0 deletions dotcom-rendering/src/components/FeatureCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ export type Props = {
*/
isImmersive?: boolean;
starRatingSize: RatingSizeType;
headlineTestUuid?: string;
};

export const FeatureCard = ({
Expand Down Expand Up @@ -445,6 +446,7 @@ export const FeatureCard = ({
isImmersive = false,
starRatingSize,
articleMedia,
headlineTestUuid,
}: Props) => {
const ab = useAB();
const isInLoopClickTestControl = Boolean(
Expand Down Expand Up @@ -546,6 +548,7 @@ export const FeatureCard = ({
shouldRaiseZIndexForAbTest={
isLoopAndInLoopClickTestVariant
}
headlineTestUuid={headlineTestUuid}
/>
)}
<div css={contentStyles}>
Expand Down Expand Up @@ -769,6 +772,9 @@ export const FeatureCard = ({
shouldRaiseZIndexForAbTest={
isLoopAndInLoopClickTestVariant
}
headlineTestUuid={
headlineTestUuid
}
/>
)}

Expand Down
1 change: 1 addition & 0 deletions dotcom-rendering/src/components/FlexibleGeneral.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const ImmersiveCardLayout = ({
isImmersive={true}
starRatingSize="medium"
articleMedia={card.articleMedia}
headlineTestUuid={card.headlineTestUuid}
/>
</LI>
</UL>
Expand Down
1 change: 1 addition & 0 deletions dotcom-rendering/src/components/FrontCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const FrontCard = (props: Props) => {
starRating: trail.starRating,
uniqueId: trail.uniqueId,
webPublicationDate: trail.webPublicationDate,
headlineTestUuid: trail.headlineTestUuid,
};

return Card({ ...defaultProps, ...cardProps });
Expand Down
3 changes: 3 additions & 0 deletions dotcom-rendering/src/components/Masthead/HighlightsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export type HighlightsCardProps = {
byline?: string;
isExternalLink: boolean;
starRating?: Rating;
headlineTestUuid?: string;
};

const container = css`
Expand Down Expand Up @@ -135,6 +136,7 @@ export const HighlightsCard = ({
isExternalLink,
starRating,
articleMedia,
headlineTestUuid,
}: HighlightsCardProps) => {
const isMediaCard = isMedia(format);

Expand All @@ -154,6 +156,7 @@ export const HighlightsCard = ({
isExternalLink={isExternalLink}
isLoopAndInLoopClickTest={false}
shouldRaiseZIndexForAbTest={false}
headlineTestUuid={headlineTestUuid}
/>

<div css={[content, shouldJustifyContent && spaceBetween]}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const ScrollableFeature = ({
showQuotes={card.showQuotedHeadline}
starRatingSize={'small'}
articleMedia={card.articleMedia}
headlineTestUuid={card.headlineTestUuid}
/>
</ScrollableCarousel.Item>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ export const ScrollableHighlights = ({ trails, frontId }: Props) => {
mainMedia={trail.mainMedia}
starRating={trail.starRating}
articleMedia={trail.articleMedia}
headlineTestUuid={trail.headlineTestUuid}
/>
)}
</li>
Expand Down
1 change: 1 addition & 0 deletions dotcom-rendering/src/components/StaticFeatureTwo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export const StaticFeatureTwo = ({
showQuotes={card.showQuotedHeadline}
starRatingSize={'medium'}
articleMedia={card.articleMedia}
headlineTestUuid={card.headlineTestUuid}
/>
</LI>
);
Expand Down
1 change: 1 addition & 0 deletions dotcom-rendering/src/components/SupportingContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export const SupportingContent = ({
: verticalSublinkStyles,
]}
data-link-name={`sublinks | ${index + 1}`}
data-fronts-test-uuid={subLink.headlineTestUuid}
>
<FormatBoundary format={subLinkFormat}>
<ContainerOverrides
Expand Down
Loading
Loading