Skip to content

Commit 155e5bd

Browse files
authored
Remove old slideshow and render modern slideshow on all cards (#14406)
1 parent 5417fee commit 155e5bd

File tree

3 files changed

+21
-362
lines changed

3 files changed

+21
-362
lines changed

dotcom-rendering/src/components/Card/Card.tsx

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import { Island } from '../Island';
4040
import { LatestLinks } from '../LatestLinks.importable';
4141
import { LoopVideo } from '../LoopVideo.importable';
4242
import { Pill } from '../Pill';
43-
import { Slideshow } from '../Slideshow';
4443
import { SlideshowCarousel } from '../SlideshowCarousel.importable';
4544
import { Snap } from '../Snap';
4645
import { SnapCssSandbox } from '../SnapCssSandbox';
@@ -806,42 +805,31 @@ export const Card = ({
806805
imageType={media.type}
807806
imagePositionOnDesktop={imagePositionOnDesktop}
808807
imagePositionOnMobile={imagePositionOnMobile}
809-
hideImageOverlay={
810-
media.type === 'slideshow' && isFlexibleContainer
811-
}
808+
hideImageOverlay={media.type === 'slideshow'}
812809
padImage={isMediaCardOrNewsletter && isBetaContainer}
813810
isBetaContainer={isBetaContainer}
814811
>
815-
{media.type === 'slideshow' &&
816-
(isFlexibleContainer ? (
817-
<div
818-
css={css`
819-
position: relative;
820-
z-index: ${getZIndex(
821-
'card-nested-link',
822-
)};
823-
`}
812+
{media.type === 'slideshow' && (
813+
<div
814+
css={css`
815+
position: relative;
816+
z-index: ${getZIndex('card-nested-link')};
817+
`}
818+
>
819+
<Island
820+
priority="feature"
821+
defer={{ until: 'visible' }}
824822
>
825-
<Island
826-
priority="feature"
827-
defer={{ until: 'visible' }}
828-
>
829-
<SlideshowCarousel
830-
images={media.slideshowImages}
831-
imageSize={imageSize}
832-
hasNavigationBackgroundColour={
833-
!!hasSublinks
834-
}
835-
/>
836-
</Island>
837-
</div>
838-
) : (
839-
<Slideshow
840-
images={media.slideshowImages}
841-
imageSize={imageSize}
842-
isDynamo={isDynamo}
843-
/>
844-
))}
823+
<SlideshowCarousel
824+
images={media.slideshowImages}
825+
imageSize={imageSize}
826+
hasNavigationBackgroundColour={
827+
!!hasSublinks
828+
}
829+
/>
830+
</Island>
831+
</div>
832+
)}
845833
{media.type === 'avatar' && (
846834
<AvatarContainer
847835
imageSize={imageSize}

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

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

0 commit comments

Comments
 (0)