@@ -156,18 +156,15 @@ const decideSplashCardProperties = (
156
156
boostLevel : BoostLevel ,
157
157
supportingContentLength : number ,
158
158
mediaCard : boolean ,
159
- hasLivePlayable : boolean ,
160
- imageSuppressed : boolean ,
159
+ useLargerHeadlineSizeDesktop : boolean ,
161
160
avatarUrl : boolean ,
162
161
) : BoostedSplashProperties => {
163
162
switch ( boostLevel ) {
164
- // boostedfont sizing
165
163
// The default boost level is equal to no boost. It is the same as the default card layout.
166
164
case 'default' :
167
165
return {
168
166
headlineSizes : {
169
- desktop :
170
- imageSuppressed || hasLivePlayable ? 'large' : 'medium' ,
167
+ desktop : useLargerHeadlineSizeDesktop ? 'large' : 'medium' ,
171
168
tablet : 'medium' ,
172
169
mobile : 'medium' ,
173
170
} ,
@@ -182,8 +179,7 @@ const decideSplashCardProperties = (
182
179
case 'boost' :
183
180
return {
184
181
headlineSizes : {
185
- desktop :
186
- imageSuppressed || hasLivePlayable ? 'xlarge' : 'large' ,
182
+ desktop : useLargerHeadlineSizeDesktop ? 'xlarge' : 'large' ,
187
183
tablet : 'large' ,
188
184
mobile : 'large' ,
189
185
} ,
@@ -198,10 +194,9 @@ const decideSplashCardProperties = (
198
194
case 'megaboost' :
199
195
return {
200
196
headlineSizes : {
201
- desktop :
202
- imageSuppressed || hasLivePlayable
203
- ? 'xxlarge'
204
- : 'xlarge' ,
197
+ desktop : useLargerHeadlineSizeDesktop
198
+ ? 'xxlarge'
199
+ : 'xlarge' ,
205
200
tablet : 'xlarge' ,
206
201
mobile : 'xlarge' ,
207
202
} ,
@@ -215,10 +210,9 @@ const decideSplashCardProperties = (
215
210
case 'gigaboost' :
216
211
return {
217
212
headlineSizes : {
218
- desktop :
219
- imageSuppressed || hasLivePlayable
220
- ? 'xxxlarge'
221
- : 'xxlarge' ,
213
+ desktop : useLargerHeadlineSizeDesktop
214
+ ? 'xxxlarge'
215
+ : 'xxlarge' ,
222
216
tablet : 'xlarge' ,
223
217
mobile : 'xxlarge' ,
224
218
} ,
@@ -269,6 +263,11 @@ export const SplashCardLayout = ({
269
263
) ;
270
264
}
271
265
266
+ // We sometimes want to give the headline size on desktop a size bump.
267
+ const useLargerHeadlineSizeDesktop =
268
+ ( ! card . image && card . format . design !== ArticleDesign . Comment ) ||
269
+ card . showLivePlayable ;
270
+
272
271
const {
273
272
headlineSizes,
274
273
imagePositionOnDesktop,
@@ -281,8 +280,7 @@ export const SplashCardLayout = ({
281
280
card . boostLevel ?? 'default' ,
282
281
card . supportingContent ?. length ?? 0 ,
283
282
isMediaCard ( card . format ) ,
284
- card . showLivePlayable ,
285
- ! card . image ,
283
+ useLargerHeadlineSizeDesktop ,
286
284
! ! card . avatarUrl ,
287
285
) ;
288
286
@@ -555,9 +553,9 @@ const HalfWidthCardLayout = ({
555
553
( containerLevel !== 'Primary' && cardIndex > 0 )
556
554
}
557
555
trailText = { undefined }
558
- // On standard cards, we increase the headline size if the trail image has been hidden
559
556
headlineSizes = {
560
- ! card . image
557
+ ! card . image &&
558
+ card . format . design !== ArticleDesign . Comment
561
559
? {
562
560
desktop : 'small' ,
563
561
tablet : 'xsmall' ,
0 commit comments