Skip to content

Commit 9d9ff56

Browse files
Ed review adjustments
1 parent 987d8fb commit 9d9ff56

7 files changed

Lines changed: 26 additions & 10 deletions

File tree

dotcom-rendering/src/components/MostViewedRightWithAd.island.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { css } from '@emotion/react';
2-
import { type ArticleFormat } from '../lib/articleFormat';
2+
import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat';
33
import { RightAdsPlaceholder } from './AdPlaceholder.apps';
44
import { AdSlot } from './AdSlot.web';
55
import { useConfig } from './ConfigContext';
@@ -68,7 +68,9 @@ export const MostViewedRightWithAd = ({
6868
/>
6969
) : null}
7070

71-
{!isPaidContent && !shouldHideMostViewed ? (
71+
{!isPaidContent &&
72+
!shouldHideMostViewed &&
73+
format.design !== ArticleDesign.Interactive ? (
7274
<MostViewedRightWrapper
7375
maxHeightPx={MAX_HEIGHT_PX}
7476
componentDataAttribute={componentDataAttribute}

dotcom-rendering/src/components/SlotBodyEnd.island.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import type {
1313
} from '@guardian/support-dotcom-components/dist/dotcom/types';
1414
import type { EpicProps } from '@guardian/support-dotcom-components/dist/shared/types';
1515
import { useEffect, useState } from 'react';
16+
import { grid } from '../grid';
1617
import { getArticleCounts } from '../lib/articleCount';
1718
import {
1819
BrazeBannersSystemPlacementId,
@@ -57,6 +58,10 @@ type Props = {
5758

5859
const slotStyles = css`
5960
color: ${palette.neutral[7]};
61+
${grid.container};
62+
& > *:first-child {
63+
${grid.column.centre};
64+
}
6065
`;
6166

6267
const buildReaderRevenueEpicConfig = (

dotcom-rendering/src/components/SubMeta.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,15 @@ export const SubMeta = ({
236236
format.design === ArticleDesign.Gallery
237237
? galleryStyles
238238
: bottomPadding,
239-
grid.container,
240-
css`
241-
> * {
242-
${grid.column.centre}
243-
}
244-
`,
239+
format.design === ArticleDesign.Interactive &&
240+
!isDeprecatedInteractiveLayout
241+
? css`
242+
${grid.container};
243+
> * {
244+
${grid.column.centre}
245+
}
246+
`
247+
: undefined,
245248
]}
246249
>
247250
<StraightLines

dotcom-rendering/src/layouts/StandardLayout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ export const StandardLayout = (props: WebProps | AppProps) => {
8484
const interactiveLayoutSwitchoverDate = new Date('2024-06-01T00:00:00Z');
8585
const publicationDate = new Date(article.webPublicationDate);
8686
const isLegacyInteractive =
87-
publicationDate < interactiveLayoutSwitchoverDate;
87+
publicationDate < interactiveLayoutSwitchoverDate &&
88+
format.design === ArticleDesign.Interactive;
8889

8990
const showComments = article.isCommentable && !isPaidContent;
9091

dotcom-rendering/src/layouts/lib/articleArrangements.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ const interactiveCss: LayoutCssMap = {
171171
leftCol: `grid-row: 3 / span 2; ${grid.column.left};`,
172172
},
173173
body: {
174+
mobile: `${grid.column.all};`,
174175
tablet: `grid-row: 6; ${grid.column.all};`,
175176
leftCol: 'grid-row: 4;',
176177
},

dotcom-rendering/src/lib/ArticleRenderer.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ export const ArticleRenderer = ({
216216
css={[
217217
commercialPosition,
218218
spacefinderAdStyles,
219-
!isOldInteractive && interactiveLayoutCSS,
219+
format.design === ArticleDesign.Interactive &&
220+
!isOldInteractive &&
221+
interactiveLayoutCSS,
220222
]}
221223
>
222224
{renderingTarget === 'Apps'

dotcom-rendering/src/lib/adStyles.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ const spacefinderAdSlotContainerStyles = css`
122122
text-align: center;
123123
display: flex;
124124
justify-content: center;
125+
// TODO: Revisit ads positioning/sizing nicely in interactive body grid
126+
width: 100%;
125127
max-width: 620px;
126128
margin-left: 0;
127129

0 commit comments

Comments
 (0)