Skip to content

Commit afce96c

Browse files
committed
Display sublinks horizontally on flex special splash if the card has live updates displaying
1 parent 4c25252 commit afce96c

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

dotcom-rendering/src/components/FlexibleSpecial.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ const determineCardProperties = (
5454
supportingContentLength: number,
5555
mediaCard: boolean,
5656
imageSuppressed: boolean,
57+
hasLiveUpdates: boolean,
5758
): BoostProperties => {
59+
const shouldDisplaySublinksHorizontally =
60+
supportingContentLength >= 3 || hasLiveUpdates;
61+
5862
switch (boostLevel) {
5963
// The default boost level is equal to no boost. It is the same as the default card layout.
6064
case 'default':
@@ -67,8 +71,9 @@ const determineCardProperties = (
6771
mediaSize: 'xlarge',
6872
mediaPositionOnDesktop: 'right',
6973
mediaPositionOnMobile: mediaCard ? 'top' : 'bottom',
70-
supportingContentAlignment:
71-
supportingContentLength >= 3 ? 'horizontal' : 'vertical',
74+
supportingContentAlignment: shouldDisplaySublinksHorizontally
75+
? 'horizontal'
76+
: 'vertical',
7277
liveUpdatesAlignment: 'vertical',
7378
trailTextSize: 'regular',
7479
subtitleSize: 'medium',
@@ -83,8 +88,9 @@ const determineCardProperties = (
8388
mediaSize: 'xlarge',
8489
mediaPositionOnDesktop: 'right',
8590
mediaPositionOnMobile: mediaCard ? 'top' : 'bottom',
86-
supportingContentAlignment:
87-
supportingContentLength >= 3 ? 'horizontal' : 'vertical',
91+
supportingContentAlignment: shouldDisplaySublinksHorizontally
92+
? 'horizontal'
93+
: 'vertical',
8894
liveUpdatesAlignment: 'vertical',
8995
trailTextSize: 'regular',
9096
subtitleSize: 'medium',
@@ -166,6 +172,7 @@ export const OneCardLayout = ({
166172
card.supportingContent?.length ?? 0,
167173
isMediaCard(card.format),
168174
!card.image,
175+
card.showLivePlayable,
169176
);
170177

171178
return (

0 commit comments

Comments
 (0)