Skip to content

Commit 63eb9b4

Browse files
Make layout content the point of forking
1 parent 34d252e commit 63eb9b4

9 files changed

Lines changed: 1225 additions & 1767 deletions

dotcom-rendering/src/layouts/DecideLayout.tsx

Lines changed: 16 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import { HostedArticleLayout } from './HostedArticleLayout';
1111
import { HostedGalleryLayout } from './HostedGalleryLayout';
1212
import { HostedVideoLayout } from './HostedVideoLayout';
1313
import { ImmersiveLayout } from './ImmersiveLayout';
14-
import { InteractiveLayout } from './InteractiveLayout';
15-
import { InteractiveLayoutDeprecated } from './InteractiveLayoutDeprecated';
14+
import { InteractiveLayout } from './interactives/InteractiveLayout';
1615
import { LiveLayout } from './LiveLayout';
1716
import { NewsletterSignupLayout } from './NewsletterSignupLayout';
1817
import { PictureLayout } from './PictureLayout';
@@ -34,8 +33,6 @@ interface WebProps extends BaseProps {
3433

3534
export type Props = WebProps | AppProps;
3635

37-
export const interactiveLayoutSwitchoverDate = new Date('2024-06-01T00:00:00Z');
38-
3936
const DecideLayoutApps = ({ article, renderingTarget }: AppProps) => {
4037
const notSupported = <pre>Not supported</pre>;
4138
const format = {
@@ -45,7 +42,6 @@ const DecideLayoutApps = ({ article, renderingTarget }: AppProps) => {
4542
};
4643

4744
const serverTime = article.serverTime;
48-
const publicationDate = new Date(article.frontendData.webPublicationDate);
4945

5046
switch (article.display) {
5147
case ArticleDisplay.Immersive: {
@@ -119,24 +115,13 @@ const DecideLayoutApps = ({ article, renderingTarget }: AppProps) => {
119115
default: {
120116
switch (article.design) {
121117
case ArticleDesign.Interactive:
122-
if (publicationDate < interactiveLayoutSwitchoverDate) {
123-
return (
124-
<InteractiveLayoutDeprecated
125-
article={article.frontendData}
126-
format={format}
127-
renderingTarget={renderingTarget}
128-
serverTime={serverTime}
129-
/>
130-
);
131-
} else {
132-
return (
133-
<InteractiveLayout
134-
article={article.frontendData}
135-
format={format}
136-
renderingTarget={renderingTarget}
137-
/>
138-
);
139-
}
118+
return (
119+
<InteractiveLayout
120+
article={article.frontendData}
121+
format={format}
122+
renderingTarget={renderingTarget}
123+
/>
124+
);
140125
case ArticleDesign.FullPageInteractive: {
141126
return (
142127
<FullPageInteractiveLayout
@@ -233,7 +218,6 @@ const DecideLayoutWeb = ({ article, NAV, renderingTarget }: WebProps) => {
233218
};
234219

235220
const serverTime = article.serverTime;
236-
const publicationDate = new Date(article.frontendData.webPublicationDate);
237221

238222
switch (article.display) {
239223
case ArticleDisplay.Immersive: {
@@ -313,26 +297,14 @@ const DecideLayoutWeb = ({ article, NAV, renderingTarget }: WebProps) => {
313297
default: {
314298
switch (article.design) {
315299
case ArticleDesign.Interactive:
316-
if (publicationDate < interactiveLayoutSwitchoverDate) {
317-
return (
318-
<InteractiveLayoutDeprecated
319-
article={article.frontendData}
320-
NAV={NAV}
321-
format={format}
322-
renderingTarget={renderingTarget}
323-
serverTime={serverTime}
324-
/>
325-
);
326-
} else {
327-
return (
328-
<InteractiveLayout
329-
article={article.frontendData}
330-
NAV={NAV}
331-
format={format}
332-
renderingTarget={renderingTarget}
333-
/>
334-
);
335-
}
300+
return (
301+
<InteractiveLayout
302+
article={article.frontendData}
303+
NAV={NAV}
304+
format={format}
305+
renderingTarget={renderingTarget}
306+
/>
307+
);
336308
case ArticleDesign.FullPageInteractive: {
337309
return (
338310
<FullPageInteractiveLayout

dotcom-rendering/src/layouts/FullPageInteractiveLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import type { ArticleDeprecated } from '../types/article';
2727
import type { ServerSideTests, Switches } from '../types/config';
2828
import type { FEElement } from '../types/content';
2929
import type { RenderingTarget } from '../types/renderingTarget';
30-
import { temporaryBodyCopyColourOverride } from './InteractiveLayoutDeprecated';
30+
import { temporaryBodyCopyColourOverride } from './interactives/InteractiveGridV1';
3131
import { interactiveGlobalStyles } from './lib/interactiveLegacyStyling';
3232
import { BannerWrapper, Stuck } from './lib/stickiness';
3333

0 commit comments

Comments
 (0)