Skip to content

Commit a54742c

Browse files
committed
use fixture trails for more galleries story
1 parent 464aa26 commit a54742c

File tree

5 files changed

+9
-195
lines changed

5 files changed

+9
-195
lines changed

dotcom-rendering/fixtures/generated/story-package.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const storyPackage: FEStoryPackage = {
3838
theme: 'NewsPillar',
3939
display: 'StandardDisplay',
4040
},
41-
webPublicationDate: '2025-03-24T19:00:47.000Z',
41+
webPublicationDate: '2022-01-01T11:00:47.000Z',
4242
headline:
4343
'Nasa rover discovers largest organic compounds yet found on Mars',
4444
shortUrl: 'https://www.theguardian.com/p/xxp8eq',
@@ -69,7 +69,7 @@ export const storyPackage: FEStoryPackage = {
6969
theme: 'NewsPillar',
7070
display: 'StandardDisplay',
7171
},
72-
webPublicationDate: '2025-03-13T11:56:49.000Z',
72+
webPublicationDate: '2022-01-01T11:56:49.000Z',
7373
headline: 'Passing probe captures images of mysterious Mars moon',
7474
shortUrl: 'https://www.theguardian.com/p/xxn2cq',
7575
discussion: {
@@ -100,7 +100,7 @@ export const storyPackage: FEStoryPackage = {
100100
theme: 'NewsPillar',
101101
display: 'StandardDisplay',
102102
},
103-
webPublicationDate: '2025-02-24T23:35:09.000Z',
103+
webPublicationDate: '2021-02-24T23:35:09.000Z',
104104
headline:
105105
'Mars once had an ocean with sandy beaches, researchers say',
106106
shortUrl: 'https://www.theguardian.com/p/xxjy3h',
@@ -132,7 +132,7 @@ export const storyPackage: FEStoryPackage = {
132132
theme: 'NewsPillar',
133133
display: 'StandardDisplay',
134134
},
135-
webPublicationDate: '2025-03-07T02:59:44.000Z',
135+
webPublicationDate: '2021-03-01T02:59:44.000Z',
136136
headline:
137137
'SpaceX’s Starship explodes in second failure for Musk’s Mars program',
138138
shortUrl: 'https://www.theguardian.com/p/xxyyzx',
@@ -163,7 +163,7 @@ export const storyPackage: FEStoryPackage = {
163163
theme: 'NewsPillar',
164164
display: 'ImmersiveDisplay',
165165
},
166-
webPublicationDate: '2025-01-11T11:00:01.000Z',
166+
webPublicationDate: '2021-01-11T11:00:01.000Z',
167167
headline:
168168
'‘I think there is life there. Today’: the race to put a human on Mars – in pictures',
169169
shortUrl: 'https://www.theguardian.com/p/xx66cn',

dotcom-rendering/fixtures/manual/onwardsTrails.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const galleryOnwardsTrails: TrailType[] = [
132132
theme: Pillar.Lifestyle,
133133
display: ArticleDisplay.Standard,
134134
},
135-
webPublicationDate: '2022-08-22T05:00:23.000Z',
135+
webPublicationDate: '2022-01-01T05:00:23.000Z',
136136
headline: 'On parade: what to wear to Notting Hill carnival',
137137
shortUrl: 'https://www.theguardian.com/p/x32mte',
138138
discussion: {

dotcom-rendering/src/components/Card/components/ContentWrapper.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ export const ContentWrapper = ({
166166

167167
return (
168168
<div
169-
id="marjan"
170169
css={[
171170
sizingStyles,
172171
mediaDirectionDesktop === 'horizontal' &&

dotcom-rendering/src/components/FetchOnwardsData.importable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export const FetchOnwardsData = ({
127127
buildTrails(data.trails, limit, isAdFreeUser, webURL, withMasterImage);
128128

129129
return (
130-
<div id="marjan" ref={setIsInViewRef} css={minHeight(format.design)}>
130+
<div ref={setIsInViewRef} css={minHeight(format.design)}>
131131
{format.design === ArticleDesign.Gallery ? (
132132
<ScrollableSmallOnwards
133133
serverTime={serverTime}
Lines changed: 2 additions & 187 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { Meta, StoryObj } from '@storybook/react-webpack5';
2-
import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat';
3-
import { getDataLinkNameCard } from '../lib/getDataLinkName';
2+
import { galleryOnwardsTrails } from '../../fixtures/manual/onwardsTrails';
43
import { MoreGalleries as MoreGalleriesComponent } from './MoreGalleries';
54

65
const meta = {
@@ -16,190 +15,6 @@ export const MoreGalleries = {
1615
args: {
1716
discussionApiUrl: 'https://discussion.theguardian.com/discussion-api',
1817
guardianBaseUrl: 'https://www.theguardian.com',
19-
trails: [
20-
{
21-
url: 'https://www.theguardian.com/environment/gallery/2025/aug/22/week-in-wildlife-a-clumsy-fox-swinging-orangutang-and-rescued-jaguarundi-cub',
22-
linkText:
23-
'Week in wildlife: a clumsy fox, a swinging orangutan and a rescued jaguarundi cub',
24-
showByline: false,
25-
byline: 'Pejman Faratin',
26-
image: {
27-
src: 'https://media.guim.co.uk/a81e974ffee6c8c88fa280c2d02eaf5dc2af863e/151_292_1020_816/master/1020.jpg',
28-
altText: '',
29-
},
30-
format: {
31-
theme: Pillar.News,
32-
design: ArticleDesign.Gallery,
33-
display: ArticleDisplay.Standard,
34-
},
35-
webPublicationDate: '2025-08-22T06:00:25.000Z',
36-
headline:
37-
'Week in wildlife: a clumsy fox, a swinging orangutan and a rescued jaguarundi cub',
38-
shortUrl: 'https://www.theguardian.com/p/x32n89',
39-
discussion: {
40-
isCommentable: false,
41-
isClosedForComments: true,
42-
discussionId: '/p/x32n89',
43-
},
44-
dataLinkName: getDataLinkNameCard(
45-
{
46-
theme: Pillar.News,
47-
design: ArticleDesign.Gallery,
48-
display: ArticleDisplay.Standard,
49-
},
50-
'0',
51-
0,
52-
),
53-
trailText:
54-
'Guinness World Records is looking back at the extraordinary feats achieved since its inception - as well as unveiling 70 whacky and unclaimed records ',
55-
kickerText: 'Politics',
56-
mainMedia: { type: 'Gallery', count: '6' },
57-
},
58-
{
59-
url: 'https://www.theguardian.com/money/gallery/2025/aug/22/characterful-cottages-for-sale-in-england-in-pictures',
60-
linkText:
61-
'Characterful cottages for sale in England – in pictures',
62-
showByline: false,
63-
byline: 'Anna White',
64-
image: {
65-
src: 'https://media.guim.co.uk/58cd9356e6d68e8efa6028162bb959f9798307d5/515_0_5000_4000/master/5000.jpg',
66-
altText: '',
67-
},
68-
format: {
69-
design: ArticleDesign.Gallery,
70-
theme: Pillar.Lifestyle,
71-
display: ArticleDisplay.Standard,
72-
},
73-
webPublicationDate: '2025-08-22T06:00:24.000Z',
74-
headline:
75-
'Characterful cottages for sale in England – in pictures',
76-
shortUrl: 'https://www.theguardian.com/p/x32gqj',
77-
discussion: {
78-
isCommentable: false,
79-
isClosedForComments: true,
80-
discussionId: '/p/x32gqj',
81-
},
82-
dataLinkName: getDataLinkNameCard(
83-
{
84-
design: ArticleDesign.Gallery,
85-
theme: Pillar.Lifestyle,
86-
display: ArticleDisplay.Standard,
87-
},
88-
'0',
89-
1,
90-
),
91-
trailText:
92-
'Picked from a record 60,636 entries, the first images from the Natural History Museum’s wildlife photographer of the year competition have been released. The photographs, which range from a lion facing down a cobra to magnified mould spores, show the diversity, beauty and complexity of the natural world and humanity’s relationship with it',
93-
mainMedia: { type: 'Gallery', count: '6' },
94-
},
95-
{
96-
url: 'https://www.theguardian.com/news/gallery/2025/aug/22/sunsets-aid-parachutes-and-giant-pandas-photos-of-the-day-friday',
97-
linkText:
98-
'Sunsets, aid parachutes and giant pandas: photos of the day – Friday ',
99-
showByline: false,
100-
byline: 'Eithne Staunton',
101-
image: {
102-
src: 'https://media.guim.co.uk/4ce0b080206fe9b65b976c1acf219d81072cc814/0_0_2113_1690/master/2113.png',
103-
altText: '',
104-
},
105-
format: {
106-
design: ArticleDesign.Gallery,
107-
theme: Pillar.News,
108-
display: ArticleDisplay.Standard,
109-
},
110-
webPublicationDate: '2025-08-22T12:49:42.000Z',
111-
headline:
112-
'Sunsets, aid parachutes and giant pandas: photos of the day – Friday ',
113-
shortUrl: 'https://www.theguardian.com/p/x3359z',
114-
discussion: {
115-
isCommentable: false,
116-
isClosedForComments: true,
117-
discussionId: '/p/x3359z',
118-
},
119-
dataLinkName: getDataLinkNameCard(
120-
{
121-
design: ArticleDesign.Gallery,
122-
theme: Pillar.News,
123-
display: ArticleDisplay.Standard,
124-
},
125-
'0',
126-
2,
127-
),
128-
trailText:
129-
'From the mock-Tudor fad of the 1920s to drivers refuelling on a roundabout, each era produces its own distinctive petrol stations – as photographer Philip Butler discovered',
130-
mainMedia: { type: 'Gallery', count: '6' },
131-
},
132-
{
133-
url: 'https://www.theguardian.com/fashion/gallery/2025/aug/22/what-to-wear-to-notting-hill-carnival',
134-
linkText: 'On parade: what to wear to Notting Hill carnival',
135-
showByline: false,
136-
byline: 'Melanie Wilkinson',
137-
image: {
138-
src: 'https://media.guim.co.uk/49a9656cd10c4f64f8bdd54380afb915c7a3648b/207_0_1500_1200/master/1500.jpg',
139-
altText: '',
140-
},
141-
format: {
142-
design: ArticleDesign.Gallery,
143-
theme: Pillar.Lifestyle,
144-
display: ArticleDisplay.Standard,
145-
},
146-
webPublicationDate: '2025-08-22T05:00:23.000Z',
147-
headline: 'On parade: what to wear to Notting Hill carnival',
148-
shortUrl: 'https://www.theguardian.com/p/x32mte',
149-
discussion: {
150-
isCommentable: false,
151-
isClosedForComments: true,
152-
discussionId: '/p/x32mte',
153-
},
154-
dataLinkName: getDataLinkNameCard(
155-
{
156-
design: ArticleDesign.Gallery,
157-
theme: Pillar.Lifestyle,
158-
display: ArticleDisplay.Standard,
159-
},
160-
'0',
161-
1,
162-
),
163-
trailText:
164-
'The Guardian’s picture editors select photographs from around the world',
165-
mainMedia: { type: 'Gallery', count: '6' },
166-
},
167-
{
168-
url: 'https://www.theguardian.com/artanddesign/gallery/2025/aug/21/psychedelic-rock-glass-mountain-michael-lundgren',
169-
linkText:
170-
'Psychedelic rock! Formations that mess with your mind – in pictures ',
171-
showByline: false,
172-
image: {
173-
src: 'https://media.guim.co.uk/2810af61b2d2d2d5f71ec01e56e6555e0a6d4635/55_0_2813_2250/master/2813.jpg',
174-
altText: '',
175-
},
176-
format: {
177-
design: ArticleDesign.Gallery,
178-
theme: Pillar.Culture,
179-
display: ArticleDisplay.Standard,
180-
},
181-
webPublicationDate: '2025-08-21T06:01:01.000Z',
182-
headline:
183-
'Psychedelic rock! Formations that mess with your mind – in pictures ',
184-
shortUrl: 'https://www.theguardian.com/p/x2p663',
185-
discussion: {
186-
isCommentable: false,
187-
isClosedForComments: true,
188-
discussionId: '/p/x2p663',
189-
},
190-
dataLinkName: getDataLinkNameCard(
191-
{
192-
design: ArticleDesign.Gallery,
193-
theme: Pillar.Culture,
194-
display: ArticleDisplay.Standard,
195-
},
196-
'0',
197-
1,
198-
),
199-
trailText:
200-
'Politicians and their partners put on their best show at this year’s Midwinter Ball, an annual dinner hosted by the Federal Parliamentary Press Gallery in Canberra',
201-
mainMedia: { type: 'Gallery', count: '6' },
202-
},
203-
],
18+
trails: galleryOnwardsTrails,
20419
},
20520
} satisfies Story;

0 commit comments

Comments
 (0)