Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dotcom-rendering/src/components/ArticleBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type Props = {
shouldHideAds: boolean;
serverTime?: number;
idApiUrl?: string;
isOldInteractive?: boolean;
};

const globalOlStyles = () => css`
Expand Down Expand Up @@ -145,6 +146,7 @@ export const ArticleBody = ({
shouldHideAds,
serverTime,
idApiUrl,
isOldInteractive = false,
}: Props) => {
const isInteractiveContent =
format.design === ArticleDesign.Interactive ||
Expand Down Expand Up @@ -266,6 +268,7 @@ export const ArticleBody = ({
contributionsServiceUrl={contributionsServiceUrl}
shouldHideAds={shouldHideAds}
idApiUrl={idApiUrl}
isOldInteractive={isOldInteractive}
/>
</div>
{hasObserverPublicationTag && <ObserverFooter />}
Expand Down
51 changes: 2 additions & 49 deletions dotcom-rendering/src/components/Figure.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import { css } from '@emotion/react';
import {
breakpoints,
from,
palette as sourcePalette,
space,
until,
} from '@guardian/source/foundations';
import type { LayoutType } from '../layouts/lib/articleArrangements';
import { from, space, until } from '@guardian/source/foundations';
import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat';
import { transparentColour } from '../lib/transparentColour';
import { palette } from '../palette';
Expand Down Expand Up @@ -110,47 +103,7 @@ const roleCss = {
margin-top: ${space[3]}px;
margin-bottom: ${space[3]}px;

${until.tablet} {
margin-left: -20px;
margin-right: -20px;
}
${until.mobileLandscape} {
margin-left: -10px;
margin-right: -10px;
}
${from.tablet} {
--scrollbar-width-fallback: 15px;
--half-scrollbar-width-fallback: 7.5px;

width: calc(
100vw - var(--scrollbar-width, var(--scrollbar-width-fallback))
);
max-width: calc(
100vw - var(--scrollbar-width, var(--scrollbar-width-fallback))
);

--grid-container-max-width: 740px;
--grid-container-left-margin: calc(
((-100vw + (var(--grid-container-max-width) - 42px)) / 2) +
var(
--half-scrollbar-width,
var(--half-scrollbar-width-fallback)
)
);

margin-left: var(--grid-container-left-margin);
}
${from.desktop} {
--grid-container-max-width: ${breakpoints.desktop}px;
}
${from.leftCol} {
--grid-container-max-width: ${breakpoints.leftCol}px;
--grid-left-col-width: 140px;
}
${from.wide} {
--grid-container-max-width: ${breakpoints.wide}px;
--grid-left-col-width: 219px;
}
grid-column: 1 / -1;
`,

