Skip to content

Remove legacy media meta #14123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
23 changes: 2 additions & 21 deletions dotcom-rendering/src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { CardPicture } from '../CardPicture';
import { Island } from '../Island';
import { LatestLinks } from '../LatestLinks.importable';
import { LoopVideo } from '../LoopVideo.importable';
import { MediaMeta } from '../MediaMeta';
import { Pill } from '../Pill';
import { Slideshow } from '../Slideshow';
import { SlideshowCarousel } from '../SlideshowCarousel.importable';
Expand Down Expand Up @@ -550,8 +549,7 @@ export const Card = ({
- */
const isMediaCardOrNewsletter = isMediaCard(format) || isNewsletter;

// Currently pills are only shown within beta containers.
const showPill = isBetaContainer && isMediaCardOrNewsletter;
const showPill = isMediaCardOrNewsletter;

const media = getMedia({
imageUrl: image?.src,
Expand Down Expand Up @@ -795,15 +793,6 @@ export const Card = ({
cardHasImage={!!image}
/>
) : null}
{!showPill &&
!!mainMedia &&
mainMedia.type !== 'Video' &&
mainMedia.type !== 'LoopVideo' && (
<MediaMeta
mediaType={mainMedia.type}
hasKicker={!!kickerText}
/>
)}
</div>
)}

Expand All @@ -821,7 +810,7 @@ export const Card = ({
* Waveform for podcasts is absolutely positioned at bottom of
* card, behind everything else
*/}
{isBetaContainer && mainMedia?.type === 'Audio' && (
{mainMedia?.type === 'Audio' && (
<div
css={waveformWrapper(
imagePositionOnMobile,
Expand Down Expand Up @@ -1158,14 +1147,6 @@ export const Card = ({
cardHasImage={!!image}
/>
) : null}
{!showPill &&
!!mainMedia &&
mainMedia.type !== 'Video' && (
<MediaMeta
mediaType={mainMedia.type}
hasKicker={!!kickerText}
/>
)}
</HeadlineWrapper>
)}

Expand Down
68 changes: 0 additions & 68 deletions dotcom-rendering/src/components/MediaMeta.tsx

This file was deleted.