From 8fe38dd6bc1236754ec7b7b32ed876d91e527c76 Mon Sep 17 00:00:00 2001 From: davidpmccormick Date: Wed, 8 Jan 2025 16:36:22 +0000 Subject: [PATCH 1/3] Add displayType to exhibition highlight tours --- .../src/transformers/addressables/exhibitionHighlightTour.ts | 4 ++-- .../test/transformers/__snapshots__/addressables.test.ts.snap | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pipeline/src/transformers/addressables/exhibitionHighlightTour.ts b/pipeline/src/transformers/addressables/exhibitionHighlightTour.ts index 0a987c3a..e313f257 100644 --- a/pipeline/src/transformers/addressables/exhibitionHighlightTour.ts +++ b/pipeline/src/transformers/addressables/exhibitionHighlightTour.ts @@ -68,14 +68,14 @@ export const transformAddressableExhibitionHighlightTour = ( const audio = { ...shared, id: `${id}/${type}/audio`, - display: { ...shared.display, title: audioTitle }, + display: { ...shared.display, displayType: 'audio', title: audioTitle }, query: { ...shared.query, title: audioTitle, body: audioBody }, }; const bsl = { ...shared, id: `${id}/${type}/bsl`, - display: { ...shared.display, title: bslTitle }, + display: { ...shared.display, displayType: 'bsl', title: bslTitle }, query: { ...shared.query, title: bslTitle, body: bslBody }, }; diff --git a/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap b/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap index bae978fc..968c58fa 100644 --- a/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap +++ b/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap @@ -120,6 +120,7 @@ exports[`addressables transformer transforms exhibition highlight tours from Pri { "display": { "description": "Showcasing Jason Wilsher-Mills’ largest and most personal commission to date, this exhibition is a joyful exploration of the body, drawing on the artist’s experience of becoming disabled as a child.", + "displayType": "audio", "id": "ZthrZRIAACQALvCC", "title": "Jason and the Adventure of 254 audio highlight tour", "type": "Exhibition highlight tour", @@ -239,6 +240,7 @@ exports[`addressables transformer transforms exhibition highlight tours from Pri { "display": { "description": "Showcasing Jason Wilsher-Mills’ largest and most personal commission to date, this exhibition is a joyful exploration of the body, drawing on the artist’s experience of becoming disabled as a child.", + "displayType": "bsl", "id": "ZthrZRIAACQALvCC", "title": "Jason and the Adventure of 254 British Sign Language tour", "type": "Exhibition highlight tour", From f8d23b51db41cbd736eeee3c3bfd67007d7f980d Mon Sep 17 00:00:00 2001 From: davidpmccormick Date: Thu, 9 Jan 2025 11:29:06 +0000 Subject: [PATCH 2/3] Fall back to promo caption if there's no intro text for exhibition highlight tours --- .../src/transformers/addressables/exhibitionHighlightTour.ts | 2 +- .../test/transformers/__snapshots__/addressables.test.ts.snap | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pipeline/src/transformers/addressables/exhibitionHighlightTour.ts b/pipeline/src/transformers/addressables/exhibitionHighlightTour.ts index e313f257..db2bafb5 100644 --- a/pipeline/src/transformers/addressables/exhibitionHighlightTour.ts +++ b/pipeline/src/transformers/addressables/exhibitionHighlightTour.ts @@ -61,7 +61,7 @@ export const transformAddressableExhibitionHighlightTour = ( }, query: { type: 'Exhibition highlight tour' as const, - description: introText, + description, }, }; diff --git a/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap b/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap index 968c58fa..a54770c9 100644 --- a/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap +++ b/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap @@ -231,7 +231,7 @@ exports[`addressables transformer transforms exhibition highlight tours from Pri "On the canvas I’m working on, there’s a ‘pin-up’ of a scantily clad young woman in high heels. She’s sitting on the closed lid of a toilet, kicking out a leg with a calliper. This ties in with those feelings I had as a young lad, trying to deal with both my disability and the onset of puberty. It was such a complete mystery to me, as it was happening to a body which I couldn’t feel or experience.", "This is the end of the last stop of the audio guide. You are now close to the main entrance where we started. Please note that this is also an exit, so there will be visitors moving in both directions. You are of course free to stay and explore. There is an alternative exit via the lobby in the corner, which takes you down a spiral staircase. In the lobby there is a filmed interview with Jason and replicas of his sketchbooks which can be touched.", ], - "description": undefined, + "description": "Showcasing Jason Wilsher-Mills’ largest and most personal commission to date, this exhibition is a joyful exploration of the body, drawing on the artist’s experience of becoming disabled as a child.", "title": "Jason and the Adventure of 254 audio highlight tour", "type": "Exhibition highlight tour", }, @@ -351,7 +351,7 @@ exports[`addressables transformer transforms exhibition highlight tours from Pri "On the canvas I’m working on, there’s a ‘pin-up’ of a scantily clad young woman in high heels. She’s sitting on the closed lid of a toilet, kicking out a leg with a calliper. This ties in with those feelings I had as a young lad, trying to deal with both my disability and the onset of puberty. It was such a complete mystery to me, as it was happening to a body which I couldn’t feel or experience.", "This is the end of the last stop of the audio guide. You are now close to the main entrance where we started. Please note that this is also an exit, so there will be visitors moving in both directions. You are of course free to stay and explore. There is an alternative exit via the lobby in the corner, which takes you down a spiral staircase. In the lobby there is a filmed interview with Jason and replicas of his sketchbooks which can be touched.", ], - "description": undefined, + "description": "Showcasing Jason Wilsher-Mills’ largest and most personal commission to date, this exhibition is a joyful exploration of the body, drawing on the artist’s experience of becoming disabled as a child.", "title": "Jason and the Adventure of 254 British Sign Language tour", "type": "Exhibition highlight tour", }, From 727e9d17220cdfdd1ffa89103933d6eef2e22377 Mon Sep 17 00:00:00 2001 From: davidpmccormick Date: Thu, 9 Jan 2025 11:33:42 +0000 Subject: [PATCH 3/3] Better property name (displayType -> highlightTourType) --- .../transformers/addressables/exhibitionHighlightTour.ts | 8 ++++++-- pipeline/src/types/transformed/index.ts | 5 ++++- .../transformers/__snapshots__/addressables.test.ts.snap | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pipeline/src/transformers/addressables/exhibitionHighlightTour.ts b/pipeline/src/transformers/addressables/exhibitionHighlightTour.ts index db2bafb5..125dba6c 100644 --- a/pipeline/src/transformers/addressables/exhibitionHighlightTour.ts +++ b/pipeline/src/transformers/addressables/exhibitionHighlightTour.ts @@ -68,14 +68,18 @@ export const transformAddressableExhibitionHighlightTour = ( const audio = { ...shared, id: `${id}/${type}/audio`, - display: { ...shared.display, displayType: 'audio', title: audioTitle }, + display: { + ...shared.display, + highlightTourType: 'audio', + title: audioTitle, + }, query: { ...shared.query, title: audioTitle, body: audioBody }, }; const bsl = { ...shared, id: `${id}/${type}/bsl`, - display: { ...shared.display, displayType: 'bsl', title: bslTitle }, + display: { ...shared.display, highlightTourType: 'bsl', title: bslTitle }, query: { ...shared.query, title: bslTitle, body: bslBody }, }; diff --git a/pipeline/src/types/transformed/index.ts b/pipeline/src/types/transformed/index.ts index e02cdc30..33d30e33 100644 --- a/pipeline/src/types/transformed/index.ts +++ b/pipeline/src/types/transformed/index.ts @@ -120,7 +120,10 @@ export type ElasticsearchAddressableExhibition = ElasticsearchAddressable<'Exhibition'>; export type ElasticsearchAddressableExhibitionHighlightTour = - ElasticsearchAddressable<'Exhibition highlight tour'>; + ElasticsearchAddressable< + 'Exhibition highlight tour', + { highlightTourType: string } + >; export type ElasticsearchAddressableExhibitionText = ElasticsearchAddressable<'Exhibition text'>; diff --git a/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap b/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap index a54770c9..e00c1398 100644 --- a/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap +++ b/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap @@ -120,7 +120,7 @@ exports[`addressables transformer transforms exhibition highlight tours from Pri { "display": { "description": "Showcasing Jason Wilsher-Mills’ largest and most personal commission to date, this exhibition is a joyful exploration of the body, drawing on the artist’s experience of becoming disabled as a child.", - "displayType": "audio", + "highlightTourType": "audio", "id": "ZthrZRIAACQALvCC", "title": "Jason and the Adventure of 254 audio highlight tour", "type": "Exhibition highlight tour", @@ -240,7 +240,7 @@ exports[`addressables transformer transforms exhibition highlight tours from Pri { "display": { "description": "Showcasing Jason Wilsher-Mills’ largest and most personal commission to date, this exhibition is a joyful exploration of the body, drawing on the artist’s experience of becoming disabled as a child.", - "displayType": "bsl", + "highlightTourType": "bsl", "id": "ZthrZRIAACQALvCC", "title": "Jason and the Adventure of 254 British Sign Language tour", "type": "Exhibition highlight tour",