Skip to content

Commit

Permalink
remove the top border for the first row of beta containers (#12953)
Browse files Browse the repository at this point in the history
  • Loading branch information
cemms1 authored Dec 5, 2024
1 parent 49d41f5 commit 8a3be8f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
17 changes: 12 additions & 5 deletions dotcom-rendering/src/components/FlexibleGeneral.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,15 @@ export const BoostedCardLayout = ({
absoluteServerTimes,
imageLoading,
aspectRatio,
isFirstRow,
}: {
cards: DCRFrontCard[];
imageLoading: Loading;
containerPalette?: DCRContainerPalette;
showAge?: boolean;
absoluteServerTimes: boolean;
aspectRatio: AspectRatio;
isFirstRow: boolean;
}) => {
const card = cards[0];
if (!card) return null;
Expand All @@ -285,7 +287,7 @@ export const BoostedCardLayout = ({
liveUpdatesPosition,
} = decideCardProperties(card.boostLevel);
return (
<UL padBottom={true} hasLargeSpacing={true} showTopBar={true}>
<UL padBottom={true} hasLargeSpacing={true} showTopBar={!isFirstRow}>
<LI
padSides={true}
verticalDividerColour={palette('--card-border-supporting')}
Expand Down Expand Up @@ -329,11 +331,13 @@ export const StandardCardLayout = ({
showImage = true,
imageLoading,
isFirstRow,
isFirstStandardRow,
aspectRatio,
}: {
cards: DCRFrontCard[];
imageLoading: Loading;
isFirstRow: boolean;
isFirstRow?: boolean;
isFirstStandardRow?: boolean;
containerPalette?: DCRContainerPalette;
showAge?: boolean;
absoluteServerTimes: boolean;
Expand All @@ -347,8 +351,9 @@ export const StandardCardLayout = ({
direction="row"
padBottom={true}
hasLargeSpacing={true}
showTopBar={true}
splitTopBar={!isFirstRow}
showTopBar={!isFirstRow}
/** We use one full top bar for the first row and use a split one for subsequent rows */
splitTopBar={!isFirstStandardRow}
>
{cards.map((card, cardIndex) => {
return (
Expand Down Expand Up @@ -438,6 +443,7 @@ export const FlexibleGeneral = ({
absoluteServerTimes={absoluteServerTimes}
imageLoading={imageLoading}
aspectRatio={aspectRatio}
isFirstRow={!splash.length && i === 0}
/>
);

Expand All @@ -451,7 +457,8 @@ export const FlexibleGeneral = ({
showAge={showAge}
absoluteServerTimes={absoluteServerTimes}
imageLoading={imageLoading}
isFirstRow={i === 0}
isFirstRow={!splash.length && i === 0}
isFirstStandardRow={i === 0}
aspectRatio={aspectRatio}
/>
);
Expand Down
7 changes: 1 addition & 6 deletions dotcom-rendering/src/components/StaticFeatureTwo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ export const StaticFeatureTwo = ({
const cards = trails.slice(0, 2);

return (
<UL
direction="row"
padBottom={true}
showTopBar={true}
hasLargeSpacing={true}
>
<UL direction="row" padBottom={true} hasLargeSpacing={true}>
{cards.map((card) => {
return (
<LI
Expand Down
7 changes: 1 addition & 6 deletions dotcom-rendering/src/components/StaticMediumFour.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ export const StaticMediumFour = ({
const cards = trails.slice(0, 4);

return (
<UL
direction="row"
padBottom={true}
showTopBar={true}
hasLargeSpacing={true}
>
<UL direction="row" padBottom={true} hasLargeSpacing={true}>
{cards.map((card, cardIndex) => {
return (
<LI
Expand Down

0 comments on commit 8a3be8f

Please sign in to comment.