Skip to content

Commit

Permalink
Better property name (displayType -> highlightTourType)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpmccormick committed Jan 9, 2025
1 parent f8d23b5 commit 727e9d1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
};

Expand Down
5 changes: 4 additions & 1 deletion pipeline/src/types/transformed/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 727e9d1

Please sign in to comment.