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

feat(TMRS-268): test addition of categoryPath #3907

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
48 changes: 22 additions & 26 deletions packages/article-list/src/article-list-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,32 +107,28 @@ const ArticleListItem = props => {

return (
<Context.Consumer>
{({ makeArticleUrl }) => {
const canonicalUrl = makeArticleUrl(props.article);

return (
<Link url={canonicalUrl}>
<ListItemWrapper>
<Card
contentContainerClass="articleListContent"
fadeImageIn={fadeImageIn}
highResSize={highResSize}
imageAccessibilityLabel={imageAccessibilityLabel}
imageContainerClass="articleListImage"
imageRatio={imageRatio}
imageUri={imageUri}
isLoading={isLoading}
lowResQuality={lowResQuality}
lowResSize={lowResSize}
showImage={showImage}
isLcpItem={index === 0}
>
<Animations.FadeIn>{children}</Animations.FadeIn>
</Card>
</ListItemWrapper>
</Link>
);
}}
{() => (
<Link url={props.article.url}>
<ListItemWrapper>
<Card
contentContainerClass="articleListContent"
fadeImageIn={fadeImageIn}
highResSize={highResSize}
imageAccessibilityLabel={imageAccessibilityLabel}
imageContainerClass="articleListImage"
imageRatio={imageRatio}
imageUri={imageUri}
isLoading={isLoading}
lowResQuality={lowResQuality}
lowResSize={lowResSize}
showImage={showImage}
isLcpItem={index === 0}
>
<Animations.FadeIn>{children}</Animations.FadeIn>
</Card>
</ListItemWrapper>
</Link>
)}
</Context.Consumer>
);
};
Expand Down
2 changes: 1 addition & 1 deletion packages/provider-queries/src/article_props.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ fragment articleProps on Article {
shortHeadline
shortIdentifier
slug
url
url: categoryPath
}
2 changes: 1 addition & 1 deletion packages/provider-queries/src/article_web.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ fragment articleProps on Article {
shortHeadline
seoDescription
slug
url
url: categoryPath
}

fragment relatedProps on Tile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ query ArticleListQuery(
headline
shortHeadline
shortSummary: summary(maxCharCount: $shortSummaryLength)
url
url: categoryPath
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ query ArticleListQuery(
publishedTime
shortHeadline
summary(maxCharCount: 145)
url
url: categoryPath
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/provider-queries/src/draft_article.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ fragment draftArticleProps on DraftArticle {
shortIdentifier
shortHeadline
slug
url
url: categoryPath
}

fragment relatedProps on DraftTile {
Expand Down
2 changes: 1 addition & 1 deletion packages/provider-queries/src/topic_articles.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ query TopicArticlesQuery(
section
shortHeadline
summary(maxCharCount: 115)
url
url: categoryPath
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Object {
"name": "paragraph",
},
],
"url": "http://cps-render-ci.elb.tnl-dev.ntch.co.uk/article/tms-pratchetts-law-of-the-jungle-xgqrcw779",
"url": "Hello World",
},
"leadAsset": Object {
"__typename": "Image",
Expand Down Expand Up @@ -192,7 +192,7 @@ Object {
"name": "paragraph",
},
],
"url": "http://cps-render-ci.elb.tnl-dev.ntch.co.uk/article/rise-of-centenarian-drivers-as-elderly-push-on-6gb0bjnpz",
"url": "Hello World",
},
"leadAsset": Object {
"__typename": "Image",
Expand Down Expand Up @@ -282,7 +282,7 @@ Object {
"name": "paragraph",
},
],
"url": "http://cps-render-ci.elb.tnl-dev.ntch.co.uk/article/at-long-last-a-burial-place-fit-for-a-king-25l88wl2k",
"url": "Hello World",
},
"leadAsset": Object {
"__typename": "Image",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ Object {
},
],
"updatedTime": "2018-10-25",
"url": "http://cps-render-ci.elb.tnl-dev.ntch.co.uk/article/tms-pratchetts-law-of-the-jungle-xgqrcw779",
"url": "Hello World",
},
"leadAsset": Object {
"__typename": "Image",
Expand Down Expand Up @@ -1055,6 +1055,6 @@ Object {
},
],
"updatedTime": "2022-02-24T09:00:00.000Z",
"url": "https://www.thetimes.co.uk/edition/news/france-defies-may-over-russia-37b27qd2s",
"url": "Hello World",
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Object {
"shortIdentifier": "968n7tdck1",
"slug": "this-is-slug-1",
"summary": Array [],
"url": "https://url.io",
"url": "Hello World",
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Object {
"shortIdentifier": "968n7tdck1",
"slug": "this-is-slug-1",
"summary": Array [],
"url": "https://url.io",
"url": "Hello World",
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Object {
"shortIdentifier": "968n7tdck1",
"shortSummary": Array [],
"slug": "this-is-slug-1",
"url": "https://url.io",
"url": "Hello World",
},
],
},
Expand Down