From 8233359bfd5ef5bf6a2002aa330c5a0564e8775e Mon Sep 17 00:00:00 2001 From: Raphaelle Cantin Date: Mon, 16 Dec 2024 11:09:58 +0000 Subject: [PATCH 1/2] Add explore more document link on stories --- common/customtypes/articles/index.json | 8 ++++++++ common/prismicio-types.d.ts | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/common/customtypes/articles/index.json b/common/customtypes/articles/index.json index b732e317d1..993b4bcfe1 100644 --- a/common/customtypes/articles/index.json +++ b/common/customtypes/articles/index.json @@ -176,6 +176,14 @@ } }, "Content relationships": { + "exploreMoreDocument": { + "type": "Link", + "config": { + "label": "\"Explore more\" document", + "select": "document", + "customtypes": ["articles", "exhibitions"] + } + }, "series": { "type": "Group", "fieldset": "Series", diff --git a/common/prismicio-types.d.ts b/common/prismicio-types.d.ts index 498dbf75e2..94080bd1e3 100644 --- a/common/prismicio-types.d.ts +++ b/common/prismicio-types.d.ts @@ -283,6 +283,19 @@ interface ArticlesDocumentData { * - **Documentation**: https://prismic.io/docs/field#rich-text-title */; metadataDescription: prismic.RichTextField /** + * "Explore more" document field in *Story* + * + * - **Field Type**: Content Relationship + * - **Placeholder**: *None* + * - **API ID Path**: articles.exploreMoreDocument + * - **Tab**: Content relationships + * - **Documentation**: https://prismic.io/docs/field#link-content-relationship + */; + exploreMoreDocument: prismic.ContentRelationshipField< + 'articles' | 'exhibitions' + >; + + /** * Series field in *Story* * * - **Field Type**: Group @@ -290,7 +303,7 @@ interface ArticlesDocumentData { * - **API ID Path**: articles.series[] * - **Tab**: Content relationships * - **Documentation**: https://prismic.io/docs/field#group - */; + */ series: prismic.GroupField>; /** From 32d8e4efef836fe96135e92b287dd34bac7608ce Mon Sep 17 00:00:00 2001 From: Raphaelle Cantin Date: Mon, 16 Dec 2024 11:21:35 +0000 Subject: [PATCH 2/2] Add missing field in mock story --- playwright/test/mocks/one-schedule-item.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/playwright/test/mocks/one-schedule-item.ts b/playwright/test/mocks/one-schedule-item.ts index 00df6563e0..cdc2b67b97 100644 --- a/playwright/test/mocks/one-schedule-item.ts +++ b/playwright/test/mocks/one-schedule-item.ts @@ -343,6 +343,7 @@ export const oneScheduleItem: prismic.Query = { }, }, ], + exploreMoreDocument: { link_type: 'Document' }, seasons: [ { season: {