Skip to content

Commit 5dcd50a

Browse files
committed
Disable show/hide button if covered by Most Popular Front Right containers
1 parent 4e8d08e commit 5dcd50a

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

dotcom-rendering/src/components/FrontSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ const sectionContentBorderFromLeftCol = css`
398398
bottom: 0;
399399
border-left: 1px solid ${schemePalette('--section-border')};
400400
transform: translateX(-50%);
401-
/** Keeps the vertical divider ontop of carousel item dividers */
401+
/** Keeps the vertical divider on top of carousel item dividers */
402402
z-index: 1;
403403
}
404404
}
@@ -414,7 +414,7 @@ const slimHomepageRightBorderStyles = css`
414414
right: 0;
415415
border-right: 1px solid ${schemePalette('--section-border')};
416416
transform: translateX(-50%);
417-
/** Keeps the vertical divider ontop of carousel item dividers */
417+
/** Keeps the vertical divider on top of carousel item dividers */
418418
z-index: 1;
419419
}
420420
}

dotcom-rendering/src/layouts/FrontLayout.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,25 @@ const isToggleable = (
7878
index: number,
7979
collection: DCRCollectionType,
8080
isNetworkFront: boolean,
81+
isInSlimHomepageAbTestVariant: boolean,
8182
) => {
8283
if (isNetworkFront) {
84+
/**
85+
* The show/hide button would be covered by the MostPopularFrontRight component
86+
* in the variant of the Slim Homepage AB test.
87+
*/
88+
const hideForSlimHomepageAbTest =
89+
isInSlimHomepageAbTestVariant &&
90+
(collection.displayName === 'News' ||
91+
collection.displayName === 'Features' ||
92+
collection.displayName === 'More features');
93+
8394
return (
8495
collection.displayName.toLowerCase() !== 'headlines' &&
8596
!isNavList(collection) &&
8697
!isHighlights(collection) &&
87-
!isLabs(collection)
98+
!isLabs(collection) &&
99+
!hideForSlimHomepageAbTest
88100
);
89101
}
90102

@@ -487,6 +499,7 @@ export const FrontLayout = ({ front, NAV }: Props) => {
487499
index,
488500
collection,
489501
front.isNetworkFront,
502+
isInSlimHomepageAbTestVariant,
490503
)}
491504
leftContent={decideLeftContent(
492505
front,

0 commit comments

Comments
 (0)