showcase: css`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ export const MostViewedRightWithAd = ({
/>
) : null}

{!isPaidContent && !shouldHideMostViewed ? (
{!isPaidContent && !shouldHideMostViewed && (
<MostViewedRightWrapper
maxHeightPx={MAX_HEIGHT_PX}
componentDataAttribute={componentDataAttribute}
renderAds={renderAds}
/>
) : null}
)}

{isApps && <RightAdsPlaceholder />}
</div>
Expand Down
5 changes: 5 additions & 0 deletions dotcom-rendering/src/components/SlotBodyEnd.island.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type {
} from '@guardian/support-dotcom-components/dist/dotcom/types';
import type { EpicProps } from '@guardian/support-dotcom-components/dist/shared/types';
import { useEffect, useState } from 'react';
import { grid } from '../grid';
import { getArticleCounts } from '../lib/articleCount';
import {
BrazeBannersSystemPlacementId,
Expand Down Expand Up @@ -56,6 +57,10 @@ type Props = {

const slotStyles = css`
color: ${palette.neutral[7]};
${grid.container};
& > *:first-child {
${grid.column.centre};
}
`;

const buildReaderRevenueEpicConfig = (
Expand Down
24 changes: 21 additions & 3 deletions dotcom-rendering/src/components/SubMeta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { grid } from '../grid';
import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat';
import type { BaseLinkType } from '../model/extract-nav';
import { palette } from '../palette';
import { palette as themePalette } from '../palette';
import { Island } from './Island';
import { ShareButton } from './ShareButton.island';

Expand Down Expand Up @@ -130,6 +131,7 @@ type Props = {
webUrl: string;
webTitle: string;
showBottomSocialButtons: boolean;
isDeprecatedInteractiveLayout?: boolean;
};

const syndicationButtonOverrides = css`
Expand Down Expand Up @@ -205,6 +207,7 @@ export const SubMeta = ({
webUrl,
webTitle,
showBottomSocialButtons,
isDeprecatedInteractiveLayout = false,
}: Props) => {
const createLinks = () => {
const links: BaseLinkType[] = [];
Expand All @@ -229,14 +232,29 @@ export const SubMeta = ({
<div
data-print-layout="hide"
css={[
format.design === ArticleDesign.Interactive
? setMetaWidth
: undefined,
isDeprecatedInteractiveLayout ? setMetaWidth : undefined,
format.design === ArticleDesign.Gallery
? galleryStyles
: bottomPadding,
format.design === ArticleDesign.Interactive &&
!isDeprecatedInteractiveLayout
? css`
${grid.container};
> * {
${grid.column.centre}
}
`
: undefined,
]}
>
<StraightLines
data-print-layout="hide"
count={4}
cssOverrides={css`
display: block;
`}
color={themePalette('--straight-lines')}
/>
{format.design === ArticleDesign.Gallery && (
<Fragment>
<div css={galleryBorder}></div>
Expand Down
8 changes: 2 additions & 6 deletions dotcom-rendering/src/layouts/DecideLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { HostedArticleLayout } from './HostedArticleLayout';
import { HostedGalleryLayout } from './HostedGalleryLayout';
import { HostedVideoLayout } from './HostedVideoLayout';
import { ImmersiveLayout } from './ImmersiveLayout';
import { InteractiveLayout } from './InteractiveLayout';
import { LiveLayout } from './LiveLayout';
import { NewsletterSignupLayout } from './NewsletterSignupLayout';
import { PictureLayout } from './PictureLayout';
Expand Down Expand Up @@ -137,14 +136,12 @@ const DecideLayoutApps = ({ article, renderingTarget }: AppProps) => {
switch (article.design) {
case ArticleDesign.Interactive:
return (
<InteractiveLayout
<StandardLayout
article={article.frontendData}
format={format}
renderingTarget={renderingTarget}
serverTime={serverTime}
/>
);

case ArticleDesign.FullPageInteractive: {
return (
<FullPageInteractiveLayout
Expand Down Expand Up @@ -327,12 +324,11 @@ const DecideLayoutWeb = ({ article, NAV, renderingTarget }: WebProps) => {
switch (article.design) {
case ArticleDesign.Interactive:
return (
<InteractiveLayout
<StandardLayout
article={article.frontendData}
NAV={NAV}
format={format}
renderingTarget={renderingTarget}
serverTime={serverTime}
/>
);
case ArticleDesign.FullPageInteractive: {
Expand Down
2 changes: 1 addition & 1 deletion dotcom-rendering/src/layouts/FullPageInteractiveLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import type { ArticleDeprecated } from '../types/article';
import type { Switches } from '../types/config';
import type { FEElement } from '../types/content';
import type { RenderingTarget } from '../types/renderingTarget';
import { temporaryBodyCopyColourOverride } from './InteractiveLayout';
import { temporaryBodyCopyColourOverride } from './interactives/InteractiveArticleGridDeprecated';
import { interactiveGlobalStyles } from './lib/interactiveLegacyStyling';
import { BannerWrapper, Stuck } from './lib/stickiness';

Expand Down
Loading