Skip to content

Commit 4aca4f5

Browse files
committed
lint and gen schema
1 parent 94a378c commit 4aca4f5

File tree

9 files changed

+473
-150
lines changed

9 files changed

+473
-150
lines changed

dotcom-rendering/src/components/FlexibleGeneral.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -639,10 +639,6 @@ export const FlexibleGeneral = ({
639639
uniqueId: `collection-${collectionId}-splash-0`,
640640
}));
641641

642-
splash[0]?.headline.includes('Senate') &&
643-
containerLevel === 'Primary' &&
644-
console.dir({ groupedTrails }, { depth: null });
645-
646642
const cards = [...groupedTrails.standard]
647643
.slice(0, 19)
648644
.map((standard, i) => ({

dotcom-rendering/src/components/StorylineSection.tsx

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
textSans14,
77
until,
88
} from '@guardian/source/foundations';
9+
import { submitComponentEvent } from '../client/ophan/ophan';
910
import { type EditionId, isNetworkFront } from '../lib/edition';
1011
import { palette as schemePalette } from '../palette';
1112
import type { CollectionBranding } from '../types/branding';
@@ -14,13 +15,11 @@ import type {
1415
DCRContainerPalette,
1516
TreatType,
1617
} from '../types/front';
17-
import type { TagPagePagination } from '../types/tagPage';
1818
import { ContainerOverrides } from './ContainerOverrides';
1919
import { ContainerTitle } from './ContainerTitle';
20+
import { Footer } from './ExpandableAtom/Footer';
2021
import { FrontSectionTitle } from './FrontSectionTitle';
2122
import { ShowHideButton } from './ShowHideButton';
22-
import { Footer } from './ExpandableAtom/Footer';
23-
import { submitComponentEvent } from '../client/ophan/ophan';
2423

2524
type Props = {
2625
/** This text will be used as the h2 shown in the left column for the section */
@@ -31,7 +30,7 @@ type Props = {
3130
url?: string;
3231
/** The html `id` property of the element */
3332
sectionId?: string;
34-
collectionId?: string;
33+
// collectionId?: string;
3534
pageId?: string;
3635
/** Defaults to `true`. If we should render the top border */
3736
showTopBorder?: boolean;
@@ -55,10 +54,6 @@ type Props = {
5554
* If used, this can be either "Primary" or "Secondary", both of which have different styles */
5655
containerLevel?: DCRContainerLevel;
5756
/** Fronts containers spacing rules vary depending on the size of their container spacing which is derived from if the next container is a primary or secondary. */
58-
isNextCollectionPrimary?: boolean;
59-
/** Defaults to `false`. If true a Hide button is show top right allowing this section
60-
* to be collapsed
61-
*/
6257
toggleable?: boolean;
6358
/** Defaults to `false`. If true and `editionId` is also passed, then a date string is
6459
* shown under the title. Typically only used on Headlines containers on fronts
@@ -68,30 +63,9 @@ type Props = {
6863
editionId: EditionId;
6964
/** A list of related links that appear in the bottom of the left column on fronts */
7065
treats?: TreatType[];
71-
/** Enable the "Show More" button on this container to allow readers to load more cards */
72-
canShowMore?: boolean;
73-
ajaxUrl?: string;
74-
/** Puts pagination at the bottom of the container allowing the user to navigate to other pages,
75-
* usually used on the last container on a page */
76-
pagination?: TagPagePagination;
77-
/** Indicates if the page has a page skin advert
78-
* When a page skin advert is active:
79-
* - containers are constrained to a max width of 'desktop'
80-
* - media queries above desktop are not applied
81-
* - if no background colour is specified use the default body background colour to prevent
82-
* the page skin background showing through the containers
83-
*/
84-
hasPageSkin?: boolean;
85-
discussionApiUrl: string;
8666
collectionBranding?: CollectionBranding;
8767
isTagPage?: boolean;
8868
hasNavigationButtons?: boolean;
89-
isAboveDesktopAd?: boolean;
90-
isAboveMobileAd?: boolean;
91-
/** Indicates whether this is a Guardian Labs container */
92-
isLabs?: boolean;
93-
/** Feature switch for the labs redesign work */
94-
showLabsRedesign?: boolean;
9569
likeHandler?: () => void;
9670
dislikeHandler?: () => void;
9771
};
@@ -578,7 +552,6 @@ export const StorylineSection = ({
578552
containerName,
579553
containerPalette,
580554
containerLevel,
581-
isNextCollectionPrimary,
582555
description,
583556
editionId,
584557
leftContent,
@@ -591,12 +564,9 @@ export const StorylineSection = ({
591564
toggleable = false,
592565
treats,
593566
url,
594-
pagination,
595567
collectionBranding,
596568
isTagPage = false,
597569
hasNavigationButtons = false,
598-
isAboveDesktopAd = false,
599-
isAboveMobileAd = false,
600570
dislikeHandler,
601571
likeHandler,
602572
}: Props) => {
@@ -701,7 +671,8 @@ export const StorylineSection = ({
701671
>
702672
Dive deeper into the Guardian's archive.
703673
This product uses GenAI. Learn more about
704-
how it works <a href="#">here.</a>
674+
how it works{' '}
675+
<a href="https://theguardian.com">here.</a>
705676
</div>
706677
</>
707678
}

dotcom-rendering/src/components/StorylineTabContent.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import { DCRGroupedTrails } from 'src/types/front';
2-
import { FlexibleGeneral } from './FlexibleGeneral';
3-
import { FlexibleSpecial } from './FlexibleSpecial';
41
import { css } from '@emotion/react';
5-
import { palette } from '../palette';
62
import {
7-
space,
3+
from,
84
palette as sourcePalette,
5+
space,
96
textSans20,
10-
from,
117
} from '@guardian/source/foundations';
12-
import { Category } from './StorylinesSection.importable';
8+
import { palette } from '../palette';
9+
import type { DCRGroupedTrails } from '../types/front';
10+
import { FlexibleGeneral } from './FlexibleGeneral';
11+
import { FlexibleSpecial } from './FlexibleSpecial';
12+
import { Category } from '../types/tagPageAIContent';
1313

1414
const categoryTitleCss = css`
1515
${textSans20};

0 commit comments

Comments
 (0)