Skip to content

Commit 8a6a9d9

Browse files
authored
Merge pull request #14166 from guardian/revert-14160-football-nav-atom-for-euros
Revert "Football nav atom for women's euros 2025"
2 parents 3ad6480 + 5bd44f7 commit 8a6a9d9

15 files changed

+78
-204
lines changed

dotcom-rendering/fixtures/manual/footballData.ts

Lines changed: 0 additions & 7 deletions
Large diffs are not rendered by default.

dotcom-rendering/src/components/FootballMatchesPage.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
until,
77
} from '@guardian/source/foundations';
88
import type { FootballMatches } from '../footballMatches';
9-
import type { FootballNavAtom as FootballNavAtomModel } from '../footballNavAtom';
109
import { grid } from '../grid';
1110
import type { EditionId } from '../lib/edition';
1211
import type { Result } from '../lib/result';
@@ -15,7 +14,6 @@ import type { FootballMatchListPageKind, Region } from '../sportDataPage';
1514
import { AdSlot } from './AdSlot.web';
1615
import { FootballCompetitionSelect } from './FootballCompetitionSelect';
1716
import { FootballMatchList } from './FootballMatchList';
18-
import { FootballNavAtom } from './FootballNavAtom';
1917

2018
type Props = {
2119
regions: Region[];
@@ -29,7 +27,6 @@ type Props = {
2927
renderAds: boolean;
3028
pageId: string;
3129
now: string;
32-
navAtom?: FootballNavAtomModel;
3330
};
3431

3532
const createTitle = (kind: FootballMatchListPageKind, edition: EditionId) => {
@@ -59,7 +56,6 @@ export const FootballMatchesPage = ({
5956
getMoreDays,
6057
renderAds,
6158
pageId,
62-
navAtom,
6359
}: Props) => (
6460
<main
6561
id="maincontent"
@@ -85,13 +81,12 @@ export const FootballMatchesPage = ({
8581
padding-bottom: ${space[9]}px;
8682
`}
8783
>
88-
<FootballNavAtom navAtom={navAtom} />
8984
<h1
9085
css={css`
9186
${headlineBold20}
9287
padding: ${space[2]}px 0 ${space[3]}px;
9388
${grid.column.centre}
94-
grid-row: ${navAtom !== undefined ? 2 : 1};
89+
grid-row: 1;
9590
${from.leftCol} {
9691
${grid.between('left-column-start', 'centre-column-end')}
9792
}
@@ -105,7 +100,7 @@ export const FootballMatchesPage = ({
105100
margin-top: ${space[3]}px;
106101
margin-bottom: ${space[6]}px;
107102
${grid.column.centre}
108-
grid-row: ${navAtom !== undefined ? 3 : 2};
103+
grid-row: 2;
109104
`}
110105
>
111106
<FootballCompetitionSelect
@@ -119,7 +114,7 @@ export const FootballMatchesPage = ({
119114
<div
120115
css={css`
121116
${grid.column.centre}
122-
grid-row: ${navAtom !== undefined ? 4 : 3};
117+
grid-row: 3;
123118
${from.leftCol} {
124119
${grid.between('left-column-start', 'centre-column-end')}
125120
}
@@ -142,7 +137,6 @@ export const FootballMatchesPage = ({
142137
${grid.column.right}
143138
/** This allows the ad to grow beyond the third row content (up to line 5) */
144139
grid-row: 1 / 5;
145-
grid-row: ${navAtom !== undefined ? '2 / 6' : '1 / 5'};
146140
${until.desktop} {
147141
display: none;
148142
}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
getParserErrorMessage,
77
parse,
88
} from '../footballMatches';
9-
import type { FootballNavAtom as FootballNavAtomModel } from '../footballNavAtom';
109
import type { FEFootballMatchListPage } from '../frontend/feFootballMatchListPage';
1110
import type { EditionId } from '../lib/edition';
1211
import type { Result } from '../lib/result';
@@ -73,7 +72,6 @@ type Props = {
7372
edition: EditionId;
7473
renderAds: boolean;
7574
pageId: string;
76-
navAtom?: FootballNavAtomModel;
7775
};
7876

7977
export const FootballMatchesPageWrapper = ({
@@ -88,7 +86,6 @@ export const FootballMatchesPageWrapper = ({
8886
edition,
8987
renderAds,
9088
pageId,
91-
navAtom,
9289
}: Props) => {
9390
const [nextPage, setNextPage] = useState(secondPage);
9491

@@ -111,7 +108,6 @@ export const FootballMatchesPageWrapper = ({
111108
}
112109
renderAds={renderAds}
113110
pageId={pageId}
114-
navAtom={navAtom}
115111
/>
116112
);
117113
};

dotcom-rendering/src/components/FootballNavAtom.tsx

Lines changed: 0 additions & 31 deletions
This file was deleted.

dotcom-rendering/src/components/FootballTablesPage.stories.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Meta, StoryObj } from '@storybook/react/*';
2-
import { euro2025Atom, regions } from '../../fixtures/manual/footballData';
2+
import { regions } from '../../fixtures/manual/footballData';
33
import { FootballTableList as TableListDefault } from './FootballTableList.stories';
44
import { FootballTablesPage as FootballTablesPageComponent } from './FootballTablesPage';
55

@@ -21,10 +21,3 @@ export const FootballTablesPage = {
2121
guardianBaseUrl: 'https://www.theguardian.com',
2222
},
2323
} satisfies Story;
24-
25-
export const FootballTablesPageWithAtom = {
26-
args: {
27-
...FootballTablesPage.args,
28-
navAtom: euro2025Atom,
29-
},
30-
} satisfies Story;
Lines changed: 74 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
import { css } from '@emotion/react';
2-
import { isUndefined } from '@guardian/libs';
32
import {
43
from,
54
headlineBold20,
65
space,
76
until,
87
} from '@guardian/source/foundations';
9-
import type { FootballNavAtom as FootballNavAtomModel } from '../footballNavAtom';
108
import type { FootballTableCompetition } from '../footballTables';
119
import { grid } from '../grid';
1210
import { palette } from '../palette';
1311
import type { Region } from '../sportDataPage';
1412
import { AdSlot } from './AdSlot.web';
15-
import { FootballNavAtom } from './FootballNavAtom';
1613
import { FootballTableList } from './FootballTableList';
1714
import { FootballTablesCompetitionSelect } from './FootballTablesCompetitionSelect.importable';
1815
import { Island } from './Island';
@@ -23,7 +20,6 @@ type Props = {
2320
tableCompetitions: FootballTableCompetition[];
2421
renderAds: boolean;
2522
guardianBaseUrl: string;
26-
navAtom?: FootballNavAtomModel;
2723
};
2824

2925
export const FootballTablesPage = ({
@@ -32,99 +28,88 @@ export const FootballTablesPage = ({
3228
tableCompetitions: competitions,
3329
renderAds,
3430
guardianBaseUrl,
35-
navAtom,
36-
}: Props) => {
37-
const navAtomIsDefined = !isUndefined(navAtom);
38-
return (
39-
<main
40-
id="maincontent"
41-
data-layout="FootballDataPageLayout"
42-
css={css`
43-
${grid.paddedContainer}
44-
position: relative;
45-
${from.tablet} {
46-
&::before,
47-
&::after {
48-
content: '';
49-
position: absolute;
50-
border-left: 1px solid ${palette('--article-border')};
51-
top: 0;
52-
bottom: 0;
53-
}
31+
}: Props) => (
32+
<main
33+
id="maincontent"
34+
data-layout="FootballDataPageLayout"
35+
css={css`
36+
${grid.paddedContainer}
37+
position: relative;
38+
${from.tablet} {
39+
&::before,
40+
&::after {
41+
content: '';
42+
position: absolute;
43+
border-left: 1px solid ${palette('--article-border')};
44+
top: 0;
45+
bottom: 0;
46+
}
5447
55-
&::after {
56-
right: 0;
57-
}
48+
&::after {
49+
right: 0;
5850
}
51+
}
5952
60-
padding-bottom: ${space[9]}px;
53+
padding-bottom: ${space[9]}px;
54+
`}
55+
>
56+
<h1
57+
css={css`
58+
${headlineBold20}
59+
padding: ${space[2]}px 0 ${space[3]}px;
60+
${grid.column.centre}
61+
grid-row: 1;
62+
${from.leftCol} {
63+
${grid.between('left-column-start', 'centre-column-end')}
64+
}
6165
`}
6266
>
63-
<FootballNavAtom navAtom={navAtom} />
64-
<h1
65-
css={css`
66-
${headlineBold20}
67-
padding: ${space[2]}px 0 ${space[3]}px;
68-
${grid.column.centre}
69-
grid-row: ${navAtomIsDefined ? 2 : 1};
70-
${from.leftCol} {
71-
${grid.between(
72-
'left-column-start',
73-
'centre-column-end',
74-
)}
75-
}
76-
`}
77-
>
78-
Football tables
79-
</h1>
80-
<div
81-
css={css`
82-
margin-top: ${space[3]}px;
83-
margin-bottom: ${space[6]}px;
84-
${grid.column.centre}
85-
grid-row: ${navAtomIsDefined ? 3 : 2};
86-
`}
87-
>
88-
<Island priority="feature" defer={{ until: 'visible' }}>
89-
<FootballTablesCompetitionSelect
90-
regions={regions}
91-
pageId={pageId}
92-
guardianBaseUrl={guardianBaseUrl}
93-
/>
94-
</Island>
95-
</div>
67+
Football tables
68+
</h1>
69+
<div
70+
css={css`
71+
margin-top: ${space[3]}px;
72+
margin-bottom: ${space[6]}px;
73+
${grid.column.centre}
74+
grid-row: 2;
75+
`}
76+
>
77+
<Island priority="feature" defer={{ until: 'visible' }}>
78+
<FootballTablesCompetitionSelect
79+
regions={regions}
80+
pageId={pageId}
81+
guardianBaseUrl={guardianBaseUrl}
82+
/>
83+
</Island>
84+
</div>
85+
<div
86+
css={css`
87+
${grid.column.centre}
88+
grid-row: 3;
89+
${from.leftCol} {
90+
${grid.between('left-column-start', 'centre-column-end')}
91+
}
92+
position: relative;
93+
`}
94+
>
95+
<FootballTableList
96+
competitions={competitions}
97+
guardianBaseUrl={guardianBaseUrl}
98+
/>
99+
</div>
100+
{renderAds && (
96101
<div
97102
css={css`
98-
${grid.column.centre}
99-
grid-row: ${navAtomIsDefined ? 4 : 3};
100-
${from.leftCol} {
101-
${grid.between(
102-
'left-column-start',
103-
'centre-column-end',
104-
)}
103+
${grid.column.right}
104+
/** This allows the ad to grow beyond the third row content (up to line 5) */
105+
grid-row: 1 / 4;
106+
${until.desktop} {
107+
display: none;
105108
}
106-
position: relative;
107109
`}
108110
>
109-
<FootballTableList
110-
competitions={competitions}
111-
guardianBaseUrl={guardianBaseUrl}
112-
/>
111+
<AdSlot position="football-right" />
113112
</div>
114-
{renderAds && (
115-
<div
116-
css={css`
117-
${grid.column.right}
118-
/** This allows the ad to grow beyond the third row content (up to line 5) */
119-
grid-row: ${navAtomIsDefined ? '2 / 5' : '1 / 4'};
120-
${until.desktop} {
121-
display: none;
122-
}
123-
`}
124-
>
125-
<AdSlot position="football-right" />
126-
</div>
127-
)}
128-
</main>
129-
);
130-
};
113+
)}
114+
</main>
115+
);

dotcom-rendering/src/footballNavAtom.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

dotcom-rendering/src/frontend/feFootballMatchListPage.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type {
44
FEFootballDataPage,
55
FERound,
66
} from './feFootballDataPage';
7-
import type { FEFootballNavAtom } from './feFootballNavAtom';
87

98
type FEStage = {
109
stageNumber: string;
@@ -96,5 +95,4 @@ export type FEFootballMatchListPage = FEFootballDataPage & {
9695
nextPage?: string;
9796
nextPageNoJs?: string;
9897
previousPage?: string;
99-
atom?: FEFootballNavAtom;
10098
};

dotcom-rendering/src/frontend/feFootballNavAtom.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

dotcom-rendering/src/frontend/feFootballTablesPage.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type {
44
FEFootballDataPage,
55
FERound,
66
} from './feFootballDataPage';
7-
import type { FEFootballNavAtom } from './feFootballNavAtom';
87

98
type FELeagueStats = {
109
played: number;
@@ -65,5 +64,4 @@ export type FEFootballTable = {
6564
export type FEFootballTablesPage = FEFootballDataPage & {
6665
filters: Record<string, FEFootballCompetition[]>;
6766
tables: FEFootballTable[];
68-
atom?: FEFootballNavAtom;
6967
};

0 commit comments

Comments
 (0